Chameleon

Chameleon Commit Details

Date:2010-07-21 23:30:18 (13 years 9 months ago)
Author:Tamás Kosárszky
Commit:192
Parents: 191
Message:Added mozodojo's r351 changes.
Changes:
D/trunk/i386/libsaio/dsdt_patcher.c
D/trunk/i386/libsaio/dsdt_patcher.h
A/trunk/i386/libsaio/aml_generator.c
A/trunk/i386/libsaio/acpi_patcher.c
A/trunk/Chameleon.xcodeproj/project.pbxproj
A/trunk/i386/libsaio/aml_generator.h
A/trunk/i386/libsaio/acpi_patcher.h
A/trunk/Chameleon.xcodeproj
M/trunk/i386/libsaio/smbios_patcher.c
M/trunk/i386/libsaio/nvidia.c
M/trunk/i386/boot2/boot.h
M/trunk/i386/libsaio/sys.c
M/trunk/i386/libsaio/acpi.h
M/trunk/i386/libsaio/platform.c
M/trunk/i386/libsaio/spd.c
M/trunk/i386/libsaio/cpu.c
M/trunk/i386/libsaio/fake_efi.c
M/trunk/i386/libsaio/platform.h
M/trunk/i386/libsaio/Makefile
M/trunk/i386/libsaio/cpu.h
M/trunk/i386/libsaio/saio_internal.h

File differences

trunk/Chameleon.xcodeproj/project.pbxproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
197
198
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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
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
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXFileReference section */
B0056CD611F3868000754B65 /* boot */ = {isa = PBXFileReference; lastKnownFileType = file; path = boot; sourceTree = "<group>"; };
B0056CD711F3868000754B65 /* boot.sys */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.preload"; path = boot.sys; sourceTree = "<group>"; };
B0056CD811F3868000754B65 /* boot0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = boot0; sourceTree = "<group>"; };
B0056CD911F3868000754B65 /* boot0hfs */ = {isa = PBXFileReference; lastKnownFileType = file; path = boot0hfs; sourceTree = "<group>"; };
B0056CDA11F3868000754B65 /* boot1f32 */ = {isa = PBXFileReference; lastKnownFileType = file; path = boot1f32; sourceTree = "<group>"; };
B0056CDB11F3868000754B65 /* boot1h */ = {isa = PBXFileReference; lastKnownFileType = file; path = boot1h; sourceTree = "<group>"; };
B0056CDC11F3868000754B65 /* boot1he */ = {isa = PBXFileReference; lastKnownFileType = file; path = boot1he; sourceTree = "<group>"; };
B0056CDD11F3868000754B65 /* boot1hp */ = {isa = PBXFileReference; lastKnownFileType = file; path = boot1hp; sourceTree = "<group>"; };
B0056CDE11F3868000754B65 /* cdboot */ = {isa = PBXFileReference; lastKnownFileType = file; path = cdboot; sourceTree = "<group>"; };
B0056CDF11F3868000754B65 /* chain0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = chain0; sourceTree = "<group>"; };
B0056CE011F3868000754B65 /* embedded.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = embedded.h; sourceTree = "<group>"; };
B0056CE111F3868000754B65 /* libsa.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libsa.a; sourceTree = "<group>"; };
B0056CE211F3868000754B65 /* libsaio.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libsaio.a; sourceTree = "<group>"; };
B0056CE311F3868000754B65 /* machOconv */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = machOconv; sourceTree = "<group>"; };
B0056CE411F3868000754B65 /* vers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vers.h; sourceTree = "<group>"; };
B0056CE711F3868000754B65 /* boot0.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = boot0.s; sourceTree = "<group>"; };
B0056CE811F3868000754B65 /* chain0.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = chain0.s; sourceTree = "<group>"; };
B0056CE911F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
B0056CEB11F3868000754B65 /* boot1.asm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm.asm; path = boot1.asm; sourceTree = "<group>"; };
B0056CEC11F3868000754B65 /* boot1.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = boot1.s; sourceTree = "<group>"; };
B0056CED11F3868000754B65 /* boot1f32-install.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "boot1f32-install.sh"; sourceTree = "<group>"; };
B0056CEE11F3868000754B65 /* boot1f32.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = boot1f32.s; sourceTree = "<group>"; };
B0056CEF11F3868000754B65 /* boot1he.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = boot1he.s; sourceTree = "<group>"; };
B0056CF011F3868000754B65 /* boot1hp.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = boot1hp.s; sourceTree = "<group>"; };
B0056CF111F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
B0056CF311F3868000754B65 /* appleboot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = appleboot.h; sourceTree = "<group>"; };
B0056CF411F3868000754B65 /* appleClut8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = appleClut8.h; sourceTree = "<group>"; };
B0056CF511F3868000754B65 /* bmdecompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bmdecompress.c; sourceTree = "<group>"; };
B0056CF611F3868000754B65 /* boot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = boot.c; sourceTree = "<group>"; };
B0056CF711F3868000754B65 /* boot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = boot.h; sourceTree = "<group>"; };
B0056CF811F3868000754B65 /* boot2.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = boot2.s; sourceTree = "<group>"; };
B0056CF911F3868000754B65 /* drivers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = drivers.c; sourceTree = "<group>"; };
B0056CFA11F3868000754B65 /* graphic_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = graphic_utils.c; sourceTree = "<group>"; };
B0056CFB11F3868000754B65 /* graphic_utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = graphic_utils.h; sourceTree = "<group>"; };
B0056CFC11F3868000754B65 /* graphics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = graphics.c; sourceTree = "<group>"; };
B0056CFD11F3868000754B65 /* graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = graphics.h; sourceTree = "<group>"; };
B0056CFE11F3868000754B65 /* gui.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gui.c; sourceTree = "<group>"; };
B0056CFF11F3868000754B65 /* gui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gui.h; sourceTree = "<group>"; };
B0056D0011F3868000754B65 /* IOHibernatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOHibernatePrivate.h; sourceTree = "<group>"; };
B0056D0111F3868000754B65 /* lzss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lzss.c; sourceTree = "<group>"; };
B0056D0211F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
B0056D0311F3868000754B65 /* mboot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mboot.c; sourceTree = "<group>"; };
B0056D0411F3868000754B65 /* mboot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mboot.h; sourceTree = "<group>"; };
B0056D0511F3868000754B65 /* multiboot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multiboot.h; sourceTree = "<group>"; };
B0056D0611F3868000754B65 /* options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = options.c; sourceTree = "<group>"; };
B0056D0711F3868000754B65 /* picopng.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = picopng.c; sourceTree = "<group>"; };
B0056D0811F3868000754B65 /* picopng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = picopng.h; sourceTree = "<group>"; };
B0056D0911F3868000754B65 /* prompt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prompt.c; sourceTree = "<group>"; };
B0056D0A11F3868000754B65 /* ramdisk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ramdisk.c; sourceTree = "<group>"; };
B0056D0B11F3868000754B65 /* ramdisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ramdisk.h; sourceTree = "<group>"; };
B0056D0C11F3868000754B65 /* resume.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = resume.c; sourceTree = "<group>"; };
B0056D0D11F3868000754B65 /* WKdm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKdm.h; sourceTree = "<group>"; };
B0056D0E11F3868000754B65 /* WKdmDecompress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = WKdmDecompress.c; sourceTree = "<group>"; };
B0056D1011F3868000754B65 /* cdboot.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = cdboot.s; sourceTree = "<group>"; };
B0056D1111F3868000754B65 /* cdboothdd.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = cdboothdd.s; sourceTree = "<group>"; };
B0056D1211F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
B0056D1411F3868000754B65 /* Limits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Limits; sourceTree = "<group>"; };
B0056D1511F3868000754B65 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
B0056D1711F3868000754B65 /* efi_tables.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = efi_tables.c; sourceTree = "<group>"; };
B0056D1811F3868000754B65 /* efi_tables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = efi_tables.h; sourceTree = "<group>"; };
B0056D1911F3868000754B65 /* error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = error.c; sourceTree = "<group>"; };
B0056D1A11F3868000754B65 /* libsa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libsa.h; sourceTree = "<group>"; };
B0056D1B11F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
B0056D1C11F3868000754B65 /* memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = "<group>"; };
B0056D1D11F3868000754B65 /* prf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prf.c; sourceTree = "<group>"; };
B0056D1E11F3868000754B65 /* printf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = printf.c; sourceTree = "<group>"; };
B0056D1F11F3868000754B65 /* qsort.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = qsort.c; sourceTree = "<group>"; };
B0056D2011F3868000754B65 /* setjmp.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = setjmp.s; sourceTree = "<group>"; };
B0056D2111F3868000754B65 /* string.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = string.c; sourceTree = "<group>"; };
B0056D2211F3868000754B65 /* strtol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtol.c; sourceTree = "<group>"; };
B0056D2311F3868000754B65 /* zalloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zalloc.c; sourceTree = "<group>"; };
B0056D2511F3868000754B65 /* acpi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acpi.h; sourceTree = "<group>"; };
B0056D2611F3868000754B65 /* acpi_patcher.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = acpi_patcher.c; sourceTree = "<group>"; };
B0056D2711F3868000754B65 /* acpi_patcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acpi_patcher.h; sourceTree = "<group>"; };
B0056D2811F3868000754B65 /* allocate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = allocate.c; sourceTree = "<group>"; };
B0056D2911F3868000754B65 /* asm.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = asm.s; sourceTree = "<group>"; };
B0056D2A11F3868000754B65 /* ati.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ati.c; sourceTree = "<group>"; };
B0056D2B11F3868000754B65 /* ati.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ati.h; sourceTree = "<group>"; };
B0056D2C11F3868000754B65 /* bios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bios.h; sourceTree = "<group>"; };
B0056D2D11F3868000754B65 /* bios.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = bios.s; sourceTree = "<group>"; };
B0056D2E11F3868000754B65 /* biosfn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = biosfn.c; sourceTree = "<group>"; };
B0056D2F11F3868000754B65 /* bootstruct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bootstruct.c; sourceTree = "<group>"; };
B0056D3011F3868000754B65 /* bootstruct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootstruct.h; sourceTree = "<group>"; };
B0056D3111F3868000754B65 /* cache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cache.c; sourceTree = "<group>"; };
B0056D3211F3868000754B65 /* console.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = console.c; sourceTree = "<group>"; };
B0056D3311F3868000754B65 /* convert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = convert.c; sourceTree = "<group>"; };
B0056D3411F3868000754B65 /* convert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = convert.h; sourceTree = "<group>"; };
B0056D3511F3868000754B65 /* cpu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpu.c; sourceTree = "<group>"; };
B0056D3611F3868000754B65 /* cpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpu.h; sourceTree = "<group>"; };
B0056D3711F3868000754B65 /* device_inject.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = device_inject.c; sourceTree = "<group>"; };
B0056D3811F3868000754B65 /* device_inject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = device_inject.h; sourceTree = "<group>"; };
B0056D3911F3868000754B65 /* device_tree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = device_tree.c; sourceTree = "<group>"; };
B0056D3A11F3868000754B65 /* device_tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = device_tree.h; sourceTree = "<group>"; };
B0056D3B11F3868000754B65 /* disk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = disk.c; sourceTree = "<group>"; };
B0056D3C11F3868000754B65 /* efi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = efi.h; sourceTree = "<group>"; };
B0056D3D11F3868000754B65 /* ext2fs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ext2fs.c; sourceTree = "<group>"; };
B0056D3E11F3868000754B65 /* ext2fs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ext2fs.h; sourceTree = "<group>"; };
B0056D3F11F3868000754B65 /* fake_efi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fake_efi.c; sourceTree = "<group>"; };
B0056D4011F3868000754B65 /* fake_efi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fake_efi.h; sourceTree = "<group>"; };
B0056D4111F3868000754B65 /* fdisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fdisk.h; sourceTree = "<group>"; };
B0056D4211F3868000754B65 /* hfs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hfs.c; sourceTree = "<group>"; };
B0056D4311F3868000754B65 /* hfs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hfs.h; sourceTree = "<group>"; };
B0056D4411F3868000754B65 /* hfs_CaseTables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hfs_CaseTables.h; sourceTree = "<group>"; };
B0056D4511F3868000754B65 /* hfs_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hfs_compare.c; sourceTree = "<group>"; };
B0056D4611F3868000754B65 /* hpet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hpet.c; sourceTree = "<group>"; };
B0056D4711F3868000754B65 /* hpet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hpet.h; sourceTree = "<group>"; };
B0056D4811F3868000754B65 /* io_inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = io_inline.h; sourceTree = "<group>"; };
B0056D4911F3868000754B65 /* libsaio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libsaio.h; sourceTree = "<group>"; };
B0056D4A11F3868000754B65 /* load.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = load.c; sourceTree = "<group>"; };
B0056D4B11F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
B0056D4C11F3868000754B65 /* md5c.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = md5c.c; sourceTree = "<group>"; };
B0056D4D11F3868000754B65 /* mem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mem.c; sourceTree = "<group>"; };
B0056D4E11F3868000754B65 /* mem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mem.h; sourceTree = "<group>"; };
B0056D4F11F3868000754B65 /* memvendors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memvendors.h; sourceTree = "<group>"; };
B0056D5011F3868000754B65 /* misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = misc.c; sourceTree = "<group>"; };
B0056D5111F3868000754B65 /* msdos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = msdos.c; sourceTree = "<group>"; };
B0056D5211F3868000754B65 /* msdos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = msdos.h; sourceTree = "<group>"; };
B0056D5311F3868000754B65 /* msdos_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = msdos_private.h; sourceTree = "<group>"; };
B0056D5411F3868000754B65 /* nbp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nbp.c; sourceTree = "<group>"; };
B0056D5511F3868000754B65 /* nbp_cmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nbp_cmd.h; sourceTree = "<group>"; };
B0056D5611F3868000754B65 /* ntfs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ntfs.c; sourceTree = "<group>"; };
B0056D5711F3868000754B65 /* ntfs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ntfs.h; sourceTree = "<group>"; };
B0056D5811F3868000754B65 /* ntfs_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ntfs_private.h; sourceTree = "<group>"; };
B0056D5911F3868000754B65 /* nvidia.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nvidia.c; sourceTree = "<group>"; };
B0056D5A11F3868000754B65 /* nvidia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nvidia.h; sourceTree = "<group>"; };
B0056D5B11F3868000754B65 /* pci.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pci.c; sourceTree = "<group>"; };
B0056D5C11F3868000754B65 /* pci.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pci.h; sourceTree = "<group>"; };
B0056D5D11F3868000754B65 /* pci_root.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pci_root.c; sourceTree = "<group>"; };
B0056D5E11F3868000754B65 /* pci_root.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pci_root.h; sourceTree = "<group>"; };
B0056D5F11F3868000754B65 /* pci_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pci_setup.c; sourceTree = "<group>"; };
B0056D6011F3868000754B65 /* platform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform.c; sourceTree = "<group>"; };
B0056D6111F3868000754B65 /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = "<group>"; };
B0056D6211F3868000754B65 /* saio_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = saio_internal.h; sourceTree = "<group>"; };
B0056D6311F3868000754B65 /* saio_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = saio_types.h; sourceTree = "<group>"; };
B0056D6411F3868000754B65 /* sl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sl.h; sourceTree = "<group>"; };
B0056D6511F3868000754B65 /* SMBIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMBIOS.h; sourceTree = "<group>"; };
B0056D6611F3868000754B65 /* smbios_patcher.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = smbios_patcher.c; sourceTree = "<group>"; };
B0056D6711F3868000754B65 /* smbios_patcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = smbios_patcher.h; sourceTree = "<group>"; };
B0056D6811F3868000754B65 /* spd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = spd.c; sourceTree = "<group>"; };
B0056D6911F3868000754B65 /* spd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spd.h; sourceTree = "<group>"; };
B0056D6A11F3868000754B65 /* stringTable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stringTable.c; sourceTree = "<group>"; };
B0056D6B11F3868000754B65 /* sys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sys.c; sourceTree = "<group>"; };
B0056D6C11F3868000754B65 /* table.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = table.c; sourceTree = "<group>"; };
B0056D6D11F3868000754B65 /* ufs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ufs.c; sourceTree = "<group>"; };
B0056D6E11F3868000754B65 /* ufs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ufs.h; sourceTree = "<group>"; };
B0056D6F11F3868000754B65 /* ufs_byteorder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ufs_byteorder.c; sourceTree = "<group>"; };
B0056D7011F3868000754B65 /* ufs_byteorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ufs_byteorder.h; sourceTree = "<group>"; };
B0056D7111F3868000754B65 /* usb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = usb.c; sourceTree = "<group>"; };
B0056D7211F3868000754B65 /* vbe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vbe.c; sourceTree = "<group>"; };
B0056D7311F3868000754B65 /* vbe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vbe.h; sourceTree = "<group>"; };
B0056D7411F3868000754B65 /* xml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xml.c; sourceTree = "<group>"; };
B0056D7511F3868000754B65 /* xml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xml.h; sourceTree = "<group>"; };
B0056D7611F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
B0056D7711F3868000754B65 /* MakeInc.dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MakeInc.dir; sourceTree = "<group>"; };
B0056D7811F3868000754B65 /* MakePaths.dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MakePaths.dir; sourceTree = "<group>"; };
B0056D7A11F3868000754B65 /* machOconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = machOconv.c; sourceTree = "<group>"; };
B0056D7B11F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
B0056D7C11F3868000754B65 /* TODO */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TODO; sourceTree = "<group>"; };
B0056D7D11F3868000754B65 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
B0056D7E11F3868000754B65 /* efisysinst.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = efisysinst.sh; sourceTree = "<group>"; };
B0056D7F11F3868000754B65 /* CREDITS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CREDITS; sourceTree = "<group>"; };
B0056D8011F3868000754B65 /* coding_standards.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = coding_standards.txt; sourceTree = "<group>"; };
B0056D8111F3868000754B65 /* CHANGES */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGES; sourceTree = "<group>"; };
B0056D8211F3868000754B65 /* APPLE_LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = APPLE_LICENSE; sourceTree = "<group>"; };
B0056D8411F3868000754B65 /* buildpkg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = buildpkg; sourceTree = "<group>"; };
B0056D8511F3868000754B65 /* Distribution */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Distribution; sourceTree = "<group>"; };
B0056D8611F3868000754B65 /* fdisk */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = fdisk; sourceTree = "<group>"; };
B0056D8811F3868000754B65 /* AHCIPortInjector.kext */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.kernel-extension"; path = AHCIPortInjector.kext; sourceTree = "<group>"; };
B0056D8911F3868000754B65 /* ATAPortInjector.kext */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.kernel-extension"; path = ATAPortInjector.kext; sourceTree = "<group>"; };
B0056D8A11F3868000754B65 /* Disabler.kext */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.kernel-extension"; path = Disabler.kext; sourceTree = "<group>"; };
B0056D8B11F3868000754B65 /* IOAHCIBlockStorageInjector.kext */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.kernel-extension"; path = IOAHCIBlockStorageInjector.kext; sourceTree = "<group>"; };
B0056D8C11F3868000754B65 /* JMicronATAInjector.kext */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.kernel-extension"; path = JMicronATAInjector.kext; sourceTree = "<group>"; };
B0056D8E11F3868000754B65 /* background.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = background.tiff; sourceTree = "<group>"; };
B0056D9011F3868000754B65 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = English; path = English.lproj/Description.html; sourceTree = "<group>"; };
B0056D9211F3868000754B65 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/License.rtf; sourceTree = "<group>"; };
B0056D9411F3868000754B65 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
B0056D9611F3868000754B65 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.rtfd; name = English; path = English.lproj/Welcome.rtfd; sourceTree = "<group>"; };
B0056D9711F3868000754B65 /* French */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = French; path = French.lproj/Description.html; sourceTree = "<group>"; };
B0056D9811F3868000754B65 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = French; path = French.lproj/License.rtf; sourceTree = "<group>"; };
B0056D9911F3868000754B65 /* French */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/Localizable.strings; sourceTree = "<group>"; };
B0056D9A11F3868000754B65 /* German */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = German; path = German.lproj/Description.html; sourceTree = "<group>"; };
B0056D9B11F3868000754B65 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = German; path = German.lproj/License.rtf; sourceTree = "<group>"; };
B0056D9C11F3868000754B65 /* German */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/Localizable.strings; sourceTree = "<group>"; };
B0056D9D11F3868000754B65 /* Spanish */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = Spanish; path = Spanish.lproj/Description.html; sourceTree = "<group>"; };
B0056D9E11F3868000754B65 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = Spanish; path = Spanish.lproj/License.rtf; sourceTree = "<group>"; };
B0056D9F11F3868000754B65 /* Spanish */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/Localizable.strings; sourceTree = "<group>"; };
B0056DA011F3868000754B65 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = wrapper.rtfd; name = Spanish; path = Spanish.lproj/Welcome.rtfd; sourceTree = "<group>"; };
B0056DA311F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DA511F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DA811F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DAA11F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DAC11F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DAE11F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DB011F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DB211F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DB411F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DB611F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DB811F3868000754B65 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
B0056DB911F3868000754B65 /* smbios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = smbios.plist; sourceTree = "<group>"; };
B0056DBD11F3868000754B65 /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = background.png; sourceTree = "<group>"; };
B0056DBE11F3868000754B65 /* boot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = boot.png; sourceTree = "<group>"; };
B0056DBF11F3868000754B65 /* device_cdrom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_cdrom.png; sourceTree = "<group>"; };
B0056DC011F3868000754B65 /* device_ext3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_ext3.png; sourceTree = "<group>"; };
B0056DC111F3868000754B65 /* device_fat16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_fat16.png; sourceTree = "<group>"; };
B0056DC211F3868000754B65 /* device_fat32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_fat32.png; sourceTree = "<group>"; };
B0056DC311F3868000754B65 /* device_generic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_generic.png; sourceTree = "<group>"; };
B0056DC411F3868000754B65 /* device_hfsplus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_hfsplus.png; sourceTree = "<group>"; };
B0056DC511F3868000754B65 /* device_ntfs.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_ntfs.png; sourceTree = "<group>"; };
B0056DC611F3868000754B65 /* device_scroll_next.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_scroll_next.png; sourceTree = "<group>"; };
B0056DC711F3868000754B65 /* device_scroll_prev.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_scroll_prev.png; sourceTree = "<group>"; };
B0056DC811F3868000754B65 /* device_selection.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_selection.png; sourceTree = "<group>"; };
B0056DC911F3868000754B65 /* font_console.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = font_console.png; sourceTree = "<group>"; };
B0056DCA11F3868000754B65 /* font_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = font_small.png; sourceTree = "<group>"; };
B0056DCB11F3868000754B65 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
B0056DCC11F3868000754B65 /* menu_boot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_boot.png; sourceTree = "<group>"; };
B0056DCD11F3868000754B65 /* menu_help.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_help.png; sourceTree = "<group>"; };
B0056DCE11F3868000754B65 /* menu_ignore_caches.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_ignore_caches.png; sourceTree = "<group>"; };
B0056DCF11F3868000754B65 /* menu_ignore_caches_disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_ignore_caches_disabled.png; sourceTree = "<group>"; };
B0056DD011F3868000754B65 /* menu_memory_info.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_memory_info.png; sourceTree = "<group>"; };
B0056DD111F3868000754B65 /* menu_selection.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_selection.png; sourceTree = "<group>"; };
B0056DD211F3868000754B65 /* menu_single_user.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_single_user.png; sourceTree = "<group>"; };
B0056DD311F3868000754B65 /* menu_single_user_disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_single_user_disabled.png; sourceTree = "<group>"; };
B0056DD411F3868000754B65 /* menu_verbose.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_verbose.png; sourceTree = "<group>"; };
B0056DD511F3868000754B65 /* menu_verbose_disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_verbose_disabled.png; sourceTree = "<group>"; };
B0056DD611F3868000754B65 /* menu_video_info.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_video_info.png; sourceTree = "<group>"; };
B0056DD711F3868000754B65 /* progress_bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progress_bar.png; sourceTree = "<group>"; };
B0056DD811F3868000754B65 /* progress_bar_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progress_bar_background.png; sourceTree = "<group>"; };
B0056DD911F3868000754B65 /* text_scroll_next.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = text_scroll_next.png; sourceTree = "<group>"; };
B0056DDA11F3868000754B65 /* text_scroll_prev.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = text_scroll_prev.png; sourceTree = "<group>"; };
B0056DDB11F3868000754B65 /* theme.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = theme.plist; sourceTree = "<group>"; };
B0056DDD11F3868000754B65 /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = background.png; sourceTree = "<group>"; };
B0056DDE11F3868000754B65 /* boot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = boot.png; sourceTree = "<group>"; };
B0056DDF11F3868000754B65 /* device_cdrom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_cdrom.png; sourceTree = "<group>"; };
B0056DE011F3868000754B65 /* device_ext3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_ext3.png; sourceTree = "<group>"; };
B0056DE111F3868000754B65 /* device_fat16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_fat16.png; sourceTree = "<group>"; };
B0056DE211F3868000754B65 /* device_fat32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_fat32.png; sourceTree = "<group>"; };
B0056DE311F3868000754B65 /* device_generic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_generic.png; sourceTree = "<group>"; };
B0056DE411F3868000754B65 /* device_hfsplus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_hfsplus.png; sourceTree = "<group>"; };
B0056DE511F3868000754B65 /* device_ntfs.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_ntfs.png; sourceTree = "<group>"; };
B0056DE611F3868000754B65 /* device_scroll_next.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_scroll_next.png; sourceTree = "<group>"; };
B0056DE711F3868000754B65 /* device_scroll_prev.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_scroll_prev.png; sourceTree = "<group>"; };
B0056DE811F3868000754B65 /* device_selection.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = device_selection.png; sourceTree = "<group>"; };
B0056DE911F3868000754B65 /* font_console.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = font_console.png; sourceTree = "<group>"; };
B0056DEA11F3868000754B65 /* font_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = font_small.png; sourceTree = "<group>"; };
B0056DEB11F3868000754B65 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
B0056DEC11F3868000754B65 /* menu_boot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_boot.png; sourceTree = "<group>"; };
B0056DED11F3868000754B65 /* menu_help.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_help.png; sourceTree = "<group>"; };
B0056DEE11F3868000754B65 /* menu_ignore_caches.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_ignore_caches.png; sourceTree = "<group>"; };
B0056DEF11F3868000754B65 /* menu_ignore_caches_disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_ignore_caches_disabled.png; sourceTree = "<group>"; };
B0056DF011F3868000754B65 /* menu_memory_info.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_memory_info.png; sourceTree = "<group>"; };
B0056DF111F3868000754B65 /* menu_selection.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_selection.png; sourceTree = "<group>"; };
B0056DF211F3868000754B65 /* menu_single_user.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_single_user.png; sourceTree = "<group>"; };
B0056DF311F3868000754B65 /* menu_single_user_disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_single_user_disabled.png; sourceTree = "<group>"; };
B0056DF411F3868000754B65 /* menu_verbose.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_verbose.png; sourceTree = "<group>"; };
B0056DF511F3868000754B65 /* menu_verbose_disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_verbose_disabled.png; sourceTree = "<group>"; };
B0056DF611F3868000754B65 /* menu_video_info.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_video_info.png; sourceTree = "<group>"; };
B0056DF711F3868000754B65 /* progress_bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progress_bar.png; sourceTree = "<group>"; };
B0056DF811F3868000754B65 /* progress_bar_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progress_bar_background.png; sourceTree = "<group>"; };
B0056DF911F3868000754B65 /* text_scroll_next.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = text_scroll_next.png; sourceTree = "<group>"; };
B0056DFA11F3868000754B65 /* text_scroll_prev.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = text_scroll_prev.png; sourceTree = "<group>"; };
B0056DFB11F3868000754B65 /* theme.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = theme.plist; sourceTree = "<group>"; };
B0056DFD11F3868000754B65 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
B0056DFE11F3868000754B65 /* theme.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = theme.plist; sourceTree = "<group>"; };
B0056E0011F3868000754B65 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
B0056E0111F3868000754B65 /* theme.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = theme.plist; sourceTree = "<group>"; };
B0056E0311F3868000754B65 /* font_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = font_small.png; sourceTree = "<group>"; };
B0056E0411F3868000754B65 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
B0056E0511F3868000754B65 /* theme.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = theme.plist; sourceTree = "<group>"; };
B0056E0811F3868000754B65 /* Users_Guide0.4.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = Users_Guide0.4.pdf; sourceTree = "<group>"; };
B0056E0911F3868000754B65 /* Users_Guide_v0.3.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = Users_Guide_v0.3.pdf; sourceTree = "<group>"; };
B0056E0A11F3868000754B65 /* UsersGuide-v0.2.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "UsersGuide-v0.2.pdf"; sourceTree = "<group>"; };
B0056E0B11F3868000754B65 /* BootHelp.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BootHelp.txt; sourceTree = "<group>"; };
B0056E0C11F3868000754B65 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
B0056E0D11F3868000754B65 /* themeinfo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = themeinfo.png; sourceTree = "<group>"; };
B0056E0F11F3868000754B65 /* Chameleon 2 v0.4.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Chameleon 2 v0.4.xml"; sourceTree = "<group>"; };
B0056E1011F3868000754B65 /* Chameleon 2 v0.5.docx */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Chameleon 2 v0.5.docx"; sourceTree = "<group>"; };
B0056E1111F3868000754B65 /* chameleon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = chameleon.png; sourceTree = "<group>"; };
B0056E1211F3868000754B65 /* colorchart.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorchart.png; sourceTree = "<group>"; };
B0056E1311F3868000754B65 /* install_complete.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = install_complete.png; sourceTree = "<group>"; };
B0056E1411F3868000754B65 /* install_cust.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = install_cust.png; sourceTree = "<group>"; };
B0056E1511F3868000754B65 /* install_dest.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = install_dest.png; sourceTree = "<group>"; };
B0056E1611F3868000754B65 /* install_stand.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = install_stand.png; sourceTree = "<group>"; };
B0056E1711F3868000754B65 /* install_start.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = install_start.png; sourceTree = "<group>"; };
B0056E1811F3868000754B65 /* screen_format.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = screen_format.png; sourceTree = "<group>"; };
B0056E1911F3868000754B65 /* xnulogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = xnulogo.png; sourceTree = "<group>"; };
B0056E1A11F3868000754B65 /* Users_Guide0.5.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = Users_Guide0.5.pdf; sourceTree = "<group>"; };
B00F494911F6089500B1D7C5 /* aml_generator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aml_generator.h; sourceTree = "<group>"; };
B00F494A11F6089500B1D7C5 /* aml_generator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aml_generator.c; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
08FB7794FE84155DC02AAC07 /* Chameleon */ = {
isa = PBXGroup;
children = (
B0056DBA11F3868000754B65 /* artwork */,
B0056E0611F3868000754B65 /* doc */,
B0056CE511F3868000754B65 /* i386 */,
B0056D8311F3868000754B65 /* package */,
B0056CD411F3868000754B65 /* sym */,
B0056D7C11F3868000754B65 /* TODO */,
B0056D7D11F3868000754B65 /* Makefile */,
B0056D7E11F3868000754B65 /* efisysinst.sh */,
B0056D7F11F3868000754B65 /* CREDITS */,
B0056D8011F3868000754B65 /* coding_standards.txt */,
B0056D8111F3868000754B65 /* CHANGES */,
B0056D8211F3868000754B65 /* APPLE_LICENSE */,
);
name = Chameleon;
sourceTree = "<group>";
};
B0056CD411F3868000754B65 /* sym */ = {
isa = PBXGroup;
children = (
B0056CD511F3868000754B65 /* i386 */,
);
path = sym;
sourceTree = "<group>";
};
B0056CD511F3868000754B65 /* i386 */ = {
isa = PBXGroup;
children = (
B0056CD611F3868000754B65 /* boot */,
B0056CD711F3868000754B65 /* boot.sys */,
B0056CD811F3868000754B65 /* boot0 */,
B0056CD911F3868000754B65 /* boot0hfs */,
B0056CDA11F3868000754B65 /* boot1f32 */,
B0056CDB11F3868000754B65 /* boot1h */,
B0056CDC11F3868000754B65 /* boot1he */,
B0056CDD11F3868000754B65 /* boot1hp */,
B0056CDE11F3868000754B65 /* cdboot */,
B0056CDF11F3868000754B65 /* chain0 */,
B0056CE011F3868000754B65 /* embedded.h */,
B0056CE111F3868000754B65 /* libsa.a */,
B0056CE211F3868000754B65 /* libsaio.a */,
B0056CE311F3868000754B65 /* machOconv */,
B0056CE411F3868000754B65 /* vers.h */,
);
path = i386;
sourceTree = "<group>";
};
B0056CE511F3868000754B65 /* i386 */ = {
isa = PBXGroup;
children = (
B0056CE611F3868000754B65 /* boot0 */,
B0056CEA11F3868000754B65 /* boot1 */,
B0056CF211F3868000754B65 /* boot2 */,
B0056D0F11F3868000754B65 /* cdboot */,
B0056D1311F3868000754B65 /* doc */,
B0056D1611F3868000754B65 /* libsa */,
B0056D2411F3868000754B65 /* libsaio */,
B0056D7911F3868000754B65 /* util */,
B0056D7611F3868000754B65 /* Makefile */,
B0056D7711F3868000754B65 /* MakeInc.dir */,
B0056D7811F3868000754B65 /* MakePaths.dir */,
);
path = i386;
sourceTree = "<group>";
};
B0056CE611F3868000754B65 /* boot0 */ = {
isa = PBXGroup;
children = (
B0056CE711F3868000754B65 /* boot0.s */,
B0056CE811F3868000754B65 /* chain0.s */,
B0056CE911F3868000754B65 /* Makefile */,
);
path = boot0;
sourceTree = "<group>";
};
B0056CEA11F3868000754B65 /* boot1 */ = {
isa = PBXGroup;
children = (
B0056CEB11F3868000754B65 /* boot1.asm */,
B0056CEC11F3868000754B65 /* boot1.s */,
B0056CED11F3868000754B65 /* boot1f32-install.sh */,
B0056CEE11F3868000754B65 /* boot1f32.s */,
B0056CEF11F3868000754B65 /* boot1he.s */,
B0056CF011F3868000754B65 /* boot1hp.s */,
B0056CF111F3868000754B65 /* Makefile */,
);
path = boot1;
sourceTree = "<group>";
};
B0056CF211F3868000754B65 /* boot2 */ = {
isa = PBXGroup;
children = (
B0056CF311F3868000754B65 /* appleboot.h */,
B0056CF411F3868000754B65 /* appleClut8.h */,
B0056CF511F3868000754B65 /* bmdecompress.c */,
B0056CF611F3868000754B65 /* boot.c */,
B0056CF711F3868000754B65 /* boot.h */,
B0056CF811F3868000754B65 /* boot2.s */,
B0056CF911F3868000754B65 /* drivers.c */,
B0056CFA11F3868000754B65 /* graphic_utils.c */,
B0056CFB11F3868000754B65 /* graphic_utils.h */,
B0056CFC11F3868000754B65 /* graphics.c */,
B0056CFD11F3868000754B65 /* graphics.h */,
B0056CFE11F3868000754B65 /* gui.c */,
B0056CFF11F3868000754B65 /* gui.h */,
B0056D0011F3868000754B65 /* IOHibernatePrivate.h */,
B0056D0111F3868000754B65 /* lzss.c */,
B0056D0211F3868000754B65 /* Makefile */,
B0056D0311F3868000754B65 /* mboot.c */,
B0056D0411F3868000754B65 /* mboot.h */,
B0056D0511F3868000754B65 /* multiboot.h */,
B0056D0611F3868000754B65 /* options.c */,
B0056D0711F3868000754B65 /* picopng.c */,
B0056D0811F3868000754B65 /* picopng.h */,
B0056D0911F3868000754B65 /* prompt.c */,
B0056D0A11F3868000754B65 /* ramdisk.c */,
B0056D0B11F3868000754B65 /* ramdisk.h */,
B0056D0C11F3868000754B65 /* resume.c */,
B0056D0D11F3868000754B65 /* WKdm.h */,
B0056D0E11F3868000754B65 /* WKdmDecompress.c */,
);
path = boot2;
sourceTree = "<group>";
};
B0056D0F11F3868000754B65 /* cdboot */ = {
isa = PBXGroup;
children = (
B0056D1011F3868000754B65 /* cdboot.s */,
B0056D1111F3868000754B65 /* cdboothdd.s */,
B0056D1211F3868000754B65 /* Makefile */,
);
path = cdboot;
sourceTree = "<group>";
};
B0056D1311F3868000754B65 /* doc */ = {
isa = PBXGroup;
children = (
B0056D1411F3868000754B65 /* Limits */,
B0056D1511F3868000754B65 /* README */,
);
path = doc;
sourceTree = "<group>";
};
B0056D1611F3868000754B65 /* libsa */ = {
isa = PBXGroup;
children = (
B0056D1711F3868000754B65 /* efi_tables.c */,
B0056D1811F3868000754B65 /* efi_tables.h */,
B0056D1911F3868000754B65 /* error.c */,
B0056D1A11F3868000754B65 /* libsa.h */,
B0056D1B11F3868000754B65 /* Makefile */,
B0056D1C11F3868000754B65 /* memory.h */,
B0056D1D11F3868000754B65 /* prf.c */,
B0056D1E11F3868000754B65 /* printf.c */,
B0056D1F11F3868000754B65 /* qsort.c */,
B0056D2011F3868000754B65 /* setjmp.s */,
B0056D2111F3868000754B65 /* string.c */,
B0056D2211F3868000754B65 /* strtol.c */,
B0056D2311F3868000754B65 /* zalloc.c */,
);
path = libsa;
sourceTree = "<group>";
};
B0056D2411F3868000754B65 /* libsaio */ = {
isa = PBXGroup;
children = (
B0056D2511F3868000754B65 /* acpi.h */,
B0056D2611F3868000754B65 /* acpi_patcher.c */,
B0056D2711F3868000754B65 /* acpi_patcher.h */,
B0056D2811F3868000754B65 /* allocate.c */,
B00F494A11F6089500B1D7C5 /* aml_generator.c */,
B00F494911F6089500B1D7C5 /* aml_generator.h */,
B0056D2911F3868000754B65 /* asm.s */,
B0056D2A11F3868000754B65 /* ati.c */,
B0056D2B11F3868000754B65 /* ati.h */,
B0056D2C11F3868000754B65 /* bios.h */,
B0056D2D11F3868000754B65 /* bios.s */,
B0056D2E11F3868000754B65 /* biosfn.c */,
B0056D2F11F3868000754B65 /* bootstruct.c */,
B0056D3011F3868000754B65 /* bootstruct.h */,
B0056D3111F3868000754B65 /* cache.c */,
B0056D3211F3868000754B65 /* console.c */,
B0056D3311F3868000754B65 /* convert.c */,
B0056D3411F3868000754B65 /* convert.h */,
B0056D3511F3868000754B65 /* cpu.c */,
B0056D3611F3868000754B65 /* cpu.h */,
B0056D3711F3868000754B65 /* device_inject.c */,
B0056D3811F3868000754B65 /* device_inject.h */,
B0056D3911F3868000754B65 /* device_tree.c */,
B0056D3A11F3868000754B65 /* device_tree.h */,
B0056D3B11F3868000754B65 /* disk.c */,
B0056D3C11F3868000754B65 /* efi.h */,
B0056D3D11F3868000754B65 /* ext2fs.c */,
B0056D3E11F3868000754B65 /* ext2fs.h */,
B0056D3F11F3868000754B65 /* fake_efi.c */,
B0056D4011F3868000754B65 /* fake_efi.h */,
B0056D4111F3868000754B65 /* fdisk.h */,
B0056D4211F3868000754B65 /* hfs.c */,
B0056D4311F3868000754B65 /* hfs.h */,
B0056D4411F3868000754B65 /* hfs_CaseTables.h */,
B0056D4511F3868000754B65 /* hfs_compare.c */,
B0056D4611F3868000754B65 /* hpet.c */,
B0056D4711F3868000754B65 /* hpet.h */,
B0056D4811F3868000754B65 /* io_inline.h */,
B0056D4911F3868000754B65 /* libsaio.h */,
B0056D4A11F3868000754B65 /* load.c */,
B0056D4B11F3868000754B65 /* Makefile */,
B0056D4C11F3868000754B65 /* md5c.c */,
B0056D4D11F3868000754B65 /* mem.c */,
B0056D4E11F3868000754B65 /* mem.h */,
B0056D4F11F3868000754B65 /* memvendors.h */,
B0056D5011F3868000754B65 /* misc.c */,
B0056D5111F3868000754B65 /* msdos.c */,
B0056D5211F3868000754B65 /* msdos.h */,
B0056D5311F3868000754B65 /* msdos_private.h */,
B0056D5411F3868000754B65 /* nbp.c */,
B0056D5511F3868000754B65 /* nbp_cmd.h */,
B0056D5611F3868000754B65 /* ntfs.c */,
B0056D5711F3868000754B65 /* ntfs.h */,
B0056D5811F3868000754B65 /* ntfs_private.h */,
B0056D5911F3868000754B65 /* nvidia.c */,
B0056D5A11F3868000754B65 /* nvidia.h */,
B0056D5B11F3868000754B65 /* pci.c */,
B0056D5C11F3868000754B65 /* pci.h */,
B0056D5D11F3868000754B65 /* pci_root.c */,
B0056D5E11F3868000754B65 /* pci_root.h */,
B0056D5F11F3868000754B65 /* pci_setup.c */,
B0056D6011F3868000754B65 /* platform.c */,
B0056D6111F3868000754B65 /* platform.h */,
B0056D6211F3868000754B65 /* saio_internal.h */,
B0056D6311F3868000754B65 /* saio_types.h */,
B0056D6411F3868000754B65 /* sl.h */,
B0056D6511F3868000754B65 /* SMBIOS.h */,
B0056D6611F3868000754B65 /* smbios_patcher.c */,
B0056D6711F3868000754B65 /* smbios_patcher.h */,
B0056D6811F3868000754B65 /* spd.c */,
B0056D6911F3868000754B65 /* spd.h */,
B0056D6A11F3868000754B65 /* stringTable.c */,
B0056D6B11F3868000754B65 /* sys.c */,
B0056D6C11F3868000754B65 /* table.c */,
B0056D6D11F3868000754B65 /* ufs.c */,
B0056D6E11F3868000754B65 /* ufs.h */,
B0056D6F11F3868000754B65 /* ufs_byteorder.c */,
B0056D7011F3868000754B65 /* ufs_byteorder.h */,
B0056D7111F3868000754B65 /* usb.c */,
B0056D7211F3868000754B65 /* vbe.c */,
B0056D7311F3868000754B65 /* vbe.h */,
B0056D7411F3868000754B65 /* xml.c */,
B0056D7511F3868000754B65 /* xml.h */,
);
path = libsaio;
sourceTree = "<group>";
};
B0056D7911F3868000754B65 /* util */ = {
isa = PBXGroup;
children = (
B0056D7A11F3868000754B65 /* machOconv.c */,
B0056D7B11F3868000754B65 /* Makefile */,
);
path = util;
sourceTree = "<group>";
};
B0056D8311F3868000754B65 /* package */ = {
isa = PBXGroup;
children = (
B0056D8411F3868000754B65 /* buildpkg */,
B0056D8511F3868000754B65 /* Distribution */,
B0056D8611F3868000754B65 /* fdisk */,
B0056D8711F3868000754B65 /* Kexts */,
B0056D8D11F3868000754B65 /* Resources */,
B0056DA111F3868000754B65 /* Scripts */,
B0056DB911F3868000754B65 /* smbios.plist */,
);
path = package;
sourceTree = "<group>";
};
B0056D8711F3868000754B65 /* Kexts */ = {
isa = PBXGroup;
children = (
B0056D8811F3868000754B65 /* AHCIPortInjector.kext */,
B0056D8911F3868000754B65 /* ATAPortInjector.kext */,
B0056D8A11F3868000754B65 /* Disabler.kext */,
B0056D8B11F3868000754B65 /* IOAHCIBlockStorageInjector.kext */,
B0056D8C11F3868000754B65 /* JMicronATAInjector.kext */,
);
path = Kexts;
sourceTree = "<group>";
};
B0056D8D11F3868000754B65 /* Resources */ = {
isa = PBXGroup;
children = (
B0056D8E11F3868000754B65 /* background.tiff */,
B0056D8F11F3868000754B65 /* Description.html */,
B0056D9111F3868000754B65 /* License.rtf */,
B0056D9311F3868000754B65 /* Localizable.strings */,
B0056D9511F3868000754B65 /* Welcome.rtfd */,
);
path = Resources;
sourceTree = "<group>";
};
B0056DA111F3868000754B65 /* Scripts */ = {
isa = PBXGroup;
children = (
B0056DA211F3868000754B65 /* FAT */,
B0056DA411F3868000754B65 /* HFS */,
B0056DA611F3868000754B65 /* Options */,
B0056DB511F3868000754B65 /* Post */,
B0056DB711F3868000754B65 /* Standard */,
);
path = Scripts;
sourceTree = "<group>";
};
B0056DA211F3868000754B65 /* FAT */ = {
isa = PBXGroup;
children = (
B0056DA311F3868000754B65 /* postinstall */,
);
path = FAT;
sourceTree = "<group>";
};
B0056DA411F3868000754B65 /* HFS */ = {
isa = PBXGroup;
children = (
B0056DA511F3868000754B65 /* postinstall */,
);
path = HFS;
sourceTree = "<group>";
};
B0056DA611F3868000754B65 /* Options */ = {
isa = PBXGroup;
children = (
B0056DA711F3868000754B65 /* EHCIacquire */,
B0056DA911F3868000754B65 /* EthernetBuiltIn */,
B0056DAB11F3868000754B65 /* ForceHPET */,
B0056DAD11F3868000754B65 /* ForceWake */,
B0056DAF11F3868000754B65 /* GraphicsEnabler */,
B0056DB111F3868000754B65 /* GUI */,
B0056DB311F3868000754B65 /* UHCIreset */,
);
path = Options;
sourceTree = "<group>";
};
B0056DA711F3868000754B65 /* EHCIacquire */ = {
isa = PBXGroup;
children = (
B0056DA811F3868000754B65 /* postinstall */,
);
path = EHCIacquire;
sourceTree = "<group>";
};
B0056DA911F3868000754B65 /* EthernetBuiltIn */ = {
isa = PBXGroup;
children = (
B0056DAA11F3868000754B65 /* postinstall */,
);
path = EthernetBuiltIn;
sourceTree = "<group>";
};
B0056DAB11F3868000754B65 /* ForceHPET */ = {
isa = PBXGroup;
children = (
B0056DAC11F3868000754B65 /* postinstall */,
);
path = ForceHPET;
sourceTree = "<group>";
};
B0056DAD11F3868000754B65 /* ForceWake */ = {
isa = PBXGroup;
children = (
B0056DAE11F3868000754B65 /* postinstall */,
);
path = ForceWake;
sourceTree = "<group>";
};
B0056DAF11F3868000754B65 /* GraphicsEnabler */ = {
isa = PBXGroup;
children = (
B0056DB011F3868000754B65 /* postinstall */,
);
path = GraphicsEnabler;
sourceTree = "<group>";
};
B0056DB111F3868000754B65 /* GUI */ = {
isa = PBXGroup;
children = (
B0056DB211F3868000754B65 /* postinstall */,
);
path = GUI;
sourceTree = "<group>";
};
B0056DB311F3868000754B65 /* UHCIreset */ = {
isa = PBXGroup;
children = (
B0056DB411F3868000754B65 /* postinstall */,
);
path = UHCIreset;
sourceTree = "<group>";
};
B0056DB511F3868000754B65 /* Post */ = {
isa = PBXGroup;
children = (
B0056DB611F3868000754B65 /* postinstall */,
);
path = Post;
sourceTree = "<group>";
};
B0056DB711F3868000754B65 /* Standard */ = {
isa = PBXGroup;
children = (
B0056DB811F3868000754B65 /* postinstall */,
);
path = Standard;
sourceTree = "<group>";
};
B0056DBA11F3868000754B65 /* artwork */ = {
isa = PBXGroup;
children = (
B0056DBB11F3868000754B65 /* themes */,
);
path = artwork;
sourceTree = "<group>";
};
B0056DBB11F3868000754B65 /* themes */ = {
isa = PBXGroup;
children = (
B0056DBC11F3868000754B65 /* bullet */,
B0056DDC11F3868000754B65 /* default */,
B0056DFC11F3868000754B65 /* msi_netbook */,
B0056DFF11F3868000754B65 /* pinktink */,
B0056E0211F3868000754B65 /* twilight */,
);
path = themes;
sourceTree = "<group>";
};
B0056DBC11F3868000754B65 /* bullet */ = {
isa = PBXGroup;
children = (
B0056DBD11F3868000754B65 /* background.png */,
B0056DBE11F3868000754B65 /* boot.png */,
B0056DBF11F3868000754B65 /* device_cdrom.png */,
B0056DC011F3868000754B65 /* device_ext3.png */,
B0056DC111F3868000754B65 /* device_fat16.png */,
B0056DC211F3868000754B65 /* device_fat32.png */,
B0056DC311F3868000754B65 /* device_generic.png */,
B0056DC411F3868000754B65 /* device_hfsplus.png */,
B0056DC511F3868000754B65 /* device_ntfs.png */,
B0056DC611F3868000754B65 /* device_scroll_next.png */,
B0056DC711F3868000754B65 /* device_scroll_prev.png */,
B0056DC811F3868000754B65 /* device_selection.png */,
B0056DC911F3868000754B65 /* font_console.png */,
B0056DCA11F3868000754B65 /* font_small.png */,
B0056DCB11F3868000754B65 /* logo.png */,
B0056DCC11F3868000754B65 /* menu_boot.png */,
B0056DCD11F3868000754B65 /* menu_help.png */,
B0056DCE11F3868000754B65 /* menu_ignore_caches.png */,
B0056DCF11F3868000754B65 /* menu_ignore_caches_disabled.png */,
B0056DD011F3868000754B65 /* menu_memory_info.png */,
B0056DD111F3868000754B65 /* menu_selection.png */,
B0056DD211F3868000754B65 /* menu_single_user.png */,
B0056DD311F3868000754B65 /* menu_single_user_disabled.png */,
B0056DD411F3868000754B65 /* menu_verbose.png */,
B0056DD511F3868000754B65 /* menu_verbose_disabled.png */,
B0056DD611F3868000754B65 /* menu_video_info.png */,
B0056DD711F3868000754B65 /* progress_bar.png */,
B0056DD811F3868000754B65 /* progress_bar_background.png */,
B0056DD911F3868000754B65 /* text_scroll_next.png */,
B0056DDA11F3868000754B65 /* text_scroll_prev.png */,
B0056DDB11F3868000754B65 /* theme.plist */,
);
path = bullet;
sourceTree = "<group>";
};
B0056DDC11F3868000754B65 /* default */ = {
isa = PBXGroup;
children = (
B0056DDD11F3868000754B65 /* background.png */,
B0056DDE11F3868000754B65 /* boot.png */,
B0056DDF11F3868000754B65 /* device_cdrom.png */,
B0056DE011F3868000754B65 /* device_ext3.png */,
B0056DE111F3868000754B65 /* device_fat16.png */,
B0056DE211F3868000754B65 /* device_fat32.png */,
B0056DE311F3868000754B65 /* device_generic.png */,
B0056DE411F3868000754B65 /* device_hfsplus.png */,
B0056DE511F3868000754B65 /* device_ntfs.png */,
B0056DE611F3868000754B65 /* device_scroll_next.png */,
B0056DE711F3868000754B65 /* device_scroll_prev.png */,
B0056DE811F3868000754B65 /* device_selection.png */,
B0056DE911F3868000754B65 /* font_console.png */,
B0056DEA11F3868000754B65 /* font_small.png */,
B0056DEB11F3868000754B65 /* logo.png */,
B0056DEC11F3868000754B65 /* menu_boot.png */,
B0056DED11F3868000754B65 /* menu_help.png */,
B0056DEE11F3868000754B65 /* menu_ignore_caches.png */,
B0056DEF11F3868000754B65 /* menu_ignore_caches_disabled.png */,
B0056DF011F3868000754B65 /* menu_memory_info.png */,
B0056DF111F3868000754B65 /* menu_selection.png */,
B0056DF211F3868000754B65 /* menu_single_user.png */,
B0056DF311F3868000754B65 /* menu_single_user_disabled.png */,
B0056DF411F3868000754B65 /* menu_verbose.png */,
B0056DF511F3868000754B65 /* menu_verbose_disabled.png */,
B0056DF611F3868000754B65 /* menu_video_info.png */,
B0056DF711F3868000754B65 /* progress_bar.png */,
B0056DF811F3868000754B65 /* progress_bar_background.png */,
B0056DF911F3868000754B65 /* text_scroll_next.png */,
B0056DFA11F3868000754B65 /* text_scroll_prev.png */,
B0056DFB11F3868000754B65 /* theme.plist */,
);
path = default;
sourceTree = "<group>";
};
B0056DFC11F3868000754B65 /* msi_netbook */ = {
isa = PBXGroup;
children = (
B0056DFD11F3868000754B65 /* logo.png */,
B0056DFE11F3868000754B65 /* theme.plist */,
);
path = msi_netbook;
sourceTree = "<group>";
};
B0056DFF11F3868000754B65 /* pinktink */ = {
isa = PBXGroup;
children = (
B0056E0011F3868000754B65 /* logo.png */,
B0056E0111F3868000754B65 /* theme.plist */,
);
path = pinktink;
sourceTree = "<group>";
};
B0056E0211F3868000754B65 /* twilight */ = {
isa = PBXGroup;
children = (
B0056E0311F3868000754B65 /* font_small.png */,
B0056E0411F3868000754B65 /* logo.png */,
B0056E0511F3868000754B65 /* theme.plist */,
);
path = twilight;
sourceTree = "<group>";
};
B0056E0611F3868000754B65 /* doc */ = {
isa = PBXGroup;
children = (
B0056E0711F3868000754B65 /* archive */,
B0056E0B11F3868000754B65 /* BootHelp.txt */,
B0056E0C11F3868000754B65 /* README */,
B0056E0D11F3868000754B65 /* themeinfo.png */,
B0056E0E11F3868000754B65 /* User_Guide_src */,
B0056E1A11F3868000754B65 /* Users_Guide0.5.pdf */,
);
path = doc;
sourceTree = "<group>";
};
B0056E0711F3868000754B65 /* archive */ = {
isa = PBXGroup;
children = (
B0056E0811F3868000754B65 /* Users_Guide0.4.pdf */,
B0056E0911F3868000754B65 /* Users_Guide_v0.3.pdf */,
B0056E0A11F3868000754B65 /* UsersGuide-v0.2.pdf */,
);
path = archive;
sourceTree = "<group>";
};
B0056E0E11F3868000754B65 /* User_Guide_src */ = {
isa = PBXGroup;
children = (
B0056E0F11F3868000754B65 /* Chameleon 2 v0.4.xml */,
B0056E1011F3868000754B65 /* Chameleon 2 v0.5.docx */,
B0056E1111F3868000754B65 /* chameleon.png */,
B0056E1211F3868000754B65 /* colorchart.png */,
B0056E1311F3868000754B65 /* install_complete.png */,
B0056E1411F3868000754B65 /* install_cust.png */,
B0056E1511F3868000754B65 /* install_dest.png */,
B0056E1611F3868000754B65 /* install_stand.png */,
B0056E1711F3868000754B65 /* install_start.png */,
B0056E1811F3868000754B65 /* screen_format.png */,
B0056E1911F3868000754B65 /* xnulogo.png */,
);
path = User_Guide_src;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXLegacyTarget section */
D28A88AD04BDD90700651E21 /* Chameleon */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION)";
buildConfigurationList = 1DEB918F08733D9F0010E9CD /* Build configuration list for PBXLegacyTarget "Chameleon" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
buildWorkingDirectory = "";
dependencies = (
);
name = Chameleon;
passBuildSettingsInEnvironment = 1;
productName = Chameleon;
};
/* End PBXLegacyTarget section */
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "Chameleon" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
Spanish,
);
mainGroup = 08FB7794FE84155DC02AAC07 /* Chameleon */;
projectDirPath = "";
projectRoot = "";
targets = (
D28A88AD04BDD90700651E21 /* Chameleon */,
);
};
/* End PBXProject section */
/* Begin PBXVariantGroup section */
B0056D8F11F3868000754B65 /* Description.html */ = {
isa = PBXVariantGroup;
children = (
B0056D9011F3868000754B65 /* English */,
B0056D9711F3868000754B65 /* French */,
B0056D9A11F3868000754B65 /* German */,
B0056D9D11F3868000754B65 /* Spanish */,
);
name = Description.html;
sourceTree = "<group>";
};
B0056D9111F3868000754B65 /* License.rtf */ = {
isa = PBXVariantGroup;
children = (
B0056D9211F3868000754B65 /* English */,
B0056D9811F3868000754B65 /* French */,
B0056D9B11F3868000754B65 /* German */,
B0056D9E11F3868000754B65 /* Spanish */,
);
name = License.rtf;
sourceTree = "<group>";
};
B0056D9311F3868000754B65 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
B0056D9411F3868000754B65 /* English */,
B0056D9911F3868000754B65 /* French */,
B0056D9C11F3868000754B65 /* German */,
B0056D9F11F3868000754B65 /* Spanish */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
B0056D9511F3868000754B65 /* Welcome.rtfd */ = {
isa = PBXVariantGroup;
children = (
B0056D9611F3868000754B65 /* English */,
B0056DA011F3868000754B65 /* Spanish */,
);
name = Welcome.rtfd;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
1DEB919008733D9F0010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
DEBUGGING_SYMBOLS = YES;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = Chameleon;
};
name = Debug;
};
1DEB919108733D9F0010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = Chameleon;
};
name = Release;
};
1DEB919408733D9F0010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.6;
};
name = Debug;
};
1DEB919508733D9F0010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = macosx10.6;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB918F08733D9F0010E9CD /* Build configuration list for PBXLegacyTarget "Chameleon" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB919008733D9F0010E9CD /* Debug */,
1DEB919108733D9F0010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "Chameleon" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB919408733D9F0010E9CD /* Debug */,
1DEB919508733D9F0010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
}
trunk/i386/libsaio/dsdt_patcher.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
197
198
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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
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
/*
* Copyright 2008 mackerintel
*/
#include "libsaio.h"
#include "boot.h"
#include "bootstruct.h"
#include "acpi.h"
#include "efi_tables.h"
#include "fake_efi.h"
#include "dsdt_patcher.h"
#include "platform.h"
#ifndef DEBUG_DSDT
#define DEBUG_DSDT 0
#endif
#if DEBUG_DSDT==2
#define DBG(x...) {printf(x); sleep(1);}
#elif DEBUG_DSDT==1
#define DBG(x...) printf(x)
#else
#define DBG(x...)
#endif
/* Gets the ACPI 1.0 RSDP address */
static struct acpi_2_rsdp* getAddressOfAcpiTable()
{
/* TODO: Before searching the BIOS space we are supposed to search the first 1K of the EBDA */
void *acpi_addr = (void*)ACPI_RANGE_START;
for(; acpi_addr <= (void*)ACPI_RANGE_END; acpi_addr += 16)
{
if(*(uint64_t *)acpi_addr == ACPI_SIGNATURE_UINT64_LE)
{
uint8_t csum = checksum8(acpi_addr, 20);
if(csum == 0)
{
// Only return the table if it is a true version 1.0 table (Revision 0)
if(((struct acpi_2_rsdp*)acpi_addr)->Revision == 0)
return acpi_addr;
}
}
}
return NULL;
}
/* Gets the ACPI 2.0 RSDP address */
static struct acpi_2_rsdp* getAddressOfAcpi20Table()
{
/* TODO: Before searching the BIOS space we are supposed to search the first 1K of the EBDA */
void *acpi_addr = (void*)ACPI_RANGE_START;
for(; acpi_addr <= (void*)ACPI_RANGE_END; acpi_addr += 16)
{
if(*(uint64_t *)acpi_addr == ACPI_SIGNATURE_UINT64_LE)
{
uint8_t csum = checksum8(acpi_addr, 20);
/* Only assume this is a 2.0 or better table if the revision is greater than 0
* NOTE: ACPI 3.0 spec only seems to say that 1.0 tables have revision 1
* and that the current revision is 2.. I am going to assume that rev > 0 is 2.0.
*/
if(csum == 0 && (((struct acpi_2_rsdp*)acpi_addr)->Revision > 0))
{
uint8_t csum2 = checksum8(acpi_addr, sizeof(struct acpi_2_rsdp));
if(csum2 == 0)
return acpi_addr;
}
}
}
return NULL;
}
/** The folowing ACPI Table search algo. should be reused anywhere needed:*/
int search_and_get_acpi_fd(const char * filename, const char ** outDirspec)
{
int fd = 0;
const char * override_name = NULL;
static char dirspec[512] = "";
int len = 0;
// Try using the file specified with the DSDT option
if (getValueForKey(kDSDT, &override_name, &len, &bootInfo->bootConfig))
{
sprintf(dirspec, "%s", override_name);
fd = open(dirspec, 0);
if (fd >= 0) goto success_fd;
}
// Try finding 'filename' in the usual places
else
{
// Start searching any potential location for ACPI Table
// search the Extra folders first
sprintf(dirspec, "/Extra/%s", filename);
fd = open(dirspec, 0);
if (fd >= 0) goto success_fd;
sprintf(dirspec, "/%s", filename); // search root
fd = open(dirspec, 0);
if (fd >= 0) goto success_fd;
sprintf(dirspec, "bt(0,0)/Extra/%s", filename);
fd = open(dirspec, 0);
if (fd >= 0) goto success_fd;
}
// NOT FOUND:
verbose("ACPI Table not found\n");
if (outDirspec) *outDirspec = "";
return -1;
// FOUND
success_fd:
if (outDirspec) *outDirspec = dirspec;
return fd;
}
void *loadACPITable (const char * filename)
{
void *tableAddr;
const char * dirspec=NULL;
int fd = search_and_get_acpi_fd(filename, &dirspec);
if (fd>=0)
{
tableAddr=(void*)AllocateKernelMemory(file_size (fd));
if (tableAddr)
{
if (read (fd, tableAddr, file_size (fd))!=file_size (fd))
{
printf("Couldn't read table %s\n",dirspec);
free (tableAddr);
close (fd);
return NULL;
}
DBG("Table %s read and stored at: %x\n", dirspec, tableAddr);
close (fd);
return tableAddr;
}
close (fd);
printf("Couldn't allocate memory for table \n", dirspec);
}
return NULL;
}
struct acpi_2_fadt *
patch_fadt(struct acpi_2_fadt *fadt, void *new_dsdt)
{
extern void setupSystemType();
struct acpi_2_fadt *fadt_mod;
bool fadt_rev2_needed = false;
bool fix_restart;
const char * value;
// Restart Fix
if (Platform.CPU.Vendor == 0x756E6547) {/* Intel */
fix_restart = true;
getBoolForKey(kRestartFix, &fix_restart, &bootInfo->bootConfig);
} else {
verbose ("Not an Intel platform: Restart Fix not applied !!!\n");
fix_restart = false;
}
if (fix_restart) fadt_rev2_needed = true;
// Allocate new fadt table
if (fadt->Length < 0x84 && fadt_rev2_needed)
{
fadt_mod=(struct acpi_2_fadt *)AllocateKernelMemory(0x84);
memcpy(fadt_mod, fadt, fadt->Length);
fadt_mod->Length = 0x84;
fadt_mod->Revision = 0x02; // FADT rev 2 (ACPI 1.0B MS extensions)
}
else
{
fadt_mod=(struct acpi_2_fadt *)AllocateKernelMemory(fadt->Length);
memcpy(fadt_mod, fadt, fadt->Length);
}
// Determine system type / PM_Model
if ( (value=getStringForKey(kSystemType, &bootInfo->bootConfig))!=NULL)
{
if (Platform.Type > 6)
{
if(fadt_mod->PM_Profile<=6)
Platform.Type = fadt_mod->PM_Profile; // get the fadt if correct
else
Platform.Type = 1;/* Set a fixed value (Desktop) */
verbose("Error: system-type must be 0..6. Defaulting to %d !\n", Platform.Type);
}
else
Platform.Type = (unsigned char) strtoul(value, NULL, 10);
}
// Set PM_Profile from System-type if only if user wanted this value to be forced
if (fadt_mod->PM_Profile != Platform.Type)
{
if (value)
{ // user has overriden the SystemType so take care of it in FACP
verbose("FADT: changing PM_Profile from 0x%02x to 0x%02x\n", fadt_mod->PM_Profile, Platform.Type);
fadt_mod->PM_Profile = Platform.Type;
}
else
{ // PM_Profile has a different value and no override has been set, so reflect the user value to ioregs
Platform.Type = fadt_mod->PM_Profile <= 6 ? fadt_mod->PM_Profile : 1;
}
}
// We now have to write the systemm-type in ioregs: we cannot do it before in setupDeviceTree()
// because we need to take care of facp original content, if it is correct.
setupSystemType();
// Patch FADT to fix restart
if (fix_restart)
{
fadt_mod->Flags|= 0x400;
fadt_mod->Reset_SpaceID= 0x01; // System I/O
fadt_mod->Reset_BitWidth= 0x08; // 1 byte
fadt_mod->Reset_BitOffset= 0x00; // Offset 0
fadt_mod->Reset_AccessWidth= 0x01; // Byte access
fadt_mod->Reset_Address= 0x0cf9; // Address of the register
fadt_mod->Reset_Value= 0x06; // Value to write to reset the system
verbose("FADT: Restart Fix applied !\n");
}
// Patch DSDT Address
DBG("DSDT: Old @%x,%x, ",fadt_mod->DSDT,fadt_mod->X_DSDT);
fadt_mod->DSDT=(uint32_t)new_dsdt;
if ((uint32_t)(&(fadt_mod->X_DSDT))-(uint32_t)fadt_mod+8<=fadt_mod->Length)
fadt_mod->X_DSDT=(uint32_t)new_dsdt;
DBG("New @%x,%x\n",fadt_mod->DSDT,fadt_mod->X_DSDT);
// Correct the checksum
fadt_mod->Checksum=0;
fadt_mod->Checksum=256-checksum8(fadt_mod,fadt_mod->Length);
return fadt_mod;
}
/* Setup ACPI without replacing DSDT. */
int setupAcpiNoMod()
{
//addConfigurationTable(&gEfiAcpiTableGuid, getAddressOfAcpiTable(), "ACPI");
//addConfigurationTable(&gEfiAcpi20TableGuid, getAddressOfAcpi20Table(), "ACPI_20");
/* XXX aserebln why uint32 cast if pointer is uint64 ? */
acpi10_p = (uint32_t)getAddressOfAcpiTable();
acpi20_p = (uint32_t)getAddressOfAcpi20Table();
addConfigurationTable(&gEfiAcpiTableGuid, &acpi10_p, "ACPI");
if(acpi20_p) addConfigurationTable(&gEfiAcpi20TableGuid, &acpi20_p, "ACPI_20");
return 1;
}
/* Setup ACPI. Replace DSDT if DSDT.aml is found */
int setupAcpi(void)
{
int version;
void *new_dsdt;
bool drop_ssdt;
// Load replacement DSDT
new_dsdt=loadACPITable("DSDT.aml");
if (!new_dsdt)
{
return setupAcpiNoMod();
}
DBG("New DSDT Loaded in memory\n");
{
bool tmp;
drop_ssdt=getBoolForKey(kDropSSDT, &tmp, &bootInfo->bootConfig)&&tmp;
}
// Do the same procedure for both versions of ACPI
for (version=0; version<2; version++) {
struct acpi_2_rsdp *rsdp, *rsdp_mod;
struct acpi_2_rsdt *rsdt, *rsdt_mod;
int rsdplength;
// Find original rsdp
rsdp=(struct acpi_2_rsdp *)(version?getAddressOfAcpi20Table():getAddressOfAcpiTable());
if (!rsdp)
{
DBG("No ACPI version %d found. Ignoring\n", version+1);
if (version)
addConfigurationTable(&gEfiAcpi20TableGuid, NULL, "ACPI_20");
else
addConfigurationTable(&gEfiAcpiTableGuid, NULL, "ACPI");
continue;
}
rsdplength=version?rsdp->Length:20;
DBG("RSDP version %d found @%x. Length=%d\n",version+1,rsdp,rsdplength);
/* FIXME: no check that memory allocation succeeded
* Copy and patch RSDP,RSDT, XSDT and FADT
* For more info see ACPI Specification pages 110 and following
*/
rsdp_mod=(struct acpi_2_rsdp *) AllocateKernelMemory(rsdplength);
memcpy(rsdp_mod, rsdp, rsdplength);
rsdt=(struct acpi_2_rsdt *)(rsdp->RsdtAddress);
DBG("RSDT @%x, Length %d\n",rsdt, rsdt->Length);
if (rsdt && (uint32_t)rsdt !=0xffffffff && rsdt->Length<0x10000)
{
uint32_t *rsdt_entries;
int rsdt_entries_num;
int dropoffset=0, i;
rsdt_mod=(struct acpi_2_rsdt *)AllocateKernelMemory(rsdt->Length);
memcpy (rsdt_mod, rsdt, rsdt->Length);
rsdp_mod->RsdtAddress=(uint32_t)rsdt_mod;
rsdt_entries_num=(rsdt_mod->Length-sizeof(struct acpi_2_rsdt))/4;
rsdt_entries=(uint32_t *)(rsdt_mod+1);
for (i=0;i<rsdt_entries_num;i++)
{
char *table=(char *)(rsdt_entries[i]);
if (!table)
continue;
DBG("TABLE %c%c%c%c,",table[0],table[1],table[2],table[3]);
rsdt_entries[i-dropoffset]=rsdt_entries[i];
if (drop_ssdt && table[0]=='S' && table[1]=='S' && table[2]=='D' && table[3]=='T')
{
dropoffset++;
continue;
}
if (table[0]=='D' && table[1]=='S' && table[2]=='D' && table[3]=='T')
{
DBG("DSDT found\n");
rsdt_entries[i-dropoffset]=(uint32_t)new_dsdt;
continue;
}
if (table[0]=='F' && table[1]=='A' && table[2]=='C' && table[3]=='P')
{
struct acpi_2_fadt *fadt, *fadt_mod;
fadt=(struct acpi_2_fadt *)rsdt_entries[i];
DBG("FADT found @%x, Length %d\n",fadt, fadt->Length);
if (!fadt || (uint32_t)fadt == 0xffffffff || fadt->Length>0x10000)
{
printf("FADT incorrect. Not modified\n");
continue;
}
fadt_mod = patch_fadt(fadt, new_dsdt);
rsdt_entries[i-dropoffset]=(uint32_t)fadt_mod;
continue;
}
}
DBG("\n");
// Correct the checksum of RSDT
rsdt_mod->Length-=4*dropoffset;
DBG("RSDT: Original checksum %d, ", rsdt_mod->Checksum);
rsdt_mod->Checksum=0;
rsdt_mod->Checksum=256-checksum8(rsdt_mod,rsdt_mod->Length);
DBG("New checksum %d at %x\n", rsdt_mod->Checksum,rsdt_mod);
}
else
{
rsdp_mod->RsdtAddress=0;
printf("RSDT not found or RSDT incorrect\n");
}
if (version)
{
struct acpi_2_xsdt *xsdt, *xsdt_mod;
// FIXME: handle 64-bit address correctly
xsdt=(struct acpi_2_xsdt*) ((uint32_t)rsdp->XsdtAddress);
DBG("XSDT @%x;%x, Length=%d\n", (uint32_t)(rsdp->XsdtAddress>>32),(uint32_t)rsdp->XsdtAddress,
xsdt->Length);
if (xsdt && (uint64_t)rsdp->XsdtAddress<0xffffffff && xsdt->Length<0x10000)
{
uint64_t *xsdt_entries;
int xsdt_entries_num, i;
int dropoffset=0;
xsdt_mod=(struct acpi_2_xsdt*)AllocateKernelMemory(xsdt->Length);
memcpy(xsdt_mod, xsdt, xsdt->Length);
rsdp_mod->XsdtAddress=(uint32_t)xsdt_mod;
xsdt_entries_num=(xsdt_mod->Length-sizeof(struct acpi_2_xsdt))/8;
xsdt_entries=(uint64_t *)(xsdt_mod+1);
for (i=0;i<xsdt_entries_num;i++)
{
char *table=(char *)((uint32_t)(xsdt_entries[i]));
if (!table)
continue;
xsdt_entries[i-dropoffset]=xsdt_entries[i];
if (drop_ssdt && table[0]=='S' && table[1]=='S' && table[2]=='D' && table[3]=='T')
{
dropoffset++;
continue;
}
if (table[0]=='D' && table[1]=='S' && table[2]=='D' && table[3]=='T')
{
DBG("DSDT found\n");
xsdt_entries[i-dropoffset]=(uint32_t)new_dsdt;
DBG("TABLE %c%c%c%c@%x,",table[0],table[1],table[2],table[3],xsdt_entries[i]);
continue;
}
if (table[0]=='F' && table[1]=='A' && table[2]=='C' && table[3]=='P')
{
struct acpi_2_fadt *fadt, *fadt_mod;
fadt=(struct acpi_2_fadt *)(uint32_t)xsdt_entries[i];
DBG("FADT found @%x,%x, Length %d\n",(uint32_t)(xsdt_entries[i]>>32),fadt,
fadt->Length);
if (!fadt || (uint64_t)xsdt_entries[i] >= 0xffffffff || fadt->Length>0x10000)
{
verbose("FADT incorrect or after 4GB. Dropping XSDT\n");
goto drop_xsdt;
}
fadt_mod = patch_fadt(fadt, new_dsdt);
xsdt_entries[i-dropoffset]=(uint32_t)fadt_mod;
DBG("TABLE %c%c%c%c@%x,",table[0],table[1],table[2],table[3],xsdt_entries[i]);
continue;
}
DBG("TABLE %c%c%c%c@%x,",table[0],table[1],table[2],table[3],xsdt_entries[i]);
}
// Correct the checksum of XSDT
xsdt_mod->Length-=8*dropoffset;
xsdt_mod->Checksum=0;
xsdt_mod->Checksum=256-checksum8(xsdt_mod,xsdt_mod->Length);
}
else
{
drop_xsdt:
DBG("About to drop XSDT\n");
/*FIXME: Now we just hope that if MacOS doesn't find XSDT it reverts to RSDT.
* A Better strategy would be to generate
*/
rsdp_mod->XsdtAddress=0xffffffffffffffffLL;
verbose("XSDT not found or XSDT incorrect\n");
}
}
// Correct the checksum of RSDP
DBG("RSDP: Original checksum %d, ", rsdp_mod->Checksum);
rsdp_mod->Checksum=0;
rsdp_mod->Checksum=256-checksum8(rsdp_mod,20);
DBG("New checksum %d\n", rsdp_mod->Checksum);
if (version)
{
DBG("RSDP: Original extended checksum %d", rsdp_mod->ExtendedChecksum);
rsdp_mod->ExtendedChecksum=0;
rsdp_mod->ExtendedChecksum=256-checksum8(rsdp_mod,rsdp_mod->Length);
DBG("New extended checksum %d\n", rsdp_mod->ExtendedChecksum);
}
verbose("Patched ACPI version %d DSDT\n", version+1);
if (version)
{
/* XXX aserebln why uint32 cast if pointer is uint64 ? */
acpi20_p = (uint32_t)rsdp_mod;
addConfigurationTable(&gEfiAcpi20TableGuid, &acpi20_p, "ACPI_20");
}
else
{
/* XXX aserebln why uint32 cast if pointer is uint64 ? */
acpi10_p = (uint32_t)rsdp_mod;
addConfigurationTable(&gEfiAcpiTableGuid, &acpi10_p, "ACPI");
}
}
#if DEBUG_DSDT
printf("Press a key to continue... (DEBUG_DSDT)\n");
getc();
#endif
return 1;
}
trunk/i386/libsaio/dsdt_patcher.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
* Copyright 2008 mackerintel
*/
#ifndef __LIBSAIO_DSDT_PATCHER_H
#define __LIBSAIO_DSDT_PATCHER_H
#include "libsaio.h"
uint64_t acpi10_p;
uint64_t acpi20_p;
uint64_t smbios_p;
extern int setupAcpi();
extern EFI_STATUS addConfigurationTable();
extern EFI_GUID gEfiAcpiTableGuid;
extern EFI_GUID gEfiAcpi20TableGuid;
#endif /* !__LIBSAIO_DSDT_PATCHER_H */
trunk/i386/libsaio/acpi_patcher.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
197
198
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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
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
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
/*
* Copyright 2008 mackerintel
*/
#include "libsaio.h"
#include "boot.h"
#include "bootstruct.h"
#include "acpi.h"
#include "efi_tables.h"
#include "fake_efi.h"
#include "acpi_patcher.h"
#include "platform.h"
#include "cpu.h"
#include "aml_generator.h"
#ifndef DEBUG_ACPI
#define DEBUG_ACPI 0
#endif
#if DEBUG_ACPI==2
#define DBG(x...) {printf(x); sleep(1);}
#elif DEBUG_ACPI==1
#define DBG(x...) printf(x)
#else
#define DBG(x...)
#endif
// Slice: New signature compare function
boolean_t tableSign(char *table, const char *sgn)
{
int i;
for (i=0; i<4; i++) {
if ((table[i] &~0x20) != (sgn[i] &~0x20)) {
return FALSE;
}
}
return TRUE;
}
/* Gets the ACPI 1.0 RSDP address */
static struct acpi_2_rsdp* getAddressOfAcpiTable()
{
/* TODO: Before searching the BIOS space we are supposed to search the first 1K of the EBDA */
void *acpi_addr = (void*)ACPI_RANGE_START;
for(; acpi_addr <= (void*)ACPI_RANGE_END; acpi_addr += 16)
{
if(*(uint64_t *)acpi_addr == ACPI_SIGNATURE_UINT64_LE)
{
uint8_t csum = checksum8(acpi_addr, 20);
if(csum == 0)
{
// Only return the table if it is a true version 1.0 table (Revision 0)
if(((struct acpi_2_rsdp*)acpi_addr)->Revision == 0)
return acpi_addr;
}
}
}
return NULL;
}
/* Gets the ACPI 2.0 RSDP address */
static struct acpi_2_rsdp* getAddressOfAcpi20Table()
{
/* TODO: Before searching the BIOS space we are supposed to search the first 1K of the EBDA */
void *acpi_addr = (void*)ACPI_RANGE_START;
for(; acpi_addr <= (void*)ACPI_RANGE_END; acpi_addr += 16)
{
if(*(uint64_t *)acpi_addr == ACPI_SIGNATURE_UINT64_LE)
{
uint8_t csum = checksum8(acpi_addr, 20);
/* Only assume this is a 2.0 or better table if the revision is greater than 0
* NOTE: ACPI 3.0 spec only seems to say that 1.0 tables have revision 1
* and that the current revision is 2.. I am going to assume that rev > 0 is 2.0.
*/
if(csum == 0 && (((struct acpi_2_rsdp*)acpi_addr)->Revision > 0))
{
uint8_t csum2 = checksum8(acpi_addr, sizeof(struct acpi_2_rsdp));
if(csum2 == 0)
return acpi_addr;
}
}
}
return NULL;
}
/** The folowing ACPI Table search algo. should be reused anywhere needed:*/
int search_and_get_acpi_fd(const char * filename, const char ** outDirspec)
{
int fd=0;
const char * overriden_pathname=NULL;
static char dirspec[512]="";
static bool first_time =true;
int len=0;
/// Take in accound user overriding if it's DSDT only
if (strstr(filename, "DSDT") &&
getValueForKey(kDSDT, &overriden_pathname, &len,
&bootInfo->bootConfig))
{
sprintf(dirspec, "%s", overriden_pathname);
fd=open (dirspec,0);
if (fd>=0) goto success_fd;
}
// Check that dirspec is not already assigned with a path
if (!first_time && *dirspec)
{ // it is so start searching this cached patch first
//extract path
for (len=strlen(dirspec)-1; len; len--)
if (dirspec[len]=='/' || len==0)
{
dirspec[len]='\0';
break;
}
// now concat with the filename
strncat(dirspec, "/", sizeof(dirspec));
strncat(dirspec, filename, sizeof(dirspec));
// and test to see if we don't have our big boy here:
fd=open (dirspec,0);
if (fd>=0)
{
// printf("ACPI file search cache hit: file found at %s\n", dirspec);
goto success_fd;
}
}
// Start searching any potential location for ACPI Table
// search the Extra folders first
sprintf(dirspec,"/Extra/%s",filename);
fd=open (dirspec,0);
if (fd>=0) goto success_fd;
sprintf(dirspec,"bt(0,0)/Extra/%s",filename);
fd=open (dirspec,0);
if (fd>=0) goto success_fd;
sprintf(dirspec, "%s", filename); // search current dir
fd=open (dirspec,0);
if (fd>=0) goto success_fd;
sprintf(dirspec, "/%s", filename); // search root
fd=open (dirspec,0);
if (fd>=0) goto success_fd;
// NOT FOUND:
//verbose("ACPI Table not found: %s\n", filename);
if (outDirspec) *outDirspec = "";
first_time = false;
return -1;
// FOUND
success_fd:
first_time = false;
if (outDirspec) *outDirspec = dirspec;
return fd;
}
void *loadACPITable (const char * filename)
{
void *tableAddr;
const char * dirspec=NULL;
int fd = search_and_get_acpi_fd(filename, &dirspec);
if (fd>=0)
{
tableAddr=(void*)AllocateKernelMemory(file_size (fd));
if (tableAddr)
{
if (read (fd, tableAddr, file_size (fd))!=file_size (fd))
{
printf("Couldn't read table %s\n",dirspec);
free (tableAddr);
close (fd);
return NULL;
}
DBG("Table %s read and stored at: %x\n", dirspec, tableAddr);
close (fd);
return tableAddr;
}
close (fd);
printf("Couldn't allocate memory for table \n", dirspec);
}
//printf("Couldn't find table %s\n", filename);
return NULL;
}
uint8_tacpi_cpu_count = 0;
char* acpi_cpu_name[32];
void find_acpi_cpu_names(unsigned char* dsdt, int length)
{
int i;
for (i=0; i<length-7; i++)
{
if (dsdt[i] == 0x83 && dsdt[i+1] == 0x0B && dsdt[i+6] < 32)
{
acpi_cpu_name[acpi_cpu_count] = malloc(5);
int j;
for (j=0; j<4; j++)
{
if (aml_isvalidchar(dsdt[i+2+j]))
{
acpi_cpu_name[acpi_cpu_count][j] = dsdt[i+2+j];
}
else
{
verbose("Invalid characters found in ProcessorOP!");
free(acpi_cpu_name[acpi_cpu_count]);
continue;
}
}
verbose("Found %c%c%c%c (from DSDT)\n", acpi_cpu_name[acpi_cpu_count][0], acpi_cpu_name[acpi_cpu_count][1], acpi_cpu_name[acpi_cpu_count][2], acpi_cpu_name[acpi_cpu_count][3]);
acpi_cpu_count++;
}
}
}
struct acpi_2_ssdt *generate_cst_ssdt(struct acpi_2_fadt* fadt)
{
char ssdt_header[] =
{
0x53, 0x53, 0x44, 0x54, 0xE7, 0x00, 0x00, 0x00, /* SSDT.... */
0x01, 0x17, 0x50, 0x6D, 0x52, 0x65, 0x66, 0x41, /* ..PmRefA */
0x43, 0x70, 0x75, 0x43, 0x73, 0x74, 0x00, 0x00, /* CpuCst.. */
0x00, 0x10, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, /* ....INTL */
0x31, 0x03, 0x10, 0x20 /* 1.._*/
};
char chunk_name_body[] =
{
0x5C, 0x5F, 0x50, 0x52, 0x5F, 0x08, 0x43, 0x53, /* \_PR_.CS */
0x54, 0x5F/* T_*/
};
char chunk_c1[] =
{
0x12, 0x1C, 0x04, 0x11, 0x14, 0x0A, 0x11, 0x82,
0x0C, 0x00, 0x7F, 0x01, 0x02, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00,
0x01, 0x01, 0x0B, 0xE8, 0x03
};
char chunk_c2[] =
{
0x12, 0x1E, 0x04, 0x11, 0x14, 0x0A, 0x11, 0x82,
0x0C, 0x00, 0x7F, 0x01, 0x02, 0x01, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00,
0x0A, 0x02, 0x0A, 0x40, 0x0B, 0xF4, 0x01
};
char chunk_c3[] =
{
0x12, 0x1F, 0x04, 0x11, 0x14, 0x0A, 0x11, 0x82,
0x0C, 0x00, 0x7F, 0x01, 0x02, 0x01, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00,
0x0A, 0x03, 0x0B, 0x60, 0x03, 0x0B, 0x5E, 0x01
};
char chunk_alias[] =
{
0x10, 0x14, 0x5C, 0x2E, 0x5F, 0x50, 0x52, 0x5F, /* ..\._PR_ */
0x43, 0x50, 0x55, 0x30, 0x06, 0x43, 0x53, 0x54, /* CPU0.CST */
0x5F, 0x5F, 0x43, 0x53, 0x54/* __CST*/
};
if (fadt == NULL) {
verbose ("FACP not exists: C-States not generated !!!\n");
return NULL;
}
struct acpi_2_dsdt* dsdt = (void*)fadt->DSDT;
if (dsdt == NULL) {
verbose ("DSDT not found: C-States not generated !!!\n");
return NULL;
}
if (acpi_cpu_count == 0)
find_acpi_cpu_names((void*)dsdt, dsdt->Length);
if (acpi_cpu_count > 0) {
bool c2_enabled = fadt->C2_Latency < 100, c3_enabled = fadt->C3_Latency < 1000;
// Setup C2 Latency
if (c2_enabled)
chunk_c2[27] = fadt->C2_Latency & 0xff;
// Setup C3 Latency
if (c3_enabled) {
chunk_c3[27] = fadt->C3_Latency & 0xff;
chunk_c3[28] = (fadt->C3_Latency >> 8) & 0xff;
}
// Generating SSDT
uint32_t package_length =
4 +
sizeof(chunk_c1) +
c2_enabled * sizeof(chunk_c2) +
c3_enabled * sizeof(chunk_c3);
if (package_length > 0x3f)
package_length++;
uint32_t name_length =
1 +
sizeof(chunk_name_body) +
1 + package_length;
if (name_length > 0x3f)
name_length++;
uint32_t ssdt_size =
sizeof(ssdt_header) +
1 + name_length +
acpi_cpu_count * sizeof(chunk_alias);
struct acpi_2_ssdt *ssdt = (void*)AllocateKernelMemory(ssdt_size);
int fd = openmem((char*)ssdt, ssdt_size);
// Header
write(fd, ssdt_header, sizeof(ssdt_header));
// Scope (\_PR) { Name (CST
writebyte(fd, 0x10); // id
if (name_length > 0x3f)
{
writebyte(fd, 0x40 | (name_length & 0xf)); // lo half-byte
writebyte(fd, name_length >> 4); // hi byte
}
else
{
writebyte(fd, name_length); // length
}
write(fd, chunk_name_body, sizeof(chunk_name_body));
//Package (0x04) { 0x03,
writebyte(fd, 0x12); // id
if (package_length > 0x3f)
{
writebyte(fd, 0x40 | (package_length & 0xf)); // lo half-byte
writebyte(fd, package_length >> 4); // hi byte
}
else
{
writebyte(fd, package_length); // length
}
uint8_t cstates_count = 1 + c2_enabled + c3_enabled;
writebyte(fd, cstates_count + 1);
writebyte(fd, 0x0A); // first entry - number of c-states
writebyte(fd, cstates_count);
// C1
write(fd, chunk_c1, sizeof(chunk_c1));
// C2
if (c2_enabled)
write(fd, chunk_c2, sizeof(chunk_c2));
// C3
if (c3_enabled)
write(fd, chunk_c3, sizeof(chunk_c3));
// Write aliases
int i;
for (i = 0; i < acpi_cpu_count; i++) {
int j;
for (j = 0; j < 4; j++)
chunk_alias[8+j] = acpi_cpu_name[i][j];
write(fd, chunk_alias, sizeof(chunk_alias));
}
close(fd);
ssdt->Length = ssdt_size;
ssdt->Checksum = 0;
ssdt->Checksum = 256 - checksum8(ssdt, ssdt->Length);
//dumpPhysAddr("C-States SSDT content: ", ssdt, ssdt_size);
verbose ("SSDT with CPU C-States generated successfully\n");
return ssdt;
}
else {
verbose ("DSDT CPUs not found: C-States not generated !!!\n");
}
return NULL;
}
struct acpi_2_ssdt *generate_pss_ssdt(struct acpi_2_dsdt* dsdt)
{
char ssdt_header[] =
{
0x53, 0x53, 0x44, 0x54, 0x7E, 0x00, 0x00, 0x00, /* SSDT.... */
0x01, 0x6A, 0x50, 0x6D, 0x52, 0x65, 0x66, 0x00, /* ..PmRef. */
0x43, 0x70, 0x75, 0x50, 0x6D, 0x00, 0x00, 0x00, /* CpuPm... */
0x00, 0x30, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C, /* .0..INTL */
0x31, 0x03, 0x10, 0x20,/* 1.._*/
};
char chunk_name_body[] =
{
0x5C, 0x5F, 0x50, 0x52, 0x5F, 0x08, 0x50, 0x53, /* \_PR_.PS */
0x53, 0x5F/* S_*/
};
char chunk_alias[] =
{
0x10, 0x14, 0x5C, 0x2E, 0x5F, 0x50, 0x52, 0x5F, /* ..\._PR_ */
0x43, 0x50, 0x55, 0x30, 0x06, 0x50, 0x53, 0x53, /* CPU0.PSS */
0x5F, 0x5F, 0x50, 0x53, 0x53/* __PSS*/
};
if (Platform.CPU.Vendor != 0x756E6547) {
verbose ("Not an Intel platform: P-States will not be generated !!!\n");
return NULL;
}
if (!(Platform.CPU.Features & CPU_FEATURE_MSR)) {
verbose ("Unsupported CPU: P-States will not be generated !!!\n");
return NULL;
}
if (acpi_cpu_count == 0)
find_acpi_cpu_names((void*)dsdt, dsdt->Length);
if (acpi_cpu_count > 0)
{
bool cpu_dynamic_fsb = false, cpu_noninteger_bus_ratio = (rdmsr64(MSR_IA32_PERF_STATUS) & (1ULL << 46));
struct p_state initial, maximum, minimum, p_states[32];
uint8_t p_states_count;
// Retrieving P-States, ported from code by superhai (c)
switch (Platform.CPU.Family) {
case 0x06:
{
switch (Platform.CPU.Model)
{
case 0x0F: // Intel Core (65nm)
case 0x17: // Intel Core (45nm)
case 0x1C: // Intel Atom (45nm)
case 0x1A: // Intel Core i7 LGA1366 (45nm)
case 0x1E: // Intel Core i5, i7 LGA1156 (45nm)
case 0x25: // Intel Core i3, i5, i7 LGA1156 (32nm)
case 0x2C: // Intel Core i7 LGA1366 (32nm) 6 Core
if (rdmsr64(MSR_IA32_EXT_CONFIG) & (1 << 27))
{
wrmsr64(MSR_IA32_EXT_CONFIG, (rdmsr64(MSR_IA32_EXT_CONFIG) | (1 << 28)));
delay(1);
cpu_dynamic_fsb = rdmsr64(MSR_IA32_EXT_CONFIG) & (1 << 28);
}
break;
}
}
}
initial.Control = rdmsr64(MSR_IA32_PERF_STATUS);
maximum.Control = ((rdmsr64(MSR_IA32_PERF_STATUS) >> 32) & 0x1F3F) | (0x4000 * cpu_noninteger_bus_ratio);
maximum.CID = ((maximum.FID & 0x1F) << 1) | cpu_noninteger_bus_ratio;
minimum.FID = ((rdmsr64(MSR_IA32_PERF_STATUS) >> 24) & 0x1F) | (0x80 * cpu_dynamic_fsb);
minimum.VID = ((rdmsr64(MSR_IA32_PERF_STATUS) >> 48) & 0x3F);
if (minimum.FID == 0)
{
uint8_t i;
// Probe for lowest fid
for (i = maximum.FID; i >= 0x6; i--)
{
wrmsr64(MSR_IA32_PERF_CONTROL, (rdmsr64(MSR_IA32_PERF_CONTROL) & 0xFFFFFFFFFFFF0000ULL) | (i << 8) | minimum.VID);
intel_waitforsts();
minimum.FID = (rdmsr64(MSR_IA32_PERF_STATUS) >> 8) & 0x1F;
delay(1);
}
wrmsr64(MSR_IA32_PERF_CONTROL, (rdmsr64(MSR_IA32_PERF_CONTROL) & 0xFFFFFFFFFFFF0000ULL) | (maximum.FID << 8) | maximum.VID);
intel_waitforsts();
}
if (minimum.VID == maximum.VID)
{
uint8_t i;
// Probe for lowest vid
for (i = maximum.VID; i > 0xA; i--)
{
wrmsr64(MSR_IA32_PERF_CONTROL, (rdmsr64(MSR_IA32_PERF_CONTROL) & 0xFFFFFFFFFFFF0000ULL) | (minimum.FID << 8) | i);
intel_waitforsts();
minimum.VID = rdmsr64(MSR_IA32_PERF_STATUS) & 0x3F;
delay(1);
}
wrmsr64(MSR_IA32_PERF_CONTROL, (rdmsr64(MSR_IA32_PERF_CONTROL) & 0xFFFFFFFFFFFF0000ULL) | (maximum.FID << 8) | maximum.VID);
intel_waitforsts();
}
minimum.CID = ((minimum.FID & 0x1F) << 1) >> cpu_dynamic_fsb;
// Sanity check
if (maximum.CID < minimum.CID)
{
DBG("Insane FID values!");
p_states_count = 1;
}
else
{
// Finalize P-States
// Find how many P-States machine supports
p_states_count = maximum.CID - minimum.CID + 1;
if (p_states_count > 32)
p_states_count = 32;
uint8_t vidstep;
uint8_t i = 0, u, invalid = 0;
vidstep = ((maximum.VID << 2) - (minimum.VID << 2)) / (p_states_count - 1);
for (u = 0; u < p_states_count; u++)
{
i = u - invalid;
p_states[i].CID = maximum.CID - u;
p_states[i].FID = (p_states[i].CID >> 1);
if (p_states[i].FID < 0x6)
{
if (cpu_dynamic_fsb)
p_states[i].FID = (p_states[i].FID << 1) | 0x80;
}
else if (cpu_noninteger_bus_ratio)
{
p_states[i].FID = p_states[i].FID | (0x40 * (p_states[i].CID & 0x1));
}
if (i && p_states[i].FID == p_states[i-1].FID)
invalid++;
p_states[i].VID = ((maximum.VID << 2) - (vidstep * u)) >> 2;
uint32_t multiplier = p_states[i].FID & 0x1f;// = 0x08
bool half = p_states[i].FID & 0x40;// = 0x01
bool dfsb = p_states[i].FID & 0x80;// = 0x00
uint32_t fsb = Platform.CPU.FSBFrequency / 1000000; // = 400
uint32_t halffsb = (fsb + 1) >> 1;// = 200
uint32_t frequency = (multiplier * fsb);// = 3200
p_states[i].Frequency = (frequency + (half * halffsb)) >> dfsb;// = 3200 + 200 = 3400
}
p_states_count -= invalid;
}
// Generating SSDT
if (p_states_count > 0)
{
uint32_t i, pss_entries_size = 33 * p_states_count, pss_package_length = pss_entries_size + 2;
if (pss_package_length > 0x3f) pss_package_length++; // for chunks > 0x3f bytes length have 2 bytes encoding
uint32_t pss_name_length = (1 /* id=0x12 */ + pss_package_length) + (1 + 10);
if (pss_name_length > 0x3f) pss_name_length++;
uint32_t ssdt_size = 36 + (1 /* id=0x10 */ + pss_name_length) + acpi_cpu_count * sizeof(chunk_alias);
struct acpi_2_ssdt *ssdt = (void*)AllocateKernelMemory(ssdt_size);
int fd = openmem((char*)ssdt, ssdt_size);
// write header
write(fd, ssdt_header, sizeof(ssdt_header));
// write Scope (\_PR) {Name (PSS, ...
writebyte(fd, 0x10); // id
if (pss_name_length > 0x3f)
{
writebyte(fd, 0x40 | (pss_name_length & 0xf)); // lo half-byte
writebyte(fd, pss_name_length >> 4); // hi byte
}
else
{
writebyte(fd, pss_name_length); // length
}
write(fd, chunk_name_body, sizeof(chunk_name_body));
// write Package(p_states_count) { ...
writebyte(fd, 0x12); // id
if (pss_package_length > 0x3f)
{
writebyte(fd, 0x40 | (pss_package_length & 0xf)); // lo half-byte
writebyte(fd, pss_package_length >> 4); // hi byte
}
else
{
writebyte(fd, pss_package_length); // length
}
writebyte(fd, p_states_count); // entries
for (i = 0; i < p_states_count; i++)
{
DBG("P-State: Frequency %d MHz, FID 0x%x, VID 0x%x\n", p_states[i].Frequency, p_states[i].FID, p_states[i].VID);
writebyte(fd, 0x12); // chunk id
writebyte(fd, 32); // chunk length without id
writebyte(fd, 6); // entries
writebyte(fd, 0x0C); /* id */ writeint(fd, p_states[i].Frequency); // value
writebyte(fd, 0x0C); /* id */ writeint(fd, 0x00000000); // value
writebyte(fd, 0x0C); /* id */ writeint(fd, 0x0000000A); // value
writebyte(fd, 0x0C); /* id */ writeint(fd, 0x0000000A); // value
writebyte(fd, 0x0C); /* id */ writeint(fd, p_states[i].Control); // value
writebyte(fd, 0x0C); /* id */ writeint(fd, i + 1); // value
}
// Write aliases
for (i = 0; i < acpi_cpu_count; i++) {
int j;
for (j = 0; j < 4; j++)
chunk_alias[8+j] = acpi_cpu_name[i][j];
write(fd, chunk_alias, sizeof(chunk_alias));
}
ssdt->Length = ssdt_size;
ssdt->Checksum = 0;
ssdt->Checksum = 256 - checksum8(ssdt, ssdt->Length);
//dumpPhysAddr("P-States SSDT content: ", ssdt, ssdt_size);
verbose ("SSDT with CPU P-States generated successfully\n");
return ssdt;
}
}
else {
verbose ("DSDT CPUs not found: P-States not generated !!!\n");
}
return NULL;
}
struct acpi_2_fadt *patch_fadt(struct acpi_2_fadt *fadt, struct acpi_2_dsdt *new_dsdt)
{
extern void setupSystemType();
struct acpi_2_fadt *fadt_mod;
bool fadt_rev2_needed = false;
bool fix_restart;
const char * value;
// Restart Fix
if (Platform.CPU.Vendor == 0x756E6547) {/* Intel */
fix_restart = true;
getBoolForKey(kRestartFix, &fix_restart, &bootInfo->bootConfig);
} else {
verbose ("Not an Intel platform: Restart Fix not applied !!!\n");
fix_restart = false;
}
if (fix_restart) fadt_rev2_needed = true;
// Allocate new fadt table
if (fadt->Length < 0x84 && fadt_rev2_needed)
{
fadt_mod=(struct acpi_2_fadt *)AllocateKernelMemory(0x84);
memcpy(fadt_mod, fadt, fadt->Length);
fadt_mod->Length = 0x84;
fadt_mod->Revision = 0x02; // FADT rev 2 (ACPI 1.0B MS extensions)
}
else
{
fadt_mod=(struct acpi_2_fadt *)AllocateKernelMemory(fadt->Length);
memcpy(fadt_mod, fadt, fadt->Length);
}
// Determine system type / PM_Model
if ( (value=getStringForKey(kSystemType, &bootInfo->bootConfig))!=NULL)
{
if (Platform.Type > 6)
{
if(fadt_mod->PM_Profile<=6)
Platform.Type = fadt_mod->PM_Profile; // get the fadt if correct
else
Platform.Type = 1;/* Set a fixed value (Desktop) */
verbose("Error: system-type must be 0..6. Defaulting to %d !\n", Platform.Type);
}
else
Platform.Type = (unsigned char) strtoul(value, NULL, 10);
}
// Set PM_Profile from System-type if only if user wanted this value to be forced
if (fadt_mod->PM_Profile != Platform.Type)
{
if (value)
{ // user has overriden the SystemType so take care of it in FACP
verbose("FADT: changing PM_Profile from 0x%02x to 0x%02x\n", fadt_mod->PM_Profile, Platform.Type);
fadt_mod->PM_Profile = Platform.Type;
}
else
{ // PM_Profile has a different value and no override has been set, so reflect the user value to ioregs
Platform.Type = fadt_mod->PM_Profile <= 6 ? fadt_mod->PM_Profile : 1;
}
}
// We now have to write the systemm-type in ioregs: we cannot do it before in setupDeviceTree()
// because we need to take care of facp original content, if it is correct.
setupSystemType();
// Patch FADT to fix restart
if (fix_restart)
{
fadt_mod->Flags|= 0x400;
fadt_mod->Reset_SpaceID= 0x01; // System I/O
fadt_mod->Reset_BitWidth= 0x08; // 1 byte
fadt_mod->Reset_BitOffset= 0x00; // Offset 0
fadt_mod->Reset_AccessWidth= 0x01; // Byte access
fadt_mod->Reset_Address= 0x0cf9; // Address of the register
fadt_mod->Reset_Value= 0x06; // Value to write to reset the system
verbose("FADT: Restart Fix applied!\n");
}
// Patch DSDT Address if we have loaded DSDT.aml
if(new_dsdt)
{
DBG("DSDT: Old @%x,%x, ",fadt_mod->DSDT,fadt_mod->X_DSDT);
fadt_mod->DSDT=(uint32_t)new_dsdt;
if ((uint32_t)(&(fadt_mod->X_DSDT))-(uint32_t)fadt_mod+8<=fadt_mod->Length)
fadt_mod->X_DSDT=(uint32_t)new_dsdt;
DBG("New @%x,%x\n",fadt_mod->DSDT,fadt_mod->X_DSDT);
verbose("FADT: Using custom DSDT!\n");
}
// Correct the checksum
fadt_mod->Checksum=0;
fadt_mod->Checksum=256-checksum8(fadt_mod,fadt_mod->Length);
return fadt_mod;
}
/* Setup ACPI without replacing DSDT. */
int setupAcpiNoMod()
{
//addConfigurationTable(&gEfiAcpiTableGuid, getAddressOfAcpiTable(), "ACPI");
//addConfigurationTable(&gEfiAcpi20TableGuid, getAddressOfAcpi20Table(), "ACPI_20");
/* XXX aserebln why uint32 cast if pointer is uint64 ? */
acpi10_p = (uint32_t)getAddressOfAcpiTable();
acpi20_p = (uint32_t)getAddressOfAcpi20Table();
addConfigurationTable(&gEfiAcpiTableGuid, &acpi10_p, "ACPI");
if(acpi20_p) addConfigurationTable(&gEfiAcpi20TableGuid, &acpi20_p, "ACPI_20");
return 1;
}
/* Setup ACPI. Replace DSDT if DSDT.aml is found */
int setupAcpi(void)
{
int version;
void *new_dsdt;
// Load replacement DSDT
new_dsdt=loadACPITable("DSDT.aml");
// Mozodojo: going to patch FACP and load SSDT's even if DSDT.aml is not present
/*if (!new_dsdt)
{
return setupAcpiNoMod();
}*/
// Mozodojo: Load additional SSDTs
struct acpi_2_ssdt *new_ssdt[32]; // 30 + 2 additional tables for pss & cst
struct acpi_2_fadt *fadt; // will be used in CST generator
int ssdt_count=0;
bool drop_ssdt=false, generate_pstates=false, generate_cstates=false;
getBoolForKey(kDropSSDT, &drop_ssdt, &bootInfo->bootConfig);
getBoolForKey(kGeneratePStates, &generate_pstates, &bootInfo->bootConfig);
getBoolForKey(kGenerateCStates, &generate_cstates, &bootInfo->bootConfig);
{
int i;
for (i=0; i<30; i++)
{
char *filename[512];
sprintf(filename, i>0?"SSDT-%d.aml":"SSDT.aml", i);
if(new_ssdt[ssdt_count] = loadACPITable(filename))
{
ssdt_count++;
}
else
{
break;
}
}
}
// Do the same procedure for both versions of ACPI
for (version=0; version<2; version++) {
struct acpi_2_rsdp *rsdp, *rsdp_mod;
struct acpi_2_rsdt *rsdt, *rsdt_mod;
int rsdplength;
// Find original rsdp
rsdp=(struct acpi_2_rsdp *)(version?getAddressOfAcpi20Table():getAddressOfAcpiTable());
if (!rsdp)
{
DBG("No ACPI version %d found. Ignoring\n", version+1);
if (version)
addConfigurationTable(&gEfiAcpi20TableGuid, NULL, "ACPI_20");
else
addConfigurationTable(&gEfiAcpiTableGuid, NULL, "ACPI");
continue;
}
rsdplength=version?rsdp->Length:20;
DBG("RSDP version %d found @%x. Length=%d\n",version+1,rsdp,rsdplength);
/* FIXME: no check that memory allocation succeeded
* Copy and patch RSDP,RSDT, XSDT and FADT
* For more info see ACPI Specification pages 110 and following
*/
rsdp_mod=(struct acpi_2_rsdp *) AllocateKernelMemory(rsdplength);
memcpy(rsdp_mod, rsdp, rsdplength);
rsdt=(struct acpi_2_rsdt *)(rsdp->RsdtAddress);
DBG("RSDT @%x, Length %d\n",rsdt, rsdt->Length);
if (rsdt && (uint32_t)rsdt !=0xffffffff && rsdt->Length<0x10000)
{
uint32_t *rsdt_entries;
int rsdt_entries_num;
int dropoffset=0, i;
rsdt_mod=(struct acpi_2_rsdt *)AllocateKernelMemory(rsdt->Length);
memcpy (rsdt_mod, rsdt, rsdt->Length);
rsdp_mod->RsdtAddress=(uint32_t)rsdt_mod;
rsdt_entries_num=(rsdt_mod->Length-sizeof(struct acpi_2_rsdt))/4;
rsdt_entries=(uint32_t *)(rsdt_mod+1);
for (i=0;i<rsdt_entries_num;i++)
{
char *table=(char *)(rsdt_entries[i]);
if (!table)
continue;
DBG("TABLE %c%c%c%c,",table[0],table[1],table[2],table[3]);
rsdt_entries[i-dropoffset]=rsdt_entries[i];
if (drop_ssdt && tableSign(table, "SSDT"))
{
dropoffset++;
continue;
}
if (tableSign(table, "DSDT"))
{
DBG("DSDT found\n");
if(new_dsdt)
rsdt_entries[i-dropoffset]=(uint32_t)new_dsdt;
continue;
}
if (tableSign(table, "FACP"))
{
struct acpi_2_fadt *fadt_mod;
fadt=(struct acpi_2_fadt *)rsdt_entries[i];
DBG("FADT found @%x, Length %d\n",fadt, fadt->Length);
if (!fadt || (uint32_t)fadt == 0xffffffff || fadt->Length>0x10000)
{
printf("FADT incorrect. Not modified\n");
continue;
}
fadt_mod = patch_fadt(fadt, new_dsdt);
rsdt_entries[i-dropoffset]=(uint32_t)fadt_mod;
// Generate _CST SSDT
if (generate_cstates && (new_ssdt[ssdt_count] = generate_cst_ssdt(fadt_mod)))
ssdt_count++;
// Generating _PSS SSDT
if (generate_pstates && (new_ssdt[ssdt_count] = generate_pss_ssdt((void*)fadt_mod->DSDT)))
ssdt_count++;
continue;
}
}
DBG("\n");
// Mozodojo: Insert additional SSDTs into RSDT
if(ssdt_count>0)
{
uint32_t j = rsdt_mod->Length;
bool add_new_ssdt = TRUE;
rsdt_mod->Length+=4*ssdt_count-4*dropoffset;
if (rsdt_mod->Length > j)
{
struct acpi_2_rsdt *rsdt_copy = (struct acpi_2_rsdt *)AllocateKernelMemory(rsdt_mod->Length);
if (rsdt_copy)
{
memcpy (rsdt_copy, rsdt_mod, rsdt_mod->Length);
free(rsdt_mod); rsdt_mod = rsdt_copy;
rsdp_mod->RsdtAddress=(uint32_t)rsdt_mod;
rsdt_entries_num=(rsdt_mod->Length-sizeof(struct acpi_2_rsdt))/4;
rsdt_entries=(uint32_t *)(rsdt_mod+1);
}
else
{
verbose("RSDT: Couldn't allocate memory for additional SSDT tables!\n");
add_new_ssdt = FALSE;
}
}
if (add_new_ssdt)
{
for (j=0; j<ssdt_count; j++)
rsdt_entries[i-dropoffset+j]=(uint32_t)new_ssdt[j];
verbose("RSDT: Added %d SSDT table(s)\n", ssdt_count);
}
}
else
{
rsdt_mod->Length-=4*dropoffset;
}
// Correct the checksum of RSDT
DBG("RSDT: Original checksum %d, ", rsdt_mod->Checksum);
rsdt_mod->Checksum=0;
rsdt_mod->Checksum=256-checksum8(rsdt_mod,rsdt_mod->Length);
DBG("New checksum %d at %x\n", rsdt_mod->Checksum,rsdt_mod);
}
else
{
rsdp_mod->RsdtAddress=0;
printf("RSDT not found or RSDT incorrect\n");
}
if (version)
{
struct acpi_2_xsdt *xsdt, *xsdt_mod;
// FIXME: handle 64-bit address correctly
xsdt=(struct acpi_2_xsdt*) ((uint32_t)rsdp->XsdtAddress);
DBG("XSDT @%x;%x, Length=%d\n", (uint32_t)(rsdp->XsdtAddress>>32),(uint32_t)rsdp->XsdtAddress,
xsdt->Length);
if (xsdt && (uint64_t)rsdp->XsdtAddress<0xffffffff && xsdt->Length<0x10000)
{
uint64_t *xsdt_entries;
int xsdt_entries_num, i;
int dropoffset=0;
xsdt_mod=(struct acpi_2_xsdt*)AllocateKernelMemory(xsdt->Length);
memcpy(xsdt_mod, xsdt, xsdt->Length);
rsdp_mod->XsdtAddress=(uint32_t)xsdt_mod;
xsdt_entries_num=(xsdt_mod->Length-sizeof(struct acpi_2_xsdt))/8;
xsdt_entries=(uint64_t *)(xsdt_mod+1);
for (i=0;i<xsdt_entries_num;i++)
{
char *table=(char *)((uint32_t)(xsdt_entries[i]));
if (!table)
continue;
xsdt_entries[i-dropoffset]=xsdt_entries[i];
if (drop_ssdt && tableSign(table, "SSDT"))
{
dropoffset++;
continue;
}
if (tableSign(table, "DSDT"))
{
DBG("DSDT found\n");
if (new_dsdt)
xsdt_entries[i-dropoffset]=(uint32_t)new_dsdt;
DBG("TABLE %c%c%c%c@%x,",table[0],table[1],table[2],table[3],xsdt_entries[i]);
continue;
}
if (tableSign(table, "FACP"))
{
struct acpi_2_fadt *fadt_mod;
fadt=(struct acpi_2_fadt *)(uint32_t)xsdt_entries[i];
DBG("FADT found @%x,%x, Length %d\n",(uint32_t)(xsdt_entries[i]>>32),fadt,
fadt->Length);
if (!fadt || (uint64_t)xsdt_entries[i] >= 0xffffffff || fadt->Length>0x10000)
{
verbose("FADT incorrect or after 4GB. Dropping XSDT\n");
goto drop_xsdt;
}
fadt_mod = patch_fadt(fadt, new_dsdt);
xsdt_entries[i-dropoffset]=(uint32_t)fadt_mod;
DBG("TABLE %c%c%c%c@%x,",table[0],table[1],table[2],table[3],xsdt_entries[i]);
// Generate _CST SSDT
if (generate_cstates && (new_ssdt[ssdt_count] = generate_cst_ssdt(fadt_mod)))
ssdt_count++;
// Generating _PSS SSDT
if (generate_pstates && (new_ssdt[ssdt_count] = generate_pss_ssdt((void*)fadt_mod->DSDT)))
ssdt_count++;
continue;
}
DBG("TABLE %c%c%c%c@%x,",table[0],table[1],table[2],table[3],xsdt_entries[i]);
}
// Mozodojo: Insert additional SSDTs into XSDT
if(ssdt_count>0)
{
int j = xsdt_mod->Length;
bool add_new_ssdt = TRUE;
xsdt_mod->Length+=8*ssdt_count-8*dropoffset;
if (xsdt_mod->Length > j)
{
struct acpi_2_xsdt *xsdt_copy = (struct acpi_2_xsdt *)AllocateKernelMemory(xsdt_mod->Length);
if (xsdt_copy)
{
memcpy(xsdt_copy, xsdt_mod, xsdt_mod->Length);
free(xsdt_mod); xsdt_mod = xsdt_copy;
rsdp_mod->XsdtAddress=(uint32_t)xsdt_mod;
xsdt_entries_num=(xsdt_mod->Length-sizeof(struct acpi_2_xsdt))/8;
xsdt_entries=(uint64_t *)(xsdt_mod+1);
}
else
{
verbose("RSDT: Couldn't allocate memory for additional SSDT tables!\n");
add_new_ssdt = FALSE;
}
}
if (add_new_ssdt)
{
for (j=0; j<ssdt_count; j++)
xsdt_entries[i-dropoffset+j]=(uint32_t)new_ssdt[j];
verbose("Added %d SSDT table(s) into XSDT\n", ssdt_count);
}
}
else
{
xsdt_mod->Length-=8*dropoffset;
}
// Correct the checksum of XSDT
xsdt_mod->Checksum=0;
xsdt_mod->Checksum=256-checksum8(xsdt_mod,xsdt_mod->Length);
}
else
{
drop_xsdt:
DBG("About to drop XSDT\n");
/*FIXME: Now we just hope that if MacOS doesn't find XSDT it reverts to RSDT.
* A Better strategy would be to generate
*/
rsdp_mod->XsdtAddress=0xffffffffffffffffLL;
verbose("XSDT not found or XSDT incorrect\n");
}
}
// Correct the checksum of RSDP
DBG("RSDP: Original checksum %d, ", rsdp_mod->Checksum);
rsdp_mod->Checksum=0;
rsdp_mod->Checksum=256-checksum8(rsdp_mod,20);
DBG("New checksum %d\n", rsdp_mod->Checksum);
if (version)
{
DBG("RSDP: Original extended checksum %d", rsdp_mod->ExtendedChecksum);
rsdp_mod->ExtendedChecksum=0;
rsdp_mod->ExtendedChecksum=256-checksum8(rsdp_mod,rsdp_mod->Length);
DBG("New extended checksum %d\n", rsdp_mod->ExtendedChecksum);
}
//verbose("Patched ACPI version %d DSDT\n", version+1);
if (version)
{
/* XXX aserebln why uint32 cast if pointer is uint64 ? */
acpi20_p = (uint32_t)rsdp_mod;
addConfigurationTable(&gEfiAcpi20TableGuid, &acpi20_p, "ACPI_20");
}
else
{
/* XXX aserebln why uint32 cast if pointer is uint64 ? */
acpi10_p = (uint32_t)rsdp_mod;
addConfigurationTable(&gEfiAcpiTableGuid, &acpi10_p, "ACPI");
}
}
#if DEBUG_ACPI
printf("Press a key to continue... (DEBUG_ACPI)\n");
getc();
#endif
return 1;
}
trunk/i386/libsaio/spd.c
177177
178178
179179
180
180
181181
182182
183183
184184
185185
186
186187
187
188
188
189189
190
191
192
193
190
191
192
193
194
195
196
194197
198
195199
196
197
198
199
200
201
202
203
204
200
201
202
203
204
205
206
205207
206
207
208
208209
209210
210211
......
260261
261262
262263
263
264
265
264
265
266
266267
267268
268269
if (!ret) sprintf(asciiSerial, "10000000%d", serialnum++);
else sprintf(asciiSerial, "%d", ret);
return asciiSerial;
return strdup(asciiSerial);
}
/** Get DDR3 or DDR2 Part Number, always return a valid ptr */
const char * getDDRPartNum(const char* spd)
{
static char asciiPartNo[32];
const char * sPart = NULL;
int i;
bool bZero = false;
int i, index = 0;
if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR3)
sPart = &spd[128];
else if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR2)
sPart = &spd[73];
if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR3) {
sPart = &spd[128];
}
else if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR2) {
sPart = &spd[73];
}
if (sPart) { // Check that the spd part name is zero terminated and that it is ascii:
bzero(asciiPartNo, 32);
for (i=0; i<32; i++) {
if (sPart[i]==0) {
bZero = true;
break;
}
else if ( !isascii(sPart[i]) ) {
sPart = NULL;
break;
}
}
if (isalpha(sPart[i]) || isdigit(sPart[i])) // It seems that System Profiler likes only letters and digits...
asciiPartNo[index++] = sPart[i];
else if (!isascii(sPart[i]))
break;
}
return strdup(asciiPartNo);
}
return ( sPart==NULL || !(*sPart) || !bZero ) ?
"N/A" : sPart;
return "N/A";
}
int mapping []= {0,2,1,3,4,6,5,7,8,10,9,11};
spd_type = (slot->spd[SPD_MEMORY_TYPE] < ((char) 12) ? slot->spd[SPD_MEMORY_TYPE] : 0);
slot->Type = spd_mem_to_smbios[spd_type];
slot->PartNo = strdup(getDDRPartNum(slot->spd) );
slot->Vendor = strdup(getVendorName(slot) );
slot->SerialNo = strdup(getDDRSerial(slot->spd));
slot->PartNo = getDDRPartNum(slot->spd);
slot->Vendor = getVendorName(slot);
slot->SerialNo = getDDRSerial(slot->spd);
// determine spd speed
speed = getDDRspeedMhz(slot->spd);
trunk/i386/libsaio/acpi_patcher.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Copyright 2008 mackerintel
*/
#ifndef __LIBSAIO_ACPI_PATCHER_H
#define __LIBSAIO_ACPI_PATCHER_H
#include "libsaio.h"
uint64_t acpi10_p;
uint64_t acpi20_p;
uint64_t smbios_p;
extern int setupAcpi();
extern EFI_STATUS addConfigurationTable();
extern EFI_GUID gEfiAcpiTableGuid;
extern EFI_GUID gEfiAcpi20TableGuid;
struct p_state
{
union
{
uint16_t Control;
struct
{
uint8_t VID;// Voltage ID
uint8_t FID;// Frequency ID
};
};
uint8_tCID;// Compare ID
uint32_tFrequency;
};
#endif /* !__LIBSAIO_ACPI_PATCHER_H */
trunk/i386/libsaio/Makefile
3939
4040
4141
42
42
4343
4444
4545
46
46
4747
4848
4949
ufs.o ufs_byteorder.o \
vbe.o nbp.o hfs.o hfs_compare.o \
xml.o ntfs.o msdos.o md5c.o device_tree.o \
cpu.o platform.o dsdt_patcher.o \
cpu.o platform.o acpi_patcher.o \
smbios_patcher.o fake_efi.o ext2fs.o \
hpet.o spd.o usb.o pci_setup.o \
device_inject.o nvidia.o ati.o pci_root.o \
convert.o mem.o
convert.o mem.o aml_generator.o
SAIO_EXTERN_OBJS = console.o
trunk/i386/libsaio/smbios_patcher.c
144144
145145
146146
147
148
149
150
151
152
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
153215
154
216
217
218
219
220
221
222
223
224
225
155226
156227
157228
......
166237
167238
168239
240
169241
170242
171243
......
777849
778850
779851
780
852
781853
782854
783855
static int sm_get_cputype (const char *name, int table_num)
{
if (Platform.CPU.NoCores == 1) {
return 0x0101; // <01 01> Intel Core Solo?
} else if (Platform.CPU.NoCores == 2) {
return 0x0301; // <01 03> Intel Core 2 Duo
} else if (Platform.CPU.NoCores >= 4) {
return 0x0501; // <01 05> Quad-Core Intel Xeon
if (Platform.CPU.Vendor == 0x756E6547) {
int cores = Platform.CPU.NoCores;
int intelPM = Platform.CPU.Model; //+ (Platform.CPU.ExtModel<< 4);//verify this
switch (intelPM) {
case 13: // Pentium M model D
return 0x0101;
break;
case 14: // Core Solo/Duo, "Yonah", 65nm
return 0x0201;
break;
case 15: // Pentium 4, Core 2, Xeon, "Merom", "Conroe", 65nm
switch (cores) {
case 1: // Core Solo
return 0x0201;
break;
case 2: // Core 2, 65nm
return 0x0301;
break;
case 4: // Quad Core, Xeon
return 0x0501;
break;
default:
return 0x0301;
break;
}
/* if (cores == 1)
return 0x0201; // Core Solo
else if (cores == 2)
return 0x0301; // Core 2, 65nm
else if (cores == 4)
return 0x0501; // Quad-Core Xeon
else
return 0x0301;*/
break;
case 21: // EP80579 integrated processor
return 0x0301; // ???
break;
case 22: // Core 2 Solo, "Merom-L", "Conroe-L", 45nm
return 0x0201; // ???
break;
case 23: // Core 2 Extreme, Xeon, "Penryn", "Wolfdale", 45nm
return 0x0301;
break;
case 26: // Nehalem, Xeon 5500, "Bloomfield", 45nm
return 0x0701;
break;
case 29: // Six-Core Xeon 7400, "Dunnington", 45nm
return 0x0401;
break;
case 30: // Nehalem, Xeon, "Lynnfield", "Clarksfield", "Jasper", 45nm
return 0x0701;
break;
case 31: // Core i5, Xeon MP, "Havendale", "Auburndale", 45nm
return 0x0601;
break;
case 37: // Nehalem, "Clarkdale", 32nm
return 0x0301; // ???
break;
case 44: // Nehalem, "Gulftown", 32nm
return 0x0601;
break;
case 46: // "Nehalem-ex", "Beckton", 45nm
return 0x0301; // ???
break;
default:
goto core_ident;
}
} else {
return 0x0301; // Default to Core 2 Duo
core_ident:
if (Platform.CPU.NoCores == 1) {
return 0x0201; // Core Solo
} else if (Platform.CPU.NoCores == 2) {
return 0x0301; // Core 2 Duo
} else if (Platform.CPU.NoCores >= 4) {
return 0x0501; // Quad-Core Xeon
} else {
return 0x0301; // Core 2 Duo
}
}
}
return Platform.RAM.DIMM[map].Type;
}
}
return SMB_MEM_TYPE_DDR2;
}
DmiTablePairCount++;
}
else {
printf("DMI table entries list is full! Next entries won't be stored\n");
printf("DMI table entries list is full! Next entries won't be stored.\n");
}
#if DEBUG_SMBIOS
printf("DMI header found for table type %d, length = %d\n", dmihdr->type, dmihdr->length);
trunk/i386/libsaio/aml_generator.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
197
198
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
/*
* aml_generator.c
* Chameleon
*
* Created by Mozodojo on 20/07/10.
* Copyright 2010 mozo. All rights reserved.
*
*/
#include "aml_generator.h"
unsigned char aml_get_length_size(long length)
{
if (length > 0x3F)
return 2;
else if (length > 0x3FFF)
return 3;
return 1;
}
void aml_add_to_parent(struct aml_chunk* parent, struct aml_chunk* node)
{
if (parent && node)
{
if (!parent->First)
parent->First = node;
if (parent->Last)
parent->Last->Next = node;
parent->Last = node;
}
}
struct aml_chunk* aml_create_node(struct aml_chunk* parent)
{
struct aml_chunk* node = (void*)malloc(sizeof(struct aml_chunk));
aml_add_to_parent(parent, node);
return node;
}
int aml_add_buffer(struct aml_chunk* parent, const char* buffer, unsigned int size)
{
struct aml_chunk* node = aml_create_node(parent);
if (node)
{
node->Type = AML_CHUNK_NONE;
node->Length = size;
node->Buffer = malloc(node->Length);
memcpy(node->Buffer, buffer, size);
return node->Length;
}
return -1;
}
int aml_add_byte(struct aml_chunk* parent, unsigned char value)
{
struct aml_chunk* node = aml_create_node(parent);
if (node)
{
node->Type = AML_CHUNK_BYTE;
node->Length = 1;
node->Buffer = malloc(node->Length);
if (value == 0)
node->Buffer[0] = 0x00;
else if (value == 1)
node->Buffer[0] = 0x01;
else
node->Buffer[0] = value;
return node->Length;
}
return -1;
}
int aml_add_word(struct aml_chunk* parent, unsigned int value)
{
struct aml_chunk* node = aml_create_node(parent);
if (node)
{
node->Type = AML_CHUNK_WORD;
node->Length = 2;
node->Buffer = malloc(node->Length);
node->Buffer[0] = value & 0xff;
node->Buffer[1] = value >> 8;
return node->Length;
}
return -1;
}
int aml_add_dword(struct aml_chunk* parent, unsigned long value)
{
struct aml_chunk* node = aml_create_node(parent);
if (node)
{
node->Type = AML_CHUNK_DWORD;
node->Length = 4;
node->Buffer = malloc(node->Length);
node->Buffer[0] = value & 0xff;
node->Buffer[1] = (value >> 8) & 0xff;
node->Buffer[2] = (value >> 16) & 0xff;
node->Buffer[3] = (value >> 24) & 0xff;
return node->Length;
}
return -1;
}
int aml_add_qword(struct aml_chunk* parent, unsigned long long value)
{
struct aml_chunk* node = aml_create_node(parent);
if (node)
{
node->Type = AML_CHUNK_QWORD;
node->Length = 8;
node->Buffer = malloc(node->Length);
node->Buffer[0] = value & 0xff;
node->Buffer[1] = (value >> 8) & 0xff;
node->Buffer[2] = (value >> 16) & 0xff;
node->Buffer[3] = (value >> 24) & 0xff;
node->Buffer[4] = (value >> 32) & 0xff;
node->Buffer[5] = (value >> 40) & 0xff;
node->Buffer[6] = (value >> 48) & 0xff;
node->Buffer[7] = (value >> 56) & 0xff;
return node->Length;
}
return -1;
}
int aml_fill_simple_name(char* buffer, const char* name)
{
int i, len = strlen(name), count = 0;
for (i = 0; i < 4; i++)
{
if (i < len && aml_isvalidchar(name[i]))
{
buffer[count++] = name[i];
}
else
{
buffer[3-i] = '_';
}
}
return 4;
}
int aml_get_names_count(const char* name)
{
int i, len = strlen(name), count = 0;
for (i = 0; i < len; i++)
{
if (name[i] == '.')
{
count++;
}
else if (!aml_isvalidchar(name[i]))
{
len = i;
break;
}
}
if (count == 0 && len > 0)
count++;
return count;
}
int aml_fill_name(struct aml_chunk* node, const char* name)
{
int i, len = strlen(name), count = 0;
for (i = 0; i < len; i++)
{
if (name[i] == '.')
{
count++;
}
else if (!aml_isvalidchar(name[i]))
{
len = i;
break;
}
}
if (count == 0 && len > 0)
count++;
int offset = 0;
if (count == 1)
{
node->Length = 4;
node->Buffer = malloc(node->Length);
aml_fill_simple_string(node->Buffer, name);
return node->Length;
}
if (count == 2)
{
node->Length = 2 + 8;
node->Buffer = malloc(node->Length);
node->Buffer[offset++] = '\\'; // Root
node->Buffer[offset++] = 0x2e; // Double name
}
else
{
node->Length = 3 + count*4;
node->Buffer[offset++] = '\\'; // Root
node->Buffer[offset++] = 0x2f; // Multi name
node->Buffer[offset++] = count; // Names count
}
int j = 0;
for (i = 0; i < count; i++)
{
while (name[j] != '.')
{
if (j < len)
{
j++;
}
else
{
verbose("aml_fill_name: unexpected end of names path!");
return;
}
}
offset += aml_fill_simple_name(node->Buffer + offset, name + j);
}
return offset;
}
int aml_add_name(struct aml_chunk* parent, const char* name, int count, ...)
{
struct aml_chunk* node = aml_create_node(parent);
if (node)
{
node->Type = AML_CHUNK_NAME;
aml_fill_name(node, name);
return node->Length;
}
return -1;
}
int aml_add_scope(struct aml_chunk* parent, const char* name)
{
struct aml_chunk* node = aml_create_node(parent);
if (node)
{
node->Type = AML_CHUNK_SCOPE;
aml_fill_name(node, name);
return node->Length;
}
return -1;
}
trunk/i386/libsaio/aml_generator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* aml_generator.h
* Chameleon
*
* Created by Mozodojo on 20/07/10.
* Copyright 2010 mozo. All rights reserved.
*
*/
#ifndef __LIBSAIO_AML_GENERATOR_H
#define __LIBSAIO_AML_GENERATOR_H
#include "libsaio.h"
enum aml_chunk_type
{
AML_CHUNK_NONE= -1,
AML_CHUNK_ZERO= 0x00,
AML_CHUNK_ONE= 0x01,
AML_CHUNK_ALIAS= 0x06,
AML_CHUNK_NAME= 0x08,
AML_CHUNK_BYTE= 0x0A,
AML_CHUNK_WORD= 0x0B,
AML_CHUNK_DWORD= 0x0C,
AML_CHUNK_STRING= 0x0D,
AML_CHUNK_QWORD= 0x0E,
AML_CHUNK_SCOPE= 0x10,
AML_CHUNK_PACKAGE= 0x12,
};
struct aml_chunk
{
enum aml_chunk_typeType;
unsigned longLength;
char*Buffer;
struct aml_chunk*Next;
struct aml_chunk*First;
struct aml_chunk*Last;
};
static inline bool aml_isvalidchar(char c)
{
return isupper(c) || isdigit(c) || c == '_';
};
#endif /* !__LIBSAIO_AML_GENERATOR_H */
trunk/i386/libsaio/nvidia.c
337337
338338
339339
340
341
340
341
342342
343343
344344
......
353353
354354
355355
356
356
357
358
359
360
361
362
363
364
365
366
367
357368
358369
359370
......
681692
682693
683694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
684711
685712
686713
{ 0x10DE06F9, "Quadro FX 370 LP" },
{ 0x10DE06FA, "Quadro NVS 450" },
{ 0x10DE06FD, "Quadro NVS 295" },
{ 0x10DE087D, "ION 9400M" },
{ 0x10DE087E, "ION LE" },
{ 0x10DE087D, "ION 9400M" },
{ 0x10DE087E, "ION LE" },
{ 0x10DE0A20, "GeForce GT220" },
{ 0x10DE0A23, "GeForce 210" },
{ 0x10DE0A28, "GeForce GT 230M" },
{ 0x10DE0A78, "Quadro FX 380 LP" },
{ 0x10DE0CA3, "GeForce GT 240" },
{ 0x10DE0CA8, "GeForce GTS 260M" },
{ 0x10DE0CA9, "GeForce GTS 250M" }
{ 0x10DE0CA9, "GeForce GTS 250M" },
{ 0x10DE0CA3, "GeForce GT240" },
{ 0x10DE06C0, "GeForce GTX 480" },
{ 0x10DE06CD, "GeForce GTX 470" },
{ 0x10DE06C4, "GeForce GTX 465" },
{ 0x10DE06CA, "GeForce GTX 480M" },
{ 0x10DE0E22, "GeForce GTX 460" },
{ 0x10DE0E24, "GeForce GTX 460" },
{ 0x10DE06D1, "Tesla C2050" },// TODO: sub-device id: 0x0771
{ 0x10DE06D1, "Tesla C2070" },// TODO: sub-device id: 0x0772
{ 0x10DE06DE, "Tesla M2050" },// TODO: sub-device id: 0x0846
{ 0x10DE06DE, "Tesla M2070" }// TODO: sub-device id: ?
};
static uint16_t swap16(uint16_t x)
videoRam = (REG32(0x10020c) & 0xfff00000) >> 10;
model = get_nvidia_model((nvda_dev->vendor_id << 16) | nvda_dev->device_id);
// FIXME: dirty fermi hack
if((nvda_dev->device_id & 0xFFE0) == 0x06C0 ||
(nvda_dev->device_id & 0xFFE0) == 0x0E20) {
switch (nvda_dev->device_id) {
case 0x06C0: videoRam = 1572864; break; // gtx 480
case 0x06CD: videoRam = 1310720; break; // gtx 470
case 0x06C4: videoRam = 1048576; break; // gtx 465
case 0x06CA: videoRam = 2097152; break; // gtx 480m
case 0x0E22: videoRam = 1048576; break; // gtx 460
case 0x0E24: videoRam = 1048576; break; // gtx 460
case 0x06D1: videoRam = 3145728; break; // tesla c2050/c2070
case 0x06DE: videoRam = 3145728; break; // tesla m2050/m2070
default: break;
}
}
verbose("nVidia %s %dMB NV%02x [%04x:%04x] :: %s\n",
model, (videoRam / 1024),
(REG32(0) >> 20) & 0x1ff, nvda_dev->vendor_id, nvda_dev->device_id,
trunk/i386/libsaio/sys.c
402402
403403
404404
405
406405
407406
408407
......
424423
425424
426425
427
428426
429427
430428
......
601599
602600
603601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
604658
605659
606660
......
761815
762816
763817
764
818
765819
766
820
767821
768822
769823
......
777831
778832
779833
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
803857
804858
805859
806860
807861
808862
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
828882
829883
830884
......
835889
836890
837891
838
839
840
841
842
843
892
893
894
895
896
897
844898
845899
846900
......
10241078
10251079
10261080
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
10411095
return io;
}
#if UNUSED
//==========================================================================
// openmem()
return fdesc;
}
#endif
//==========================================================================
// open() - Open the file specified by 'path' for reading.
}
//==========================================================================
// write() - Write up to 'count' bytes of data to the file descriptor
// from the buffer pointed to by buf.
int write(int fdesc, const char * buf, int count)
{
struct iob * io;
if ((io = iob_from_fdesc(fdesc)) == NULL)
return (-1);
if ((io->i_offset + count) > (unsigned int)io->i_filesize)
count = io->i_filesize - io->i_offset;
if (count <= 0)
return 0; // end of file
bcopy(buf, io->i_buf + io->i_offset, count);
io->i_offset += count;
return count;
}
int writebyte(int fdesc, char value)
{
struct iob * io;
if ((io = iob_from_fdesc(fdesc)) == NULL)
return (-1);
if ((io->i_offset + 1) > (unsigned int)io->i_filesize)
return 0; // end of file
io->i_buf[io->i_offset++] = value;
return 1;
}
int writeint(int fdesc, int value)
{
struct iob * io;
if ((io = iob_from_fdesc(fdesc)) == NULL)
return (-1);
if ((io->i_offset + 4) > (unsigned int)io->i_filesize)
return 0; // end of file
bcopy(&value, io->i_buf + io->i_offset, 4);
io->i_offset += 4;
return 4;
}
//==========================================================================
// file_size() - Returns the size of the file described by the file
// descriptor.
BVRef selectBootVolume( BVRef chain )
{
bool filteredChain = false;
bool filteredChain = false;
bool foundPrimary = false;
BVRef bvr, bvr1 = 0, bvr2 = 0;
BVRef bvr, bvr1 = 0, bvr2 = 0;
if (chain->filtered) filteredChain = true;
* to override the default selection.
* We accept only kBVFlagSystemVolume or kBVFlagForeignBoot volumes.
*/
const char * val;
char testStr[64];
int cnt;
if (getValueForKey(kDefaultPartition, &val, &cnt, &bootInfo->bootConfig) && cnt >= 7 && filteredChain)
{
for ( bvr = chain; bvr; bvr = bvr->next )
{
if ( bvr->biosdev >= 0x80 && bvr->biosdev < 0x100
&& ( bvr->flags & ( kBVFlagSystemVolume|kBVFlagForeignBoot ) ) )
{
// Trying to match hd(x,y) format.
sprintf(testStr, "hd(%d,%d)", bvr->biosdev - 0x80, bvr->part_no);
if (strcmp(testStr, val) == 0)
return bvr;
// Trying to match volume UUID.
if (bvr->fs_getuuid && bvr->fs_getuuid(bvr, testStr) == 0 && strcmp(testStr, val) == 0)
return bvr;
}
}
}
const char * val;
char testStr[64];
int cnt;
if (getValueForKey(kDefaultPartition, &val, &cnt, &bootInfo->bootConfig) && cnt >= 7 && filteredChain)
{
for ( bvr = chain; bvr; bvr = bvr->next )
{
if ( bvr->biosdev >= 0x80 && bvr->biosdev < 0x100
&& ( bvr->flags & ( kBVFlagSystemVolume|kBVFlagForeignBoot ) ) )
{
// Trying to match hd(x,y) format.
sprintf(testStr, "hd(%d,%d)", bvr->biosdev - 0x80, bvr->part_no);
if (strcmp(testStr, val) == 0)
return bvr;
// Trying to match volume UUID.
if (bvr->fs_getuuid && bvr->fs_getuuid(bvr, testStr) == 0 && strcmp(testStr, val) == 0)
return bvr;
}
}
}
/*
* Scannig the volume chain backwards and trying to find
* a HFS+ volume with valid boot record signature.
* If not found any active partition then we will
* select this volume as the boot volume.
*/
for ( bvr = chain; bvr; bvr = bvr->next )
{
if ( bvr->flags & kBVFlagPrimary && bvr->biosdev == gBIOSDev ) foundPrimary = true;
// zhell -- Undo a regression that was introduced from r491 to 492.
// if gBIOSBootVolume is set already, no change is required
if ( bvr->flags & (kBVFlagBootable|kBVFlagSystemVolume)
&& gBIOSBootVolume
&& (!filteredChain || (filteredChain && bvr->visible))
&& bvr->biosdev == gBIOSDev )
bvr2 = bvr;
// zhell -- if gBIOSBootVolume is NOT set, we use the "if" statement
// from r491,
if ( bvr->flags & kBVFlagBootable
&& ! gBIOSBootVolume
&& bvr->biosdev == gBIOSDev )
bvr2 = bvr;
}
for ( bvr = chain; bvr; bvr = bvr->next )
{
if ( bvr->flags & kBVFlagPrimary && bvr->biosdev == gBIOSDev ) foundPrimary = true;
// zhell -- Undo a regression that was introduced from r491 to 492.
// if gBIOSBootVolume is set already, no change is required
if ( bvr->flags & (kBVFlagBootable|kBVFlagSystemVolume)
&& gBIOSBootVolume
&& (!filteredChain || (filteredChain && bvr->visible))
&& bvr->biosdev == gBIOSDev )
bvr2 = bvr;
// zhell -- if gBIOSBootVolume is NOT set, we use the "if" statement
// from r491,
if ( bvr->flags & kBVFlagBootable
&& ! gBIOSBootVolume
&& bvr->biosdev == gBIOSDev )
bvr2 = bvr;
}
/*
* Use the standrad method for selecting the boot volume.
*/
if ( bvr->flags & kBVFlagNativeBoot && bvr->biosdev == gBIOSDev ) bvr1 = bvr;
if ( bvr->flags & kBVFlagPrimary && bvr->biosdev == gBIOSDev ) bvr2 = bvr;
}
}
bvr = bvr2 ? bvr2 :
bvr1 ? bvr1 : chain;
return bvr;
}
bvr = bvr2 ? bvr2 :
bvr1 ? bvr1 : chain;
return bvr;
}
//==========================================================================
int getDeviceStringFromBVR(const BVRef bvr, char *str)
{
const struct devsw *dp;
if (bvr)
{
*str = '\0';
for (dp = devsw; dp->name && bvr->biosdev >= dp->biosdev; dp++);
dp--;
if (dp->name) sprintf(str, "%s(%d,%d)", dp->name, bvr->biosdev - dp->biosdev, bvr->part_no);
return true;
}
return false;
const struct devsw *dp;
if (bvr)
{
*str = '\0';
for (dp = devsw; dp->name && bvr->biosdev >= dp->biosdev; dp++);
dp--;
if (dp->name) sprintf(str, "%s(%d,%d)", dp->name, bvr->biosdev - dp->biosdev, bvr->part_no);
return true;
}
return false;
}
trunk/i386/libsaio/acpi.h
5959
6060
6161
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
6288
6389
6490
......
7399
74100
75101
76
77
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
78135
79136
80137
} __attribute__((packed));
// TODO Migrate
struct acpi_2_ssdt {
char Signature[4];
uint32_t Length;
uint8_t Revision;
uint8_t Checksum;
char OEMID[6];
char OEMTableId[8];
uint32_t OEMRevision;
uint32_t CreatorId;
uint32_t CreatorRevision;
} __attribute__((packed));
// TODO Migrate
struct acpi_2_dsdt {
char Signature[4];
uint32_t Length;
uint8_t Revision;
uint8_t Checksum;
char OEMID[6];
char OEMTableId[8];
uint32_t OEMRevision;
uint32_t CreatorId;
uint32_t CreatorRevision;
} __attribute__((packed));
// TODO Migrate
struct acpi_2_fadt {
char Signature[4];
uint32_t Length;
uint32_t DSDT;
uint8_t Model;// JrCs
uint8_t PM_Profile;// JrCs
/*We absolutely don't care about theese fields*/
uint8_t notimp1[66];
uint16_tSCI_Interrupt;
uint32_tSMI_Command_Port;
uint8_tACPI_Enable;
uint8_tACPI_Disable;
uint8_tS4BIOS_Command;
uint8_tPState_Control;
uint32_tPM1A_Event_Block_Address;
uint32_tPM1B_Event_Block_Address;
uint32_tPM1A_Control_Block_Address;
uint32_tPM1B_Control_Block_Address;
uint32_tPM2_Control_Block_Address;
uint32_tPM_Timer_Block_Address;
uint32_tGPE0_Block_Address;
uint32_tGPE1_Block_Address;
uint8_tPM1_Event_Block_Length;
uint8_tPM1_Control_Block_Length;
uint8_tPM2_Control_Block_Length;
uint8_tPM_Timer_Block_Length;
uint8_tGPE0_Block_Length;
uint8_tGPE1_Block_Length;
uint8_tGPE1_Base_Offset;
uint8_tCST_Support;
uint16_tC2_Latency;
uint16_tC3_Latency;
uint16_tCPU_Cache_Size;
uint16_tCache_Flush_Stride;
uint8_tDuty_Cycle_Offset;
uint8_tDuty_Cycle_Width;
uint8_tRTC_Day_Alarm_Index;
uint8_tRTC_Month_Alarm_Index;
uint8_tRTC_Century_Index;
uint16_tBoot_Flags;
uint8_tReserved0;
/* Begin Asere */
//Reset Fix
uint32_t Flags;
trunk/i386/libsaio/platform.c
5252
5353
5454
55
5655
5756
5857
59
60
61
58
59
6260
*/
void scan_platform(void)
{
memset(&Platform, 0, sizeof(Platform));
build_pci_dt();
scan_cpu(&Platform);
// disabled for now as options can't be read yet here:
// scan_mem();
// It's working after some changes in strdup
scan_mem();
}
trunk/i386/libsaio/cpu.c
1717
1818
1919
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
5720
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
11921
12022
12123
......
249151
250152
251153
154
155
156
252157
253158
254159
......
279184
280185
281186
282
187
283188
284189
285190
#define DBG(x...)
#endif
static inline uint64_t rdtsc64(void)
{
uint64_t ret;
__asm__ volatile("rdtsc" : "=A" (ret));
return ret;
}
static inline uint64_t rdmsr64(uint32_t msr)
{
uint64_t ret;
__asm__ volatile("rdmsr" : "=A" (ret) : "c" (msr));
return ret;
}
static inline void do_cpuid(uint32_t selector, uint32_t *data)
{
asm volatile ("cpuid"
: "=a" (data[0]),
"=b" (data[1]),
"=c" (data[2]),
"=d" (data[3])
: "a" (selector));
}
static inline void do_cpuid2(uint32_t selector, uint32_t selector2, uint32_t *data)
{
asm volatile ("cpuid"
: "=a" (data[0]),
"=b" (data[1]),
"=c" (data[2]),
"=d" (data[3])
: "a" (selector), "c" (selector2));
}
// DFE: enable_PIT2 and disable_PIT2 come from older xnu
/*
* Enable or disable timer 2.
* Port 0x61 controls timer 2:
* bit 0 gates the clock,
* bit 1 gates output to speaker.
*/
static inline void enable_PIT2(void)
{
/* Enable gate, disable speaker */
__asm__ volatile(
" inb $0x61,%%al \n\t"
" and $0xFC,%%al \n\t" /* & ~0x03 */
" or $1,%%al \n\t"
" outb %%al,$0x61 \n\t"
: : : "%al" );
}
static inline void disable_PIT2(void)
{
/* Disable gate and output to speaker */
__asm__ volatile(
" inb $0x61,%%al \n\t"
" and $0xFC,%%al \n\t"/* & ~0x03 */
" outb %%al,$0x61 \n\t"
: : : "%al" );
}
// DFE: set_PIT2_mode0, poll_PIT2_gate, and measure_tsc_frequency are
// roughly based on Linux code
/* Set the 8254 channel 2 to mode 0 with the specified value.
In mode 0, the counter will initially set its gate low when the
timer expires. For this to be useful, you ought to set it high
before calling this function. The enable_PIT2 function does this.
*/
static inline void set_PIT2_mode0(uint16_t value)
{
__asm__ volatile(
" movb $0xB0,%%al \n\t"
" outb%%al,$0x43\n\t"
" movb%%dl,%%al\n\t"
" outb%%al,$0x42\n\t"
" movb%%dh,%%al\n\t"
" outb%%al,$0x42"
: : "d"(value) /*: no clobber */ );
}
/* Returns the number of times the loop ran before the PIT2 signaled */
static inline unsigned long poll_PIT2_gate(void)
{
unsigned long count = 0;
unsigned char nmi_sc_val;
do {
++count;
__asm__ volatile(
"inb$0x61,%0"
: "=q"(nmi_sc_val) /*:*/ /* no input */ /*:*/ /* no clobber */);
} while( (nmi_sc_val & 0x20) == 0);
return count;
}
/*
* DFE: Measures the TSC frequency in Hz (64-bit) using the ACPI PM timer
*/
static uint64_t measure_tsc_frequency(void)
if ((bit(29) & p->CPU.CPUID[CPUID_81][3]) != 0) {
p->CPU.Features |= CPU_FEATURE_EM64T;
}
if ((bit(5) & p->CPU.CPUID[CPUID_1][3]) != 0) {
p->CPU.Features |= CPU_FEATURE_MSR;
}
//if ((bit(28) & p->CPU.CPUID[CPUID_1][3]) != 0) {
if (p->CPU.NoThreads > p->CPU.NoCores) {
p->CPU.Features |= CPU_FEATURE_HTT;
}
cpuFrequency = tscFrequency;
} else {
msr = rdmsr64(IA32_PERF_STATUS);
msr = rdmsr64(MSR_IA32_PERF_STATUS);
DBG("msr(%d): ia32_perf_stat 0x%08x\n", __LINE__, msr & 0xffffffff);
currcoef = (msr >> 8) & 0x1f;
/* Non-integer bus ratio for the max-multi*/
trunk/i386/libsaio/platform.h
3333
3434
3535
36
3637
3738
3839
......
7576
7677
7778
78
79
79
80
8081
8182
8283
83
84
85
86
87
84
85
86
87
88
8889
8990
9091
#define CPU_FEATURE_EM64T0x00000040// 64Bit Support
#define CPU_FEATURE_HTT0x00000080// HyperThreading
#define CPU_FEATURE_MOBILE0x00000100// Mobile CPU
#define CPU_FEATURE_MSR0x00000200// MSR Support
/* SMBIOS Memory Types */
#define SMB_MEM_TYPE_UNDEFINED0
#define UUID_LEN16
typedef struct _RamSlotInfo_t {
uint32_t ModuleSize;// Size of Module in MB
uint32_t Frequency; // in Mhz
uint32_tModuleSize;// Size of Module in MB
uint32_tFrequency; // in Mhz
const char*Vendor;
const char*PartNo;
const char*SerialNo;
char*spd;// SPD Dump
boolInUse;
uint8_tType;
uint8_t BankConnections; // table type 6, see (3.3.7)
uint8_t BankConnCnt;
char*spd;// SPD Dump
boolInUse;
uint8_tType;
uint8_tBankConnections; // table type 6, see (3.3.7)
uint8_tBankConnCnt;
} RamSlotInfo_t;
trunk/i386/libsaio/cpu.h
1414
1515
1616
17
18
19
20
21
17
18
19
20
21
22
23
2224
2325
2426
......
2931
3032
3133
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
32141
#define bitmask(h,l)((bit(h)|(bit(h)-1)) & ~(bit(l)-1))
#define bitfield(x,h,l)(((x) & bitmask(h,l)) >> l)
#defineIA32_PERF_STATUS0x198
#define MSR_FLEX_RATIO0x194
#defineMSR_PLATFORM_INFO0xCE
#define K8_FIDVID_STATUS0xC0010042
#define K10_COFVID_STATUS0xC0010071
#defineMSR_IA32_PERF_STATUS0x198
#define MSR_IA32_PERF_CONTROL0x199
#define MSR_IA32_EXT_CONFIG0x00EE
#define MSR_FLEX_RATIO0x194
#defineMSR_PLATFORM_INFO0xCE
#define K8_FIDVID_STATUS0xC0010042
#define K10_COFVID_STATUS0xC0010071
#define DEFAULT_FSB100000 /* for now, hardcoding 100MHz for old CPUs */
#define CALIBRATE_TIME_MSEC30/* 30 msecs */
#define CALIBRATE_LATCH((CLKNUM * CALIBRATE_TIME_MSEC + 1000/2)/1000)
static inline uint64_t rdtsc64(void)
{
uint64_t ret;
__asm__ volatile("rdtsc" : "=A" (ret));
return ret;
}
static inline uint64_t rdmsr64(uint32_t msr)
{
uint64_t ret;
__asm__ volatile("rdmsr" : "=A" (ret) : "c" (msr));
return ret;
}
static inline void wrmsr64(uint32_t msr, uint64_t val)
{
__asm__ volatile("wrmsr" : : "c" (msr), "A" (val));
}
static inline void intel_waitforsts(void) {
uint32_t inline_timeout = 100000;
while (rdmsr64(MSR_IA32_PERF_STATUS) & (1 << 21)) { if (!inline_timeout--) break; }
}
static inline void do_cpuid(uint32_t selector, uint32_t *data)
{
asm volatile ("cpuid"
: "=a" (data[0]),
"=b" (data[1]),
"=c" (data[2]),
"=d" (data[3])
: "a" (selector));
}
static inline void do_cpuid2(uint32_t selector, uint32_t selector2, uint32_t *data)
{
asm volatile ("cpuid"
: "=a" (data[0]),
"=b" (data[1]),
"=c" (data[2]),
"=d" (data[3])
: "a" (selector), "c" (selector2));
}
// DFE: enable_PIT2 and disable_PIT2 come from older xnu
/*
* Enable or disable timer 2.
* Port 0x61 controls timer 2:
* bit 0 gates the clock,
* bit 1 gates output to speaker.
*/
static inline void enable_PIT2(void)
{
/* Enable gate, disable speaker */
__asm__ volatile(
" inb $0x61,%%al \n\t"
" and $0xFC,%%al \n\t" /* & ~0x03 */
" or $1,%%al \n\t"
" outb %%al,$0x61 \n\t"
: : : "%al" );
}
static inline void disable_PIT2(void)
{
/* Disable gate and output to speaker */
__asm__ volatile(
" inb $0x61,%%al \n\t"
" and $0xFC,%%al \n\t"/* & ~0x03 */
" outb %%al,$0x61 \n\t"
: : : "%al" );
}
// DFE: set_PIT2_mode0, poll_PIT2_gate, and measure_tsc_frequency are
// roughly based on Linux code
/* Set the 8254 channel 2 to mode 0 with the specified value.
In mode 0, the counter will initially set its gate low when the
timer expires. For this to be useful, you ought to set it high
before calling this function. The enable_PIT2 function does this.
*/
static inline void set_PIT2_mode0(uint16_t value)
{
__asm__ volatile(
" movb $0xB0,%%al \n\t"
" outb%%al,$0x43\n\t"
" movb%%dl,%%al\n\t"
" outb%%al,$0x42\n\t"
" movb%%dh,%%al\n\t"
" outb%%al,$0x42"
: : "d"(value) /*: no clobber */ );
}
/* Returns the number of times the loop ran before the PIT2 signaled */
static inline unsigned long poll_PIT2_gate(void)
{
unsigned long count = 0;
unsigned char nmi_sc_val;
do {
++count;
__asm__ volatile(
"inb$0x61,%0"
: "=q"(nmi_sc_val) /*:*/ /* no input */ /*:*/ /* no clobber */);
} while( (nmi_sc_val & 0x20) == 0);
return count;
}
#endif /* !__LIBSAIO_CPU_H */
trunk/i386/libsaio/fake_efi.c
1111
1212
1313
14
14
1515
1616
1717
#include "fake_efi.h"
#include "efi_tables.h"
#include "platform.h"
#include "dsdt_patcher.h"
#include "acpi_patcher.h"
#include "smbios_patcher.h"
#include "device_inject.h"
#include "convert.h"
trunk/i386/libsaio/saio_internal.h
183183
184184
185185
186
186187
187188
188189
extern int close(int fdesc);
extern int file_size(int fdesc);
extern int read(int fdesc, char *buf, int count);
extern int write(int fdesc, const char *buf, int count);
extern int b_lseek(int fdesc, int addr, int ptr);
extern int tell(int fdesc);
extern const char * systemConfigDir(void);
trunk/i386/boot2/boot.h
4242
4343
4444
45
45
4646
4747
4848
4949
50
50
5151
5252
5353
54
54
5555
5656
5757
58
58
5959
6060
6161
62
63
64
65
62
63
64
65
6666
67
68
69
70
71
72
73
67
68
69
70
71
72
73
7474
75
76
75
76
7777
7878
79
79
8080
81
82
81
82
8383
84
84
8585
8686
8787
8888
89
90
89
90
91
92
9193
9294
9395
#define kKernelNameKey"Kernel"
#define kKernelCacheKey"Kernel Cache"
#define kBootDeviceKey"Boot Device"
#define kTimeoutKey"Timeout"
#define kTimeoutKey"Timeout"
#define kRootDeviceKey"rd"
#define kBootUUIDKey"boot-uuid"
#define kHelperRootUUIDKey"Root UUID"
#define kPlatformKey"platform"
#define kACPIKey"acpi"
#define kACPIKey"acpi"
#define kCDROMPromptKey"CD-ROM Prompt"
#define kCDROMOptionKey"CD-ROM Option Key"
#define kRescanPromptKey"Rescan Prompt"
#define kRescanKey"Rescan"
#define kRescanKey "Rescan"
#define kScanSingleDriveKey"Scan Single Drive"
#define kInsantMenuKey"Instant Menu"
#define kDefaultKernel"mach_kernel"
#define kGUIKey"GUI"
#define kGUIKey"GUI"
#define kBootBannerKey"Boot Banner"
#define kWaitForKeypressKey"Wait"
/* AsereBLN: added the other keys */
#define kUseAtiROM"UseAtiROM"/* ati.c */
#define kWake"Wake"/* boot.c */
#define kForceWake"ForceWake"/* boot.c */
#define kWakeImage"WakeImage"/* boot.c */
#define kUseAtiROM"UseAtiROM"/* ati.c */
#define kWake"Wake"/* boot.c */
#define kForceWake"ForceWake"/* boot.c */
#define kWakeImage"WakeImage"/* boot.c */
#define kProductVersion"ProductVersion"/* boot.c */
#define karch"arch"/* boot.c */
#define kDSDT"DSDT"/* dsdt_patcher.c */
#define kDropSSDT"DropSSDT"/* dsdt_patcher.c */
#define kRestartFix"RestartFix"/* dsdt_patcher.c */
#define kSMBIOS"SMBIOS"/* fake_efi.c */
#define kSystemID"SystemId"/* fake_efi.c */
#define kSystemType"SystemType"/* fake_efi.c */
#define karch"arch"/* boot.c */
#define kDSDT"DSDT"/* acpi_patcher.c */
#define kDropSSDT"DropSSDT"/* acpi_patcher.c */
#define kRestartFix"RestartFix"/* acpi_patcher.c */
#define kSMBIOS"SMBIOS"/* fake_efi.c */
#define kSystemID"SystemId"/* fake_efi.c */
#define kSystemType"SystemType"/* fake_efi.c */
#define kUseNvidiaROM"UseNvidiaROM"/* nvidia.c */
#define kVBIOS"VBIOS"/* nvidia.c */
#define kPCIRootUID"PCIRootUID"/* pci_root.c */
#define kVBIOS"VBIOS"/* nvidia.c */
#define kPCIRootUID"PCIRootUID"/* pci_root.c */
#define kEthernetBuiltIn"EthernetBuiltIn"/* pci_setup.c */
#define kGraphicsEnabler"GraphicsEnabler"/* pci_setup.c */
#define kUSBBusFix"USBBusFix"/* pci_setup.c */
#define kUSBBusFix"USBBusFix"/* pci_setup.c */
#define kEHCIacquire"EHCIacquire"/* pci_setup.c */
#define kUHCIreset"UHCIreset"/* pci_setup.c */
#define kForceHPET"ForceHPET"/* pci_setup.c */
#define kUHCIreset"UHCIreset"/* pci_setup.c */
#define kForceHPET"ForceHPET"/* pci_setup.c */
#define kSMBIOSdefaults"SMBIOSdefaults"/* smbios_patcher.c */
#define kEHCIhard"EHCIhard"/* usb.c */
#define kEHCIhard"EHCIhard"/* usb.c */
#define kDefaultPartition"Default Partition"/* sys.c */
#define kDeviceProperties"device-properties"/* device_inject.c */
#define kHidePartition"Hide Partition"/* disk.c */
#define kRenamePartition"Rename Partition"/* disk.c */
#define kUseMemDetect "UseMemDetect" /* platform.c */
#define kRestartFix "RestartFix" /* dsdt_patcher.c */
#define kUseMemDetect"UseMemDetect" /* platform.c */
#define kRestartFix"RestartFix" /* acpi_patcher.c */
#define kGeneratePStates"GeneratePStates"/* acpi_patcher.c */
#define kGenerateCStates"GenerateCStates"/* acpi_patcher.c */
/*
* Flags to the booter or kernel

Archive Download the corresponding diff file

Revision: 192