Chameleon

Chameleon Commit Details

Date:2012-03-13 16:10:23 (8 years 2 months ago)
Author:armel cadet-petit
Commit:1887
Parents: 1886
Message:bug fix
Changes:
D/branches/cparm/i386/libsa/lzss.c
A/branches/cparm/i386/libsaio/lzss.c
A/branches/cparm/i386/libsaio/CoreHash.c
A/branches/cparm/i386/libsaio/CoreHash.h
M/branches/cparm/i386/libsaio/platform.c
M/branches/cparm/i386/boot2/prompt.c
M/branches/cparm/Chameleon.xcodeproj/project.pbxproj
M/branches/cparm/i386/libsaio/saio_internal.h
M/branches/cparm/i386/libsaio/Makefile
M/branches/cparm/i386/libsaio/cpu_intel_amd.c
M/branches/cparm/i386/libsa/Makefile
M/branches/cparm/i386/boot2/boot.c
M/branches/cparm/i386/libsa/libsa.h
M/branches/cparm/i386/libsaio/modules.c
M/branches/cparm/i386/libsaio/bootstruct.c
M/branches/cparm/TODO

File differences

branches/cparm/TODO
11
22
33
4
5
64
75
86
TODO List for Chameleon Boot Loader
====================================
- Update cpu_intel_amd.c
- Implement the bundles
- Implement a pool allocator, so each module will run and allocate memory in there own pool, de-alloc all allocated memory by the module,
branches/cparm/Chameleon.xcodeproj/project.pbxproj
88
99
1010
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
20811
20912
21013
......
492295
493296
494297
298
299
495300
496301
497302
......
660465
661466
662467
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
930468
931469
932470
......
1027565
1028566
1029567
1030
1031568
1032569
1033570
......
1064601
1065602
1066603
604
605
1067606
1068607
1069608
......
1440979
1441980
1442981
1443
1444982
1445983
1446984
/* Begin PBXFileReference section */
AB0E930C14C6223500F798D7 /* cpu_intel_amd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpu_intel_amd.c; sourceTree = "<group>"; };
AB12D09914FBDAA60022AF9C /* ChangeLog.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ChangeLog.html; sourceTree = "<group>"; };
AB12D09B14FBDAA60022AF9C /* banner.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = banner.png; sourceTree = "<group>"; };
AB12D09C14FBDAA60022AF9C /* banner.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = banner.svg; sourceTree = "<group>"; };
AB12D09D14FBDAA60022AF9C /* grad_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = grad_blue.png; sourceTree = "<group>"; };
AB12D09E14FBDAA60022AF9C /* grad_blue.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = grad_blue.svg; sourceTree = "<group>"; };
AB12D09F14FBDAA60022AF9C /* rss.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rss.png; sourceTree = "<group>"; };
AB12D0A014FBDAA60022AF9C /* uthash-mini.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "uthash-mini.png"; sourceTree = "<group>"; };
AB12D0A114FBDAA60022AF9C /* uthash-mini.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "uthash-mini.svg"; sourceTree = "<group>"; };
AB12D0A214FBDAA60022AF9C /* uthash.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = uthash.png; sourceTree = "<group>"; };
AB12D0A314FBDAA60022AF9C /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = "<group>"; };
AB12D0A414FBDAA60022AF9C /* license.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = license.html; sourceTree = "<group>"; };
AB12D0A514FBDAA60022AF9C /* styles.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = styles.css; sourceTree = "<group>"; };
AB12D0A614FBDAA60022AF9C /* tdh-quirks.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "tdh-quirks.css"; sourceTree = "<group>"; };
AB12D0A714FBDAA60022AF9C /* tdh.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = tdh.css; sourceTree = "<group>"; };
AB12D0A814FBDAA60022AF9C /* toc.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = toc.css; sourceTree = "<group>"; };
AB12D0A914FBDAA60022AF9C /* userguide.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = userguide.html; sourceTree = "<group>"; };
AB12D0AA14FBDAA60022AF9C /* userguide.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = userguide.pdf; sourceTree = "<group>"; };
AB12D0AB14FBDAA60022AF9C /* utarray.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = utarray.html; sourceTree = "<group>"; };
AB12D0AC14FBDAA60022AF9C /* utlist.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = utlist.html; sourceTree = "<group>"; };
AB12D0AD14FBDAA60022AF9C /* utstring.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = utstring.html; sourceTree = "<group>"; };
AB12D0AE14FBDAA60022AF9C /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
AB12D0AF14FBDAA60022AF9C /* NOTES */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NOTES; sourceTree = "<group>"; };
AB12D0B114FBDAA60022AF9C /* userguide.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = userguide.pdf; sourceTree = "<group>"; };
AB12D0B314FBDAA60022AF9C /* ChangeLog.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog.txt; sourceTree = "<group>"; };
AB12D0B414FBDAA60022AF9C /* sflogo.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sflogo.txt; sourceTree = "<group>"; };
AB12D0B514FBDAA60022AF9C /* toc.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = toc.txt; sourceTree = "<group>"; };
AB12D0B614FBDAA60022AF9C /* topnav.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = topnav.txt; sourceTree = "<group>"; };
AB12D0B714FBDAA60022AF9C /* topnav_utarray.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = topnav_utarray.txt; sourceTree = "<group>"; };
AB12D0B814FBDAA60022AF9C /* topnav_utlist.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = topnav_utlist.txt; sourceTree = "<group>"; };
AB12D0B914FBDAA60022AF9C /* topnav_utstring.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = topnav_utstring.txt; sourceTree = "<group>"; };
AB12D0BA14FBDAA60022AF9C /* userguide.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = userguide.txt; sourceTree = "<group>"; };
AB12D0BB14FBDAA60022AF9C /* utarray.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utarray.txt; sourceTree = "<group>"; };
AB12D0BC14FBDAA60022AF9C /* utlist.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utlist.txt; sourceTree = "<group>"; };
AB12D0BD14FBDAA60022AF9C /* utstring.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utstring.txt; sourceTree = "<group>"; };
AB12D0BE14FBDAA60022AF9C /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
AB12D0BF14FBDAA60022AF9C /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
AB12D0C114FBDAA60022AF9C /* utarray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utarray.h; sourceTree = "<group>"; };
AB12D0C214FBDAA60022AF9C /* uthash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uthash.h; sourceTree = "<group>"; };
AB12D0C314FBDAA60022AF9C /* utlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utlist.h; sourceTree = "<group>"; };
AB12D0C414FBDAA60022AF9C /* utstring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utstring.h; sourceTree = "<group>"; };
AB12D0C614FBDAA60022AF9C /* all_funcs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = all_funcs; sourceTree = "<group>"; };
AB12D0C714FBDAA60022AF9C /* bloom_perf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bloom_perf.c; sourceTree = "<group>"; };
AB12D0C814FBDAA60022AF9C /* bloom_perf.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = bloom_perf.sh; sourceTree = "<group>"; };
AB12D0C914FBDAA60022AF9C /* do_tests */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = do_tests; sourceTree = "<group>"; };
AB12D0CA14FBDAA60022AF9C /* do_tests.cygwin */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = do_tests.cygwin; sourceTree = "<group>"; };
AB12D0CB14FBDAA60022AF9C /* do_tests.mingw */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = do_tests.mingw; sourceTree = "<group>"; };
AB12D0CC14FBDAA60022AF9C /* do_tests_win32.cmd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = do_tests_win32.cmd; sourceTree = "<group>"; };
AB12D0CD14FBDAA60022AF9C /* emit_keys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = emit_keys.c; sourceTree = "<group>"; };
AB12D0CE14FBDAA60022AF9C /* example.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = example.c; sourceTree = "<group>"; };
AB12D0CF14FBDAA60022AF9C /* hashscan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hashscan.c; sourceTree = "<group>"; };
AB12D0D014FBDAA60022AF9C /* keystat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = keystat.c; sourceTree = "<group>"; };
AB12D0D114FBDAA60022AF9C /* keystats */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = keystats; sourceTree = "<group>"; };
AB12D0D214FBDAA60022AF9C /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
AB12D0D314FBDAA60022AF9C /* mexpand */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = mexpand; sourceTree = "<group>"; };
AB12D0D414FBDAA60022AF9C /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
AB12D0D514FBDAA60022AF9C /* simkeys.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = simkeys.pl; sourceTree = "<group>"; };
AB12D0D614FBDAA60022AF9C /* sleep_test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sleep_test.c; sourceTree = "<group>"; };
AB12D0D714FBDAA60022AF9C /* tdiff.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tdiff.cpp; sourceTree = "<group>"; };
AB12D0D814FBDAA60022AF9C /* test1.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test1.ans; sourceTree = "<group>"; };
AB12D0D914FBDAA60022AF9C /* test1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test1.c; sourceTree = "<group>"; };
AB12D0DA14FBDAA60022AF9C /* test10.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test10.ans; sourceTree = "<group>"; };
AB12D0DB14FBDAA60022AF9C /* test10.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test10.c; sourceTree = "<group>"; };
AB12D0DC14FBDAA60022AF9C /* test11.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test11.ans; sourceTree = "<group>"; };
AB12D0DD14FBDAA60022AF9C /* test11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test11.c; sourceTree = "<group>"; };
AB12D0DE14FBDAA60022AF9C /* test11.dat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test11.dat; sourceTree = "<group>"; };
AB12D0DF14FBDAA60022AF9C /* test12.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test12.ans; sourceTree = "<group>"; };
AB12D0E014FBDAA60022AF9C /* test12.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test12.c; sourceTree = "<group>"; };
AB12D0E114FBDAA60022AF9C /* test13.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test13.ans; sourceTree = "<group>"; };
AB12D0E214FBDAA60022AF9C /* test13.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test13.c; sourceTree = "<group>"; };
AB12D0E314FBDAA60022AF9C /* test14.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test14.ans; sourceTree = "<group>"; };
AB12D0E414FBDAA60022AF9C /* test14.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test14.c; sourceTree = "<group>"; };
AB12D0E514FBDAA60022AF9C /* test14.dat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test14.dat; sourceTree = "<group>"; };
AB12D0E614FBDAA60022AF9C /* test15.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test15.ans; sourceTree = "<group>"; };
AB12D0E714FBDAA60022AF9C /* test15.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test15.c; sourceTree = "<group>"; };
AB12D0E814FBDAA60022AF9C /* test16.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test16.ans; sourceTree = "<group>"; };
AB12D0E914FBDAA60022AF9C /* test16.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test16.c; sourceTree = "<group>"; };
AB12D0EA14FBDAA60022AF9C /* test17.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test17.ans; sourceTree = "<group>"; };
AB12D0EB14FBDAA60022AF9C /* test17.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test17.c; sourceTree = "<group>"; };
AB12D0EC14FBDAA60022AF9C /* test18.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test18.ans; sourceTree = "<group>"; };
AB12D0ED14FBDAA60022AF9C /* test18.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test18.c; sourceTree = "<group>"; };
AB12D0EE14FBDAA60022AF9C /* test19.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test19.ans; sourceTree = "<group>"; };
AB12D0EF14FBDAA60022AF9C /* test19.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test19.c; sourceTree = "<group>"; };
AB12D0F014FBDAA60022AF9C /* test2.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test2.ans; sourceTree = "<group>"; };
AB12D0F114FBDAA60022AF9C /* test2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test2.c; sourceTree = "<group>"; };
AB12D0F214FBDAA60022AF9C /* test20.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test20.ans; sourceTree = "<group>"; };
AB12D0F314FBDAA60022AF9C /* test20.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test20.c; sourceTree = "<group>"; };
AB12D0F414FBDAA60022AF9C /* test21.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test21.ans; sourceTree = "<group>"; };
AB12D0F514FBDAA60022AF9C /* test21.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test21.c; sourceTree = "<group>"; };
AB12D0F614FBDAA60022AF9C /* test22.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test22.ans; sourceTree = "<group>"; };
AB12D0F714FBDAA60022AF9C /* test22.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test22.c; sourceTree = "<group>"; };
AB12D0F814FBDAA60022AF9C /* test23.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test23.ans; sourceTree = "<group>"; };
AB12D0F914FBDAA60022AF9C /* test23.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test23.c; sourceTree = "<group>"; };
AB12D0FA14FBDAA60022AF9C /* test24.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test24.ans; sourceTree = "<group>"; };
AB12D0FB14FBDAA60022AF9C /* test24.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test24.c; sourceTree = "<group>"; };
AB12D0FC14FBDAA60022AF9C /* test25.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test25.ans; sourceTree = "<group>"; };
AB12D0FD14FBDAA60022AF9C /* test25.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test25.c; sourceTree = "<group>"; };
AB12D0FE14FBDAA60022AF9C /* test26.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test26.ans; sourceTree = "<group>"; };
AB12D0FF14FBDAA60022AF9C /* test26.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test26.c; sourceTree = "<group>"; };
AB12D10014FBDAA60022AF9C /* test27.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test27.ans; sourceTree = "<group>"; };
AB12D10114FBDAA60022AF9C /* test27.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test27.c; sourceTree = "<group>"; };
AB12D10214FBDAA60022AF9C /* test28.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test28.ans; sourceTree = "<group>"; };
AB12D10314FBDAA60022AF9C /* test28.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test28.c; sourceTree = "<group>"; };
AB12D10414FBDAA60022AF9C /* test29.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test29.ans; sourceTree = "<group>"; };
AB12D10514FBDAA60022AF9C /* test29.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test29.c; sourceTree = "<group>"; };
AB12D10614FBDAA60022AF9C /* test3.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test3.ans; sourceTree = "<group>"; };
AB12D10714FBDAA60022AF9C /* test3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test3.c; sourceTree = "<group>"; };
AB12D10814FBDAA60022AF9C /* test30.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test30.ans; sourceTree = "<group>"; };
AB12D10914FBDAA60022AF9C /* test30.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test30.c; sourceTree = "<group>"; };
AB12D10A14FBDAA60022AF9C /* test31.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test31.ans; sourceTree = "<group>"; };
AB12D10B14FBDAA60022AF9C /* test31.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test31.c; sourceTree = "<group>"; };
AB12D10C14FBDAA60022AF9C /* test32.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test32.ans; sourceTree = "<group>"; };
AB12D10D14FBDAA60022AF9C /* test32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test32.c; sourceTree = "<group>"; };
AB12D10E14FBDAA60022AF9C /* test33.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test33.ans; sourceTree = "<group>"; };
AB12D10F14FBDAA60022AF9C /* test33.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test33.c; sourceTree = "<group>"; };
AB12D11014FBDAA60022AF9C /* test34.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test34.ans; sourceTree = "<group>"; };
AB12D11114FBDAA60022AF9C /* test34.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test34.c; sourceTree = "<group>"; };
AB12D11214FBDAA60022AF9C /* test35.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test35.ans; sourceTree = "<group>"; };
AB12D11314FBDAA60022AF9C /* test35.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test35.c; sourceTree = "<group>"; };
AB12D11414FBDAA60022AF9C /* test36.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test36.ans; sourceTree = "<group>"; };
AB12D11514FBDAA60022AF9C /* test36.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test36.c; sourceTree = "<group>"; };
AB12D11614FBDAA60022AF9C /* test37.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test37.ans; sourceTree = "<group>"; };
AB12D11714FBDAA60022AF9C /* test37.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test37.c; sourceTree = "<group>"; };
AB12D11814FBDAA60022AF9C /* test38.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test38.ans; sourceTree = "<group>"; };
AB12D11914FBDAA60022AF9C /* test38.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test38.c; sourceTree = "<group>"; };
AB12D11A14FBDAA60022AF9C /* test39.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test39.ans; sourceTree = "<group>"; };
AB12D11B14FBDAA60022AF9C /* test39.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test39.c; sourceTree = "<group>"; };
AB12D11C14FBDAA60022AF9C /* test4.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test4.ans; sourceTree = "<group>"; };
AB12D11D14FBDAA60022AF9C /* test4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test4.c; sourceTree = "<group>"; };
AB12D11E14FBDAA60022AF9C /* test40.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test40.ans; sourceTree = "<group>"; };
AB12D11F14FBDAA60022AF9C /* test40.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test40.c; sourceTree = "<group>"; };
AB12D12014FBDAA60022AF9C /* test41.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test41.ans; sourceTree = "<group>"; };
AB12D12114FBDAA60022AF9C /* test41.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test41.c; sourceTree = "<group>"; };
AB12D12214FBDAA60022AF9C /* test42.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test42.ans; sourceTree = "<group>"; };
AB12D12314FBDAA60022AF9C /* test42.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test42.c; sourceTree = "<group>"; };
AB12D12414FBDAA60022AF9C /* test43.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test43.ans; sourceTree = "<group>"; };
AB12D12514FBDAA60022AF9C /* test43.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test43.c; sourceTree = "<group>"; };
AB12D12614FBDAA60022AF9C /* test44.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test44.ans; sourceTree = "<group>"; };
AB12D12714FBDAA60022AF9C /* test44.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test44.c; sourceTree = "<group>"; };
AB12D12814FBDAA60022AF9C /* test45.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test45.ans; sourceTree = "<group>"; };
AB12D12914FBDAA60022AF9C /* test45.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test45.c; sourceTree = "<group>"; };
AB12D12A14FBDAA60022AF9C /* test46.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test46.ans; sourceTree = "<group>"; };
AB12D12B14FBDAA60022AF9C /* test46.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test46.c; sourceTree = "<group>"; };
AB12D12C14FBDAA60022AF9C /* test47.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test47.ans; sourceTree = "<group>"; };
AB12D12D14FBDAA60022AF9C /* test47.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test47.c; sourceTree = "<group>"; };
AB12D12E14FBDAA60022AF9C /* test48.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test48.ans; sourceTree = "<group>"; };
AB12D12F14FBDAA60022AF9C /* test48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test48.c; sourceTree = "<group>"; };
AB12D13014FBDAA60022AF9C /* test49.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test49.ans; sourceTree = "<group>"; };
AB12D13114FBDAA60022AF9C /* test49.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test49.c; sourceTree = "<group>"; };
AB12D13214FBDAA60022AF9C /* test5.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test5.ans; sourceTree = "<group>"; };
AB12D13314FBDAA60022AF9C /* test5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test5.c; sourceTree = "<group>"; };
AB12D13414FBDAA60022AF9C /* test50.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test50.ans; sourceTree = "<group>"; };
AB12D13514FBDAA60022AF9C /* test50.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test50.c; sourceTree = "<group>"; };
AB12D13614FBDAA60022AF9C /* test51.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test51.ans; sourceTree = "<group>"; };
AB12D13714FBDAA60022AF9C /* test51.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test51.c; sourceTree = "<group>"; };
AB12D13814FBDAA60022AF9C /* test52.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test52.ans; sourceTree = "<group>"; };
AB12D13914FBDAA60022AF9C /* test52.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test52.c; sourceTree = "<group>"; };
AB12D13A14FBDAA60022AF9C /* test53.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test53.ans; sourceTree = "<group>"; };
AB12D13B14FBDAA60022AF9C /* test53.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test53.c; sourceTree = "<group>"; };
AB12D13C14FBDAA60022AF9C /* test54.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test54.ans; sourceTree = "<group>"; };
AB12D13D14FBDAA60022AF9C /* test54.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test54.c; sourceTree = "<group>"; };
AB12D13E14FBDAA60022AF9C /* test55.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test55.ans; sourceTree = "<group>"; };
AB12D13F14FBDAA60022AF9C /* test55.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test55.c; sourceTree = "<group>"; };
AB12D14014FBDAA60022AF9C /* test56.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test56.ans; sourceTree = "<group>"; };
AB12D14114FBDAA60022AF9C /* test56.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test56.c; sourceTree = "<group>"; };
AB12D14214FBDAA60022AF9C /* test57.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test57.ans; sourceTree = "<group>"; };
AB12D14314FBDAA60022AF9C /* test57.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test57.c; sourceTree = "<group>"; };
AB12D14414FBDAA60022AF9C /* test58.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test58.ans; sourceTree = "<group>"; };
AB12D14514FBDAA60022AF9C /* test58.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test58.c; sourceTree = "<group>"; };
AB12D14614FBDAA60022AF9C /* test59.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test59.ans; sourceTree = "<group>"; };
AB12D14714FBDAA60022AF9C /* test59.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test59.c; sourceTree = "<group>"; };
AB12D14814FBDAA60022AF9C /* test6.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test6.ans; sourceTree = "<group>"; };
AB12D14914FBDAA60022AF9C /* test6.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test6.c; sourceTree = "<group>"; };
AB12D14A14FBDAA60022AF9C /* test60.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test60.ans; sourceTree = "<group>"; };
AB12D14B14FBDAA60022AF9C /* test60.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test60.c; sourceTree = "<group>"; };
AB12D14C14FBDAA60022AF9C /* test61.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test61.ans; sourceTree = "<group>"; };
AB12D14D14FBDAA60022AF9C /* test61.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test61.c; sourceTree = "<group>"; };
AB12D14E14FBDAA60022AF9C /* test62.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test62.ans; sourceTree = "<group>"; };
AB12D14F14FBDAA60022AF9C /* test62.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test62.c; sourceTree = "<group>"; };
AB12D15014FBDAA60022AF9C /* test63.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test63.ans; sourceTree = "<group>"; };
AB12D15114FBDAA60022AF9C /* test63.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test63.c; sourceTree = "<group>"; };
AB12D15214FBDAA60022AF9C /* test64.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test64.ans; sourceTree = "<group>"; };
AB12D15314FBDAA60022AF9C /* test64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test64.c; sourceTree = "<group>"; };
AB12D15414FBDAA60022AF9C /* test65.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test65.ans; sourceTree = "<group>"; };
AB12D15514FBDAA60022AF9C /* test65.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test65.c; sourceTree = "<group>"; };
AB12D15614FBDAA60022AF9C /* test65.dat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test65.dat; sourceTree = "<group>"; };
AB12D15714FBDAA60022AF9C /* test7.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test7.ans; sourceTree = "<group>"; };
AB12D15814FBDAA60022AF9C /* test7.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test7.c; sourceTree = "<group>"; };
AB12D15914FBDAA60022AF9C /* test8.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test8.ans; sourceTree = "<group>"; };
AB12D15A14FBDAA60022AF9C /* test8.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test8.c; sourceTree = "<group>"; };
AB12D15B14FBDAA60022AF9C /* test9.ans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test9.ans; sourceTree = "<group>"; };
AB12D15C14FBDAA60022AF9C /* test9.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test9.c; sourceTree = "<group>"; };
AB12D15E14FBDAA60022AF9C /* do_tests */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = do_tests; sourceTree = "<group>"; };
AB12D15F14FBDAA60022AF9C /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
AB12D16014FBDAA60022AF9C /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
AB12D16114FBDAA60022AF9C /* test1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test1.c; sourceTree = "<group>"; };
AB12D16214FBDAA60022AF9C /* test2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test2.c; sourceTree = "<group>"; };
AB1FFB0814FF0D8D006F7F4E /* lzss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lzss.c; sourceTree = "<group>"; };
AB43B2B714C37E520018D529 /* boot0.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = boot0.s; sourceTree = "<group>"; };
AB43B2B814C37E520018D529 /* boot0md.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = boot0md.s; sourceTree = "<group>"; };
AB43B2B914C37E520018D529 /* chain0.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = chain0.s; sourceTree = "<group>"; };
ABD521F314F9197900B62550 /* uterror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uterror.c; sourceTree = "<group>"; };
ABD521F414F9197900B62550 /* utlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utlist.h; sourceTree = "<group>"; };
ABD521F514F9197900B62550 /* utstring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utstring.h; sourceTree = "<group>"; };
ABD9A1FC150F706A008DA465 /* CoreHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreHash.h; sourceTree = "<group>"; };
ABD9A1FF150F80C4008DA465 /* CoreHash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = CoreHash.c; sourceTree = "<group>"; };
ABE5FF4E14F9495500447F78 /* modules.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = modules.c; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.c; };
ABE5FF4F14F9495500447F78 /* modules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = modules.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
B0056CD611F3868000754B65 /* boot */ = {isa = PBXFileReference; lastKnownFileType = text; path = boot; sourceTree = "<group>"; };
name = Chameleon;
sourceTree = "<group>";
};
AB12D09614FBDAA60022AF9C /* uthash-1.9.5 2 */ = {
isa = PBXGroup;
children = (
AB12D09714FBDAA60022AF9C /* doc */,
AB12D0BE14FBDAA60022AF9C /* LICENSE */,
AB12D0BF14FBDAA60022AF9C /* README */,
AB12D0C014FBDAA60022AF9C /* src */,
AB12D0C514FBDAA60022AF9C /* tests */,
);
path = "uthash-1.9.5 2";
sourceTree = "<group>";
};
AB12D09714FBDAA60022AF9C /* doc */ = {
isa = PBXGroup;
children = (
AB12D09814FBDAA60022AF9C /* html */,
AB12D0AE14FBDAA60022AF9C /* Makefile */,
AB12D0AF14FBDAA60022AF9C /* NOTES */,
AB12D0B014FBDAA60022AF9C /* pdf */,
AB12D0B214FBDAA60022AF9C /* txt */,
);
path = doc;
sourceTree = "<group>";
};
AB12D09814FBDAA60022AF9C /* html */ = {
isa = PBXGroup;
children = (
AB12D09914FBDAA60022AF9C /* ChangeLog.html */,
AB12D09A14FBDAA60022AF9C /* img */,
AB12D0A314FBDAA60022AF9C /* index.html */,
AB12D0A414FBDAA60022AF9C /* license.html */,
AB12D0A514FBDAA60022AF9C /* styles.css */,
AB12D0A614FBDAA60022AF9C /* tdh-quirks.css */,
AB12D0A714FBDAA60022AF9C /* tdh.css */,
AB12D0A814FBDAA60022AF9C /* toc.css */,
AB12D0A914FBDAA60022AF9C /* userguide.html */,
AB12D0AA14FBDAA60022AF9C /* userguide.pdf */,
AB12D0AB14FBDAA60022AF9C /* utarray.html */,
AB12D0AC14FBDAA60022AF9C /* utlist.html */,
AB12D0AD14FBDAA60022AF9C /* utstring.html */,
);
path = html;
sourceTree = "<group>";
};
AB12D09A14FBDAA60022AF9C /* img */ = {
isa = PBXGroup;
children = (
AB12D09B14FBDAA60022AF9C /* banner.png */,
AB12D09C14FBDAA60022AF9C /* banner.svg */,
AB12D09D14FBDAA60022AF9C /* grad_blue.png */,
AB12D09E14FBDAA60022AF9C /* grad_blue.svg */,
AB12D09F14FBDAA60022AF9C /* rss.png */,
AB12D0A014FBDAA60022AF9C /* uthash-mini.png */,
AB12D0A114FBDAA60022AF9C /* uthash-mini.svg */,
AB12D0A214FBDAA60022AF9C /* uthash.png */,
);
path = img;
sourceTree = "<group>";
};
AB12D0B014FBDAA60022AF9C /* pdf */ = {
isa = PBXGroup;
children = (
AB12D0B114FBDAA60022AF9C /* userguide.pdf */,
);
path = pdf;
sourceTree = "<group>";
};
AB12D0B214FBDAA60022AF9C /* txt */ = {
isa = PBXGroup;
children = (
AB12D0B314FBDAA60022AF9C /* ChangeLog.txt */,
AB12D0B414FBDAA60022AF9C /* sflogo.txt */,
AB12D0B514FBDAA60022AF9C /* toc.txt */,
AB12D0B614FBDAA60022AF9C /* topnav.txt */,
AB12D0B714FBDAA60022AF9C /* topnav_utarray.txt */,
AB12D0B814FBDAA60022AF9C /* topnav_utlist.txt */,
AB12D0B914FBDAA60022AF9C /* topnav_utstring.txt */,
AB12D0BA14FBDAA60022AF9C /* userguide.txt */,
AB12D0BB14FBDAA60022AF9C /* utarray.txt */,
AB12D0BC14FBDAA60022AF9C /* utlist.txt */,
AB12D0BD14FBDAA60022AF9C /* utstring.txt */,
);
path = txt;
sourceTree = "<group>";
};
AB12D0C014FBDAA60022AF9C /* src */ = {
isa = PBXGroup;
children = (
AB12D0C114FBDAA60022AF9C /* utarray.h */,
AB12D0C214FBDAA60022AF9C /* uthash.h */,
AB12D0C314FBDAA60022AF9C /* utlist.h */,
AB12D0C414FBDAA60022AF9C /* utstring.h */,
);
path = src;
sourceTree = "<group>";
};
AB12D0C514FBDAA60022AF9C /* tests */ = {
isa = PBXGroup;
children = (
AB12D0C614FBDAA60022AF9C /* all_funcs */,
AB12D0C714FBDAA60022AF9C /* bloom_perf.c */,
AB12D0C814FBDAA60022AF9C /* bloom_perf.sh */,
AB12D0C914FBDAA60022AF9C /* do_tests */,
AB12D0CA14FBDAA60022AF9C /* do_tests.cygwin */,
AB12D0CB14FBDAA60022AF9C /* do_tests.mingw */,
AB12D0CC14FBDAA60022AF9C /* do_tests_win32.cmd */,
AB12D0CD14FBDAA60022AF9C /* emit_keys.c */,
AB12D0CE14FBDAA60022AF9C /* example.c */,
AB12D0CF14FBDAA60022AF9C /* hashscan.c */,
AB12D0D014FBDAA60022AF9C /* keystat.c */,
AB12D0D114FBDAA60022AF9C /* keystats */,
AB12D0D214FBDAA60022AF9C /* Makefile */,
AB12D0D314FBDAA60022AF9C /* mexpand */,
AB12D0D414FBDAA60022AF9C /* README */,
AB12D0D514FBDAA60022AF9C /* simkeys.pl */,
AB12D0D614FBDAA60022AF9C /* sleep_test.c */,
AB12D0D714FBDAA60022AF9C /* tdiff.cpp */,
AB12D0D814FBDAA60022AF9C /* test1.ans */,
AB12D0D914FBDAA60022AF9C /* test1.c */,
AB12D0DA14FBDAA60022AF9C /* test10.ans */,
AB12D0DB14FBDAA60022AF9C /* test10.c */,
AB12D0DC14FBDAA60022AF9C /* test11.ans */,
AB12D0DD14FBDAA60022AF9C /* test11.c */,
AB12D0DE14FBDAA60022AF9C /* test11.dat */,
AB12D0DF14FBDAA60022AF9C /* test12.ans */,
AB12D0E014FBDAA60022AF9C /* test12.c */,
AB12D0E114FBDAA60022AF9C /* test13.ans */,
AB12D0E214FBDAA60022AF9C /* test13.c */,
AB12D0E314FBDAA60022AF9C /* test14.ans */,
AB12D0E414FBDAA60022AF9C /* test14.c */,
AB12D0E514FBDAA60022AF9C /* test14.dat */,
AB12D0E614FBDAA60022AF9C /* test15.ans */,
AB12D0E714FBDAA60022AF9C /* test15.c */,
AB12D0E814FBDAA60022AF9C /* test16.ans */,
AB12D0E914FBDAA60022AF9C /* test16.c */,
AB12D0EA14FBDAA60022AF9C /* test17.ans */,
AB12D0EB14FBDAA60022AF9C /* test17.c */,
AB12D0EC14FBDAA60022AF9C /* test18.ans */,
AB12D0ED14FBDAA60022AF9C /* test18.c */,
AB12D0EE14FBDAA60022AF9C /* test19.ans */,
AB12D0EF14FBDAA60022AF9C /* test19.c */,
AB12D0F014FBDAA60022AF9C /* test2.ans */,
AB12D0F114FBDAA60022AF9C /* test2.c */,
AB12D0F214FBDAA60022AF9C /* test20.ans */,
AB12D0F314FBDAA60022AF9C /* test20.c */,
AB12D0F414FBDAA60022AF9C /* test21.ans */,
AB12D0F514FBDAA60022AF9C /* test21.c */,
AB12D0F614FBDAA60022AF9C /* test22.ans */,
AB12D0F714FBDAA60022AF9C /* test22.c */,
AB12D0F814FBDAA60022AF9C /* test23.ans */,
AB12D0F914FBDAA60022AF9C /* test23.c */,
AB12D0FA14FBDAA60022AF9C /* test24.ans */,
AB12D0FB14FBDAA60022AF9C /* test24.c */,
AB12D0FC14FBDAA60022AF9C /* test25.ans */,
AB12D0FD14FBDAA60022AF9C /* test25.c */,
AB12D0FE14FBDAA60022AF9C /* test26.ans */,
AB12D0FF14FBDAA60022AF9C /* test26.c */,
AB12D10014FBDAA60022AF9C /* test27.ans */,
AB12D10114FBDAA60022AF9C /* test27.c */,
AB12D10214FBDAA60022AF9C /* test28.ans */,
AB12D10314FBDAA60022AF9C /* test28.c */,
AB12D10414FBDAA60022AF9C /* test29.ans */,
AB12D10514FBDAA60022AF9C /* test29.c */,
AB12D10614FBDAA60022AF9C /* test3.ans */,
AB12D10714FBDAA60022AF9C /* test3.c */,
AB12D10814FBDAA60022AF9C /* test30.ans */,
AB12D10914FBDAA60022AF9C /* test30.c */,
AB12D10A14FBDAA60022AF9C /* test31.ans */,
AB12D10B14FBDAA60022AF9C /* test31.c */,
AB12D10C14FBDAA60022AF9C /* test32.ans */,
AB12D10D14FBDAA60022AF9C /* test32.c */,
AB12D10E14FBDAA60022AF9C /* test33.ans */,
AB12D10F14FBDAA60022AF9C /* test33.c */,
AB12D11014FBDAA60022AF9C /* test34.ans */,
AB12D11114FBDAA60022AF9C /* test34.c */,
AB12D11214FBDAA60022AF9C /* test35.ans */,
AB12D11314FBDAA60022AF9C /* test35.c */,
AB12D11414FBDAA60022AF9C /* test36.ans */,
AB12D11514FBDAA60022AF9C /* test36.c */,
AB12D11614FBDAA60022AF9C /* test37.ans */,
AB12D11714FBDAA60022AF9C /* test37.c */,
AB12D11814FBDAA60022AF9C /* test38.ans */,
AB12D11914FBDAA60022AF9C /* test38.c */,
AB12D11A14FBDAA60022AF9C /* test39.ans */,
AB12D11B14FBDAA60022AF9C /* test39.c */,
AB12D11C14FBDAA60022AF9C /* test4.ans */,
AB12D11D14FBDAA60022AF9C /* test4.c */,
AB12D11E14FBDAA60022AF9C /* test40.ans */,
AB12D11F14FBDAA60022AF9C /* test40.c */,
AB12D12014FBDAA60022AF9C /* test41.ans */,
AB12D12114FBDAA60022AF9C /* test41.c */,
AB12D12214FBDAA60022AF9C /* test42.ans */,
AB12D12314FBDAA60022AF9C /* test42.c */,
AB12D12414FBDAA60022AF9C /* test43.ans */,
AB12D12514FBDAA60022AF9C /* test43.c */,
AB12D12614FBDAA60022AF9C /* test44.ans */,
AB12D12714FBDAA60022AF9C /* test44.c */,
AB12D12814FBDAA60022AF9C /* test45.ans */,
AB12D12914FBDAA60022AF9C /* test45.c */,
AB12D12A14FBDAA60022AF9C /* test46.ans */,
AB12D12B14FBDAA60022AF9C /* test46.c */,
AB12D12C14FBDAA60022AF9C /* test47.ans */,
AB12D12D14FBDAA60022AF9C /* test47.c */,
AB12D12E14FBDAA60022AF9C /* test48.ans */,
AB12D12F14FBDAA60022AF9C /* test48.c */,
AB12D13014FBDAA60022AF9C /* test49.ans */,
AB12D13114FBDAA60022AF9C /* test49.c */,
AB12D13214FBDAA60022AF9C /* test5.ans */,
AB12D13314FBDAA60022AF9C /* test5.c */,
AB12D13414FBDAA60022AF9C /* test50.ans */,
AB12D13514FBDAA60022AF9C /* test50.c */,
AB12D13614FBDAA60022AF9C /* test51.ans */,
AB12D13714FBDAA60022AF9C /* test51.c */,
AB12D13814FBDAA60022AF9C /* test52.ans */,
AB12D13914FBDAA60022AF9C /* test52.c */,
AB12D13A14FBDAA60022AF9C /* test53.ans */,
AB12D13B14FBDAA60022AF9C /* test53.c */,
AB12D13C14FBDAA60022AF9C /* test54.ans */,
AB12D13D14FBDAA60022AF9C /* test54.c */,
AB12D13E14FBDAA60022AF9C /* test55.ans */,
AB12D13F14FBDAA60022AF9C /* test55.c */,
AB12D14014FBDAA60022AF9C /* test56.ans */,
AB12D14114FBDAA60022AF9C /* test56.c */,
AB12D14214FBDAA60022AF9C /* test57.ans */,
AB12D14314FBDAA60022AF9C /* test57.c */,
AB12D14414FBDAA60022AF9C /* test58.ans */,
AB12D14514FBDAA60022AF9C /* test58.c */,
AB12D14614FBDAA60022AF9C /* test59.ans */,
AB12D14714FBDAA60022AF9C /* test59.c */,
AB12D14814FBDAA60022AF9C /* test6.ans */,
AB12D14914FBDAA60022AF9C /* test6.c */,
AB12D14A14FBDAA60022AF9C /* test60.ans */,
AB12D14B14FBDAA60022AF9C /* test60.c */,
AB12D14C14FBDAA60022AF9C /* test61.ans */,
AB12D14D14FBDAA60022AF9C /* test61.c */,
AB12D14E14FBDAA60022AF9C /* test62.ans */,
AB12D14F14FBDAA60022AF9C /* test62.c */,
AB12D15014FBDAA60022AF9C /* test63.ans */,
AB12D15114FBDAA60022AF9C /* test63.c */,
AB12D15214FBDAA60022AF9C /* test64.ans */,
AB12D15314FBDAA60022AF9C /* test64.c */,
AB12D15414FBDAA60022AF9C /* test65.ans */,
AB12D15514FBDAA60022AF9C /* test65.c */,
AB12D15614FBDAA60022AF9C /* test65.dat */,
AB12D15714FBDAA60022AF9C /* test7.ans */,
AB12D15814FBDAA60022AF9C /* test7.c */,
AB12D15914FBDAA60022AF9C /* test8.ans */,
AB12D15A14FBDAA60022AF9C /* test8.c */,
AB12D15B14FBDAA60022AF9C /* test9.ans */,
AB12D15C14FBDAA60022AF9C /* test9.c */,
AB12D15D14FBDAA60022AF9C /* threads */,
);
path = tests;
sourceTree = "<group>";
};
AB12D15D14FBDAA60022AF9C /* threads */ = {
isa = PBXGroup;
children = (
AB12D15E14FBDAA60022AF9C /* do_tests */,
AB12D15F14FBDAA60022AF9C /* Makefile */,
AB12D16014FBDAA60022AF9C /* README */,
AB12D16114FBDAA60022AF9C /* test1.c */,
AB12D16214FBDAA60022AF9C /* test2.c */,
);
path = threads;
sourceTree = "<group>";
};
AB43B2B514C37E520018D529 /* i386 */ = {
isa = PBXGroup;
children = (
AB43B2DF14C37E520018D529 /* efi_tables.c */,
AB43B2E014C37E520018D529 /* efi_tables.h */,
AB43B2E214C37E520018D529 /* libsa.h */,
AB1FFB0814FF0D8D006F7F4E /* lzss.c */,
AB43B2E314C37E520018D529 /* Makefile */,
AB43B2E414C37E520018D529 /* memory.h */,
AB43B2E514C37E520018D529 /* prf.c */,
AB43B2FD14C37E520018D529 /* console.c */,
AB43B2FE14C37E520018D529 /* convert.c */,
AB43B2FF14C37E520018D529 /* convert.h */,
ABD9A1FC150F706A008DA465 /* CoreHash.h */,
ABD9A1FF150F80C4008DA465 /* CoreHash.c */,
AB43B30014C37E520018D529 /* cpu.c */,
AB43B30114C37E520018D529 /* cpu.h */,
AB0E930C14C6223500F798D7 /* cpu_intel_amd.c */,
AB43B3D914C37E520018D529 /* util */ = {
isa = PBXGroup;
children = (
AB12D09614FBDAA60022AF9C /* uthash-1.9.5 2 */,
AB43B3DA14C37E520018D529 /* amlsgn.m */,
AB43B3DB14C37E520018D529 /* bdmesg.c */,
AB43B3DC14C37E530018D529 /* Intel_Acpi */,
branches/cparm/i386/libsaio/bootstruct.c
3030
3131
3232
33
33
3434
3535
3636
3737
3838
3939
40
41
42
40
41
42
4343
4444
45
46
45
46
4747
4848
4949
......
5555
5656
5757
58
58
5959
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
60
7661
77
78
79
62
63
8064
81
82
83
84
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
8586
86
87
8788
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
89119
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
117120
118121
119122
120123
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
121150
122151
123152
......
176205
177206
178207
179
180
181208
182209
183210
......
200227
201228
202229
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
228230
229231
230232
231233
232234
233
234
235
236
235237
236238
237239
......
249251
250252
251253
254
252255
253256
254257
......
257260
258261
259262
263
264
265
266
260267
261268
262269
#include "bootstruct.h"
#include "platform.h"
boot_args_common *bootArgs;
boot_args_common *bootArgs = NULL;
/*==========================================================================
* structure of parameters passed to
* the kernel by the booter.
*/
boot_args_Legacy *bootArgsLegacy;
boot_args_107 *bootArgs107;
boot_args_108 *bootArgs108;
boot_args_Legacy *bootArgsLegacy = NULL;
boot_args_107 *bootArgs107 = NULL;
boot_args_108 *bootArgs108 = NULL;
/* ... */
PrivateBootInfo_t *bootInfo;
Node *gMemoryMapNode;
PrivateBootInfo_t *bootInfo = NULL;
Node *gMemoryMapNode = NULL;
static char platformName[64];
{
bootArgs = (boot_args_common *)malloc(sizeof(boot_args_common));
bootInfo = (PrivateBootInfo_t *)malloc(sizeof(PrivateBootInfo_t));
if (bootArgs == 0 || bootInfo == 0)
if (bootArgs == NULL || bootInfo == NULL)
stop("Couldn't allocate boot info\n");
bzero(bootArgs, sizeof(boot_args_common));
bzero(bootInfo, sizeof(PrivateBootInfo_t));
// Get system memory map. Also update the size of the
// conventional/extended memory for backwards compatibility.
bootInfo->memoryMapCount =
getMemoryMap( bootInfo->memoryMap, kMemoryMapCountMax,
(unsigned long *) &bootInfo->convmem,
(unsigned long *) &bootInfo->extmem );
if ( bootInfo->memoryMapCount == 0 )
else
{
// BIOS did not provide a memory map, systems with
// discontiguous memory or unusual memory hole locations
// may have problems.
bzero(bootArgs, sizeof(boot_args_common));
bzero(bootInfo, sizeof(PrivateBootInfo_t));
bootInfo->convmem = getConventionalMemorySize();
bootInfo->extmem = getExtendedMemorySize();
}
// Get system memory map. Also update the size of the
// conventional/extended memory for backwards compatibility.
bootInfo->memoryMapCount =
getMemoryMap( bootInfo->memoryMap, kMemoryMapCountMax,
(unsigned long *) &bootInfo->convmem,
(unsigned long *) &bootInfo->extmem );
if ( bootInfo->memoryMapCount == 0 )
{
// BIOS did not provide a memory map, systems with
// discontiguous memory or unusual memory hole locations
// may have problems.
bootInfo->convmem = getConventionalMemorySize();
bootInfo->extmem = getExtendedMemorySize();
}
#if 0
bootInfo->configEnd = bootInfo->config;
bootInfo->configEnd = bootInfo->config;
#endif
bootArgs->Video.v_display = VGA_TEXT_MODE;
bootArgs->Video.v_display = VGA_TEXT_MODE;
DT__Initialize();
{
Node *node;
node = DT__FindNode("/", true);
if (node == 0) {
stop("Couldn't create root node");
}
getPlatformName(platformName);
{
int nameLen;
nameLen = strlen(platformName) + 1;
DT__AddProperty(node, "compatible", nameLen, platformName);
DT__AddProperty(node, "model", nameLen, platformName);
}
}
gMemoryMapNode = DT__FindNode("/chosen/memory-map", true);
safe_set_env(envConvMem, bootInfo->convmem);
safe_set_env(envExtMem, bootInfo->convmem);
safe_set_env(envMemoryMap, (uint32_t)bootInfo->memoryMap);
safe_set_env(envMemoryMapCnt, bootInfo->memoryMapCount);
init_done = 1;
}
DT__Initialize();
{
Node *node;
node = DT__FindNode("/", true);
if (node == 0) {
stop("Couldn't create root node");
}
getPlatformName(platformName);
{
int nameLen;
nameLen = strlen(platformName) + 1;
DT__AddProperty(node, "compatible", nameLen, platformName);
DT__AddProperty(node, "model", nameLen, platformName);
}
}
gMemoryMapNode = DT__FindNode("/chosen/memory-map", true);
safe_set_env(envConvMem, bootInfo->convmem);
safe_set_env(envExtMem, bootInfo->convmem);
safe_set_env(envMemoryMap, (uint32_t)bootInfo->memoryMap);
safe_set_env(envMemoryMapCnt, bootInfo->memoryMapCount);
init_done = 1;
}
}
/* boot args getters/setters. */
void setBootArgsVideoMode(int mode)
{
bootArgs->Video.v_display = mode;
}
uint32_t getVideoMode(void)
{
return bootArgs->Video.v_display;
}
uint32_t getBootArgsVideoPtrAtOffset(uint32_t offset)
{
char *vid = (char *)&bootArgs->Video ;
return (uint32_t)vid[offset];
}
void setBootArgsVideoStruct(Boot_Video*Video)
{
bootArgs->Video.v_display = Video->v_display;
bootArgs->Video.v_width = Video->v_width;
bootArgs->Video.v_height = Video->v_height;
bootArgs->Video.v_depth = Video->v_depth;
bootArgs->Video.v_rowBytes = Video->v_rowBytes;
bootArgs->Video.v_baseAddr = Video->v_baseAddr;
return;
}
#define AllocateKernelMemoryForBootArgs(Ver) \
{ \
bootArgs##Ver = (boot_args_##Ver *)AllocateKernelMemory(sizeof(boot_args_##Ver));\
/* Copy boot args after kernel and record address. */
/* Copy boot args after kernel and record address. */
void
reserveKern107BootStruct(void)
{
init_boot_args(Legacy);
}
void setBootArgsVideoMode(int mode)
{
bootArgs->Video.v_display = mode;
}
uint32_t getVideoMode(void)
{
return bootArgs->Video.v_display;
}
uint32_t getBootArgsVideoPtrAtOffset(uint32_t offset)
{
char *vid = (char *)&bootArgs->Video ;
return (uint32_t)vid[offset];
}
void setBootArgsVideoStruct(Boot_Video*Video)
{
bootArgs->Video.v_display = Video->v_display;
bootArgs->Video.v_width = Video->v_width;
bootArgs->Video.v_height = Video->v_height;
bootArgs->Video.v_depth = Video->v_depth;
bootArgs->Video.v_rowBytes = Video->v_rowBytes;
bootArgs->Video.v_baseAddr = Video->v_baseAddr;
return;
}
void
finalizeBootStruct(void)
{
{
int i;
EfiMemoryRange *memoryMap;
MemoryRange *range;
EfiMemoryRange *memoryMap = NULL;
MemoryRange *range = NULL;
uint64_tsane_size = 0; /* Memory size to use for defaults calculations */
int memoryMapCount = bootInfo->memoryMapCount;
if (memoryMap == NULL) {
stop("Unable to allocate kernel space for the memory map\n");
return;
}
bootArgs->MemoryMap = (uint32_t)memoryMap;
bootArgs->MemoryMapSize = sizeof(EfiMemoryRange) * memoryMapCount;
for (i=0; i<memoryMapCount; i++, memoryMap++) {
range = &bootInfo->memoryMap[i];
if (!range || !memoryMap) {
stop("Error while computing kernel memory map\n");
return;
}
switch(range->type) {
case kMemoryRangeACPI:
memoryMap->Type = kEfiACPIReclaimMemory;
branches/cparm/i386/libsaio/Makefile
4141
4242
4343
44
44
4545
4646
4747
cpu.o platform.o \
fake_efi.o \
device_inject.o pci_root.o \
convert.o acpi_tools.o smbios.o smp-imps.o uterror.o
convert.o acpi_tools.o smbios.o smp-imps.o uterror.o lzss.o
# example for AcpiCodec
#SAIO_OBJS += acpi_codec.o acpicode.o ACPICodec.o acpidecode.o
branches/cparm/i386/libsaio/cpu_intel_amd.c
391391
392392
393393
394
395
394
395
396396
397397
398398
399399
400
401
402
400
401
402
403
404
405
406
407
408
403409
404
405
410
411
406412
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
407439
408
409
440
441
410442
411
443
412444
413445
414446
415447
416
448
417449
418450
419451
......
421453
422454
423455
424
456
425457
426458
427459
428460
429
461
430462
431463
432464
......
444476
445477
446478
447
479
448480
449
481
450482
451483
452484
453485
454486
455
487
456488
457489
458490
......
461493
462494
463495
464
496
465497
466498
467499
468
500
469501
470502
471
503
472504
473505
474
475
476
477
478
479
480
481
506
507
508
509
510
511
512
513
482514
483515
484
485
486
487
516
517
518
519
488520
489
521
490522
491523
492524
493525
494526
495
527
496528
497529
498
530
499531
500532
501533
502534
503
535
504536
505537
506538
507539
508
540
509541
510542
511
543
512544
513545
514
546
515547
516548
517549
518
550
519551
520552
521553
522554
523555
524
556
525557
526
558
527559
528
560
529561
530562
531563
532564
533565
534566
535
567
536568
537569
538570
539571
540
572
541573
542
574
543575
544576
545
577
546578
547579
548
580
549581
550
582
551583
552584
553585
554586
555587
556
557
558
588
589
590
559591
560592
561
562
593
594
563595
564596
565597
566598
567599
568
600
569601
570602
571603
......
573605
574606
575607
576
577
608
609
578610
579611
580612
......
586618
587619
588620
589
590
621
622
591623
592624
593625
594626
595627
596628
597
629
598630
599
631
600632
601633
602634
603
635
604636
605637
606638
607639
608640
609
610
641
642
611643
612644
613645
614646
615
647
616648
617649
618
650
619651
620652
621
653
622654
623655
624656
625657
626
658
627659
628
660
629661
630662
631
663
632664
633
665
634666
635667
636668
......
648680
649681
650682
651
683
652684
653685
654686
......
673705
674706
675707
676
708
677709
678710
679711
680712
681713
682714
683
684
715
716
685717
686
718
687719
688720
689721
690
691
722
723
692724
693
725
694726
695727
696728
......
698730
699731
700732
701
733
702734
703735
704
736
705737
706738
707739
......
711743
712744
713745
714
746
715747
716
717
748
749
718750
719
751
720752
721
753
722754
723
724
725
755
756
757
726758
727
728
759
760
729761
730762
731
732
733
734
735
736
737
738
739
763
764
765
766
767
768
769
770
771
740772
741773
742774
......
783815
784816
785817
786
818
787819
788820
789821
790
822
791823
792824
793
825
794826
795827
796828
797829
798830
799
831
800832
801
833
802834
803835
804836
805
837
806838
807839
808840
809
841
810842
811843
812844
......
820852
821853
822854
823
824
855
856
825857
826858
827859
......
839871
840872
841873
842
874
843875
844876
845877
846
878
847879
848880
849881
850882
851
883
852884
853885
854886
855
887
856888
857889
858890
......
863895
864896
865897
866
898
867899
868900
869901
870
902
871903
872904
873905
874906
875907
876908
877
909
878910
879911
880912
881
913
882914
883915
884916
......
891923
892924
893925
894
895
926
927
896928
897929
898
930
899931
900932
901933
902934
903935
904
936
905937
906938
907
939
908940
909941
910942
911
943
912944
913945
914
915
946
947
916948
917
918
919
920
921
922
923
924
949
950
951
952
953
954
955
956
957
958
925959
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
960
961
951962
952
953
954
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
955978
979
980
981
982
983
984
985
986
956987
* - multi. is read from a specific MSR. In the case of Intel, there is:
* a max multi. (used to calculate the FSB freq.),
* and a current multi. (used to calculate the CPU freq.)
* - fsbFrequency = tscFrequency / multi
* - cpuFrequency = fsbFrequency * multi
* - FSBFreq = TSCFreq / multi
* - CPUFreq = FSBFreq * multi
*/
void scan_cpu(PlatformInfo_t *p)
{
uint64_ttscFrequency = 0, fsbFrequency = 0, cpuFrequency = 0;
uint64_tmsr;
uint8_tmaxcoef = 0, maxdiv = 0, currcoef = 0, currdiv = 0;
uint64_tmsr = 0;
uint64_tFeatures = 0;// CPU Features like MMX, SSE2, VT ...
uint64_tExtFeatures = 0; // CPU Extended Features like SYSCALL, XD, EM64T, LAHF ...
uint64_tTSCFreq = 0 ;
uint64_t FSBFreq = 0 ;
uint64_t CPUFreq = 0;
uint32_treg[4];
uint32_t cores_per_package = 0;
uint32_t logical_per_package = 0;
uint32_t cores_per_package = 0;
uint32_t logical_per_package = 0;
uint32_tVendor = 0;// Vendor
uint32_tSignature = 0;// Signature
uint8_t Stepping = 0;// Stepping
uint8_t Model = 0;// Model
uint8_t ExtModel = 0;// Extended Model
uint8_t Family = 0;// Family
uint8_t ExtFamily = 0;// Extended Family
uint32_tNoCores = 0;// No Cores per Package
uint32_tNoThreads = 0;// Threads per Package
uint8_t Brand = 0;
uint32_tMicrocodeVersion = 0; // The microcode version number a.k.a. signature a.k.a. BIOS ID
uint8_t isMobile = 0;
boolean_tdynamic_acceleration = 0;
boolean_tinvariant_APIC_timer = 0;
boolean_tfine_grain_clock_mod = 0;
uint32_t cpuid_max_basic = 0;
uint32_t cpuid_max_ext = 0;
uint32_tsub_Cstates = 0;
uint32_t extensions = 0;
uint8_tmaxcoef = 0, maxdiv = 0, currcoef = 0, currdiv = 0;
charCpuBrandString[48];// 48 Byte Branding String
do_cpuid(0, reg);
p->CPU.Vendor= reg[ebx];
p->CPU.cpuid_max_basic = reg[eax];
Vendor= reg[ebx];
cpuid_max_basic = reg[eax];
if (p->CPU.Vendor == 0x756E6547 /* Intel */)
if (Vendor == CPUID_VENDOR_INTEL)
{
do_cpuid2(0x00000004, 0, reg);
cores_per_package= bitfield(reg[eax], 31, 26) + 1;
}
else if (p->CPU.Vendor != 0x68747541 /* AMD */)
else if (Vendor != CPUID_VENDOR_AMD)
{
stop("Error: CPU unsupported\n");
halt();
/* get extended cpuid results */
do_cpuid(0x80000000, reg);
p->CPU.cpuid_max_ext = reg[eax];
cpuid_max_ext = reg[eax];
/* Begin of Copyright: from Apple's XNU cpuid.c */
/* get brand string (if supported) */
if (p->CPU.cpuid_max_ext > 0x80000004)
if (cpuid_max_ext > 0x80000004)
{
char str[128], *s;
/*
if (*s != ' ') break;
}
strlcpy(p->CPU.BrandString,s, sizeof(p->CPU.BrandString));
strlcpy(CpuBrandString,s, sizeof(CpuBrandString));
if (!strncmp(p->CPU.BrandString, CPUID_STRING_UNKNOWN, min(sizeof(p->CPU.BrandString), (unsigned)strlen(CPUID_STRING_UNKNOWN) + 1)))
if (!strncmp(CpuBrandString, CPUID_STRING_UNKNOWN, min(sizeof(CpuBrandString), (unsigned)strlen(CPUID_STRING_UNKNOWN) + 1)))
{
/*
* This string means we have a firmware-programmable brand string,
* and the firmware couldn't figure out what sort of CPU we have.
*/
p->CPU.BrandString[0] = '\0';
CpuBrandString[0] = '\0';
}
}
* and bracket this with the approved procedure for reading the
* the microcode version number a.k.a. signature a.k.a. BIOS ID
*/
if (p->CPU.Vendor == 0x756E6547 /* Intel */)
if (Vendor == CPUID_VENDOR_INTEL )
{
wrmsr64(MSR_IA32_BIOS_SIGN_ID, 0);
do_cpuid(1, reg);
p->CPU.MicrocodeVersion =
MicrocodeVersion =
(uint32_t) (rdmsr64(MSR_IA32_BIOS_SIGN_ID) >> 32);
}
else if (p->CPU.Vendor != 0x68747541 /* AMD */)
else if (Vendor != CPUID_VENDOR_AMD)
do_cpuid(1, reg);
p->CPU.Signature = reg[eax];
p->CPU.Stepping = bitfield(reg[eax], 3, 0);
p->CPU.Model = bitfield(reg[eax], 7, 4);
p->CPU.Family = bitfield(reg[eax], 11, 8);
p->CPU.ExtModel = bitfield(reg[eax], 19, 16);
p->CPU.ExtFamily = bitfield(reg[eax], 27, 20);
p->CPU.Brand = bitfield(reg[ebx], 7, 0);
p->CPU.Features = quad(reg[ecx], reg[edx]);
Signature = reg[eax];
Stepping = bitfield(reg[eax], 3, 0);
Model = bitfield(reg[eax], 7, 4);
Family = bitfield(reg[eax], 11, 8);
ExtModel = bitfield(reg[eax], 19, 16);
ExtFamily = bitfield(reg[eax], 27, 20);
Brand = bitfield(reg[ebx], 7, 0);
Features = quad(reg[ecx], reg[edx]);
/* Fold extensions into family/model */
if (p->CPU.Family == 0x0f)
p->CPU.Family += p->CPU.ExtFamily;
if (p->CPU.Family == 0x0f || p->CPU.Family == 0x06)
p->CPU.Model += (p->CPU.ExtModel << 4);
if (Family == 0x0f)
Family += ExtFamily;
if (Family == 0x0f || Family == 0x06)
Model += (ExtModel << 4);
if (p->CPU.Features & CPUID_FEATURE_HTT)
if (Features & CPUID_FEATURE_HTT)
logical_per_package =
bitfield(reg[ebx], 23, 16);
else
logical_per_package = 1;
if (p->CPU.cpuid_max_ext >= 0x80000001)
if (cpuid_max_ext >= 0x80000001)
{
do_cpuid(0x80000001, reg);
p->CPU.ExtFeatures =
ExtFeatures =
quad(reg[ecx], reg[edx]);
}
if (p->CPU.cpuid_max_ext >= 0x80000007)
if (cpuid_max_ext >= 0x80000007)
{
do_cpuid(0x80000007, reg);
/* Fold in the Invariant TSC feature bit, if present */
p->CPU.ExtFeatures |=
ExtFeatures |=
reg[edx] & (uint32_t)CPUID_EXTFEATURE_TSCI;
if (p->CPU.Vendor == 0x68747541 /* AMD */)
if (Vendor == CPUID_VENDOR_AMD)
{
/* Fold in the Hardware P-State control feature bit, if present */
p->CPU.ExtFeatures |=
ExtFeatures |=
reg[edx] & (uint32_t)_Bit(7);
/* Fold in the read-only effective frequency interface feature bit, if present */
p->CPU.ExtFeatures |=
ExtFeatures |=
reg[edx] & (uint32_t)_Bit(10);
}
}
if (p->CPU.Vendor == 0x68747541 /* AMD */)
if (Vendor == CPUID_VENDOR_AMD )
{
if (p->CPU.cpuid_max_ext >= 0x80000008)
if (cpuid_max_ext >= 0x80000008)
{
if (p->CPU.Features & CPUID_FEATURE_HTT)
if (Features & CPUID_FEATURE_HTT)
{
do_cpuid(0x80000008, reg);
cores_per_package= bitfield(reg[ecx], 7 , 0) + 1; // NC + 1
}
}
}
if (p->CPU.cpuid_max_basic >= 0x5) {
if (cpuid_max_basic >= 0x5) {
/*
* Extract the Monitor/Mwait Leaf info:
*/
do_cpuid(5, reg);
if (p->CPU.Vendor == 0x756E6547 /* Intel */)
if (Vendor == CPUID_VENDOR_INTEL )
{
p->CPU.sub_Cstates = reg[edx];
sub_Cstates = reg[edx];
}
p->CPU.extensions = reg[ecx];
extensions = reg[ecx];
}
if (p->CPU.Vendor == 0x756E6547 /* Intel */)
if (Vendor == CPUID_VENDOR_INTEL)
{
if (p->CPU.cpuid_max_basic >= 0x6)
if (cpuid_max_basic >= 0x6)
{
/*
* The thermal and Power Leaf:
*/
do_cpuid(6, reg);
p->CPU.dynamic_acceleration = bitfield(reg[eax], 1, 1); // "Dynamic Acceleration Technology (Turbo Mode)"
p->CPU.invariant_APIC_timer = bitfield(reg[eax], 2, 2); // "Invariant APIC Timer"
p->CPU.fine_grain_clock_mod = bitfield(reg[eax], 4, 4);
dynamic_acceleration = bitfield(reg[eax], 1, 1); // "Dynamic Acceleration Technology (Turbo Mode)"
invariant_APIC_timer = bitfield(reg[eax], 2, 2); // "Invariant APIC Timer"
fine_grain_clock_mod = bitfield(reg[eax], 4, 4);
}
if ((p->CPU.Vendor == 0x756E6547 /* Intel */) &&
(p->CPU.Family == 0x06))
if ((Vendor == 0x756E6547 /* Intel */) &&
(Family == 0x06))
{
/*
* Find the number of enabled cores and threads
* (which determines whether SMT/Hyperthreading is active).
*/
switch (p->CPU.Model)
switch (Model)
{
case CPUID_MODEL_DALES_32NM:
case CPUID_MODEL_WESTMERE_EX:
{
msr = rdmsr64(MSR_CORE_THREAD_COUNT);
p->CPU.NoThreads = bitfield((uint32_t)msr, 15, 0);
p->CPU.NoCores = bitfield((uint32_t)msr, 19, 16);
NoThreads = bitfield((uint32_t)msr, 15, 0);
NoCores = bitfield((uint32_t)msr, 19, 16);
break;
}
case CPUID_MODEL_JAKETOWN:
{
msr = rdmsr64(MSR_CORE_THREAD_COUNT);
p->CPU.NoThreads = bitfield((uint32_t)msr, 15, 0);
p->CPU.NoCores = bitfield((uint32_t)msr, 31, 16);
NoThreads = bitfield((uint32_t)msr, 15, 0);
NoCores = bitfield((uint32_t)msr, 31, 16);
break;
}
}
}
}
if (p->CPU.NoCores == 0)
if (NoCores == 0)
{
if (p->CPU.Vendor == 0x68747541 /* AMD */)
if (p->CPU.Vendor == CPUID_VENDOR_AMD)
{
if (!cores_per_package) {
//legacy method
if ((p->CPU.ExtFeatures & _HBit(1)/* CmpLegacy */) && ( p->CPU.Features & CPUID_FEATURE_HTT) )
if ((ExtFeatures & _HBit(1)/* CmpLegacy */) && ( Features & CPUID_FEATURE_HTT) )
cores_per_package = logical_per_package;
else
cores_per_package = 1;
}
}
p->CPU.NoThreads = logical_per_package;
p->CPU.NoCores = cores_per_package ? cores_per_package : 1 ;
NoThreads = logical_per_package;
NoCores = cores_per_package ? cores_per_package : 1 ;
}
/* End of Copyright: from Apple's XNU cpuid.c */
fsbFrequency = (uint64_t)(compute_bclk() * 1000000);
FSBFreq = (uint64_t)(compute_bclk() * 1000000);
#ifdef LEGACY_CPU
tscFrequency = measure_tsc_frequency();
TSCFreq = measure_tsc_frequency();
#endif
if (p->CPU.Vendor == 0x68747541 /* AMD */)
if (Vendor == CPUID_VENDOR_AMD)
{
#define K8_FIDVID_STATUS0xC0010042
#define K10_COFVID_STATUS0xC0010071
if (p->CPU.ExtFeatures & _Bit(10))
if (ExtFeatures & _Bit(10))
{
cpuFrequency = measure_aperf_frequency();
CPUFreq = measure_aperf_frequency();
}
if ((p->CPU.Vendor == 0x68747541 /* AMD */) && (p->CPU.Family == 0x0f))
if ((Vendor == 0x68747541 /* AMD */) && (Family == 0x0f))
{
switch(p->CPU.ExtFamily)
switch(ExtFamily)
{
case 0x00: /* K8 */
msr = rdmsr64(K8_FIDVID_STATUS);
if (bitfield(reg[ecx], 0, 0) == 1)
{
uint64_t aperf = measure_aperf_frequency();
cpuFrequency = aperf;
CPUFreq = aperf;
}
*/
// NOTE: tsc runs at the maccoeff (non turbo)
break;
}
if (!fsbFrequency)
if (!FSBFreq)
{
if (maxcoef)
{
if (currdiv)
{
if (!currcoef) currcoef = maxcoef;
if (!cpuFrequency)
fsbFrequency = ((tscFrequency * currdiv) / currcoef);
if (!CPUFreq)
FSBFreq = ((TSCFreq * currdiv) / currcoef);
else
fsbFrequency = ((cpuFrequency * currdiv) / currcoef);
FSBFreq = ((CPUFreq * currdiv) / currcoef);
DBG("%d.%d\n", currcoef / currdiv, ((currcoef % currdiv) * 100) / currdiv);
} else {
if (!cpuFrequency)
fsbFrequency = (tscFrequency / maxcoef);
if (!CPUFreq)
FSBFreq = (TSCFreq / maxcoef);
else
fsbFrequency = (cpuFrequency / maxcoef);
FSBFreq = (CPUFreq / maxcoef);
DBG("%d\n", currcoef);
}
}
{
if (currdiv)
{
fsbFrequency = ((tscFrequency * currdiv) / currcoef);
FSBFreq = ((TSCFreq * currdiv) / currcoef);
DBG("%d.%d\n", currcoef / currdiv, ((currcoef % currdiv) * 100) / currdiv);
} else {
fsbFrequency = (tscFrequency / currcoef);
FSBFreq = (TSCFreq / currcoef);
DBG("%d\n", currcoef);
}
}
// NOTE: This is not the approved method,
// the method provided by AMD is:
// if ((PowerNow == enabled (p->CPU.cpuid_max_ext >= 0x80000007)) && (StartupFID(??) != MaxFID(??))) then "mobile processor present"
// if ((PowerNow == enabled (cpuid_max_ext >= 0x80000007)) && (StartupFID(??) != MaxFID(??))) then "mobile processor present"
if (strstr(p->CPU.BrandString, "obile"))
p->CPU.isMobile = true;
if (strstr(CpuBrandString, "obile"))
isMobile = true;
else
p->CPU.isMobile = false;
isMobile = false;
DBG("%s platform detected.\n", p->CPU.isMobile?"Mobile":"Desktop");
DBG("%s platform detected.\n", isMobile?"Mobile":"Desktop");
}
else if ((p->CPU.Vendor == 0x756E6547 /* Intel */) &&
((p->CPU.Family == 0x06) ||
(p->CPU.Family == 0x0f)))
else if ((Vendor == CPUID_VENDOR_INTEL) &&
((Family == 0x06) ||
(Family == 0x0f)))
{
if ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0c) ||
(p->CPU.Family == 0x0f && p->CPU.Model >= 0x03))
if ((Family == 0x06 && Model >= 0x0c) ||
(Family == 0x0f && Model >= 0x03))
{
/* Nehalem CPU model */
if (p->CPU.Family == 0x06 && (p->CPU.Model == CPUID_MODEL_NEHALEM ||
p->CPU.Model == CPUID_MODEL_FIELDS ||
p->CPU.Model == CPUID_MODEL_DALES ||
p->CPU.Model == CPUID_MODEL_DALES_32NM ||
p->CPU.Model == CPUID_MODEL_WESTMERE ||
p->CPU.Model == CPUID_MODEL_NEHALEM_EX ||
p->CPU.Model == CPUID_MODEL_WESTMERE_EX ||
p->CPU.Model == CPUID_MODEL_SANDYBRIDGE ||
p->CPU.Model == CPUID_MODEL_JAKETOWN))
if (Family == 0x06 && (Model == CPUID_MODEL_NEHALEM ||
Model == CPUID_MODEL_FIELDS ||
Model == CPUID_MODEL_DALES ||
Model == CPUID_MODEL_DALES_32NM ||
Model == CPUID_MODEL_WESTMERE ||
Model == CPUID_MODEL_NEHALEM_EX ||
Model == CPUID_MODEL_WESTMERE_EX ||
Model == CPUID_MODEL_SANDYBRIDGE ||
Model == CPUID_MODEL_JAKETOWN))
{
uint8_tbus_ratio_max = 0, bus_ratio_min = 0;
uint32_tmax_ratio = 0;
#ifdef LEGACY_CPU
if (bus_ratio_max)
{
fsbFrequency = (tscFrequency / bus_ratio_max);
FSBFreq = (TSCFreq / bus_ratio_max);
}
#endif
//valv: Turbo Ratio Limit
if ((p->CPU.Model != 0x2e) && (p->CPU.Model != 0x2f))
if ((Model != 0x2e) && (Model != 0x2f))
{
//msr = rdmsr64(MSR_TURBO_RATIO_LIMIT);
cpuFrequency = bus_ratio_max * fsbFrequency;
CPUFreq = bus_ratio_max * FSBFreq;
max_ratio = bus_ratio_max * 10;
}
else
{
#ifdef LEGACY_CPU
cpuFrequency = tscFrequency;
CPUFreq = TSCFreq;
#else
cpuFrequency = bus_ratio_max * fsbFrequency;
CPUFreq = bus_ratio_max * FSBFreq;
#endif
}
#if DEBUG_CPU
DBG("Sticking with [BCLK: %dMhz, Bus-Ratio: %d]\n", fsbFrequency / 1000000, max_ratio);
DBG("Sticking with [BCLK: %dMhz, Bus-Ratio: %d]\n", FSBFreq / 1000000, max_ratio);
#endif
currcoef = bus_ratio_max;
tscFrequency = cpuFrequency;
TSCFreq = CPUFreq;
}
else
{
/* Non-integer bus ratio for the current-multi (undocumented)*/
currdiv = (msr >> 14) & 0x01;
if ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0e) ||
(p->CPU.Family == 0x0f)) // This will always be model >= 3
if ((Family == 0x06 && Model >= 0x0e) ||
(Family == 0x0f)) // This will always be model >= 3
{
/* On these models, maxcoef defines TSC freq */
maxcoef = (msr >> 40) & 0x1f;
if (maxdiv)
{
fsbFrequency = ((tscFrequency * 2) / ((maxcoef * 2) + 1));
FSBFreq = ((TSCFreq * 2) / ((maxcoef * 2) + 1));
}
else
{
fsbFrequency = (tscFrequency / maxcoef);
FSBFreq = (TSCFreq / maxcoef);
}
if (currdiv)
{
cpuFrequency = (fsbFrequency * ((currcoef * 2) + 1) / 2);
CPUFreq = (FSBFreq * ((currcoef * 2) + 1) / 2);
}
else
{
cpuFrequency = (fsbFrequency * currcoef);
CPUFreq = (FSBFreq * currcoef);
}
#if DEBUG_CPU
DBG("max: %d%s current: %d%s\n", maxcoef, maxdiv ? ".5" : "",currcoef, currdiv ? ".5" : "");
if (currdiv)
{
cpuFrequency = (fsbFrequency * ((currcoef * 2) + 1) / 2);
CPUFreq = (FSBFreq * ((currcoef * 2) + 1) / 2);
}
else
{
cpuFrequency = (fsbFrequency * currcoef);
CPUFreq = (FSBFreq * currcoef);
}
if (maxcoef)
{
if (maxdiv)
{
tscFrequency = (fsbFrequency * ((maxcoef * 2) + 1)) / 2;
TSCFreq = (FSBFreq * ((maxcoef * 2) + 1)) / 2;
}
else
{
tscFrequency = fsbFrequency * maxcoef;
TSCFreq = FSBFreq * maxcoef;
}
}
#if DEBUG_CPU
}
/* Mobile CPU ? */
//Slice
p->CPU.isMobile = false;
switch (p->CPU.Model)
isMobile = false;
switch (Model)
{
case 0x0D:
p->CPU.isMobile = true;
isMobile = true;
break;
case 0x02:
case 0x03:
case 0x04:
case 0x06:
p->CPU.isMobile = (rdmsr64(0x2C) & (1 << 21));
isMobile = (rdmsr64(0x2C) & (1 << 21));
break;
default:
p->CPU.isMobile = (rdmsr64(0x17) & (1 << 28));
isMobile = (rdmsr64(0x17) & (1 << 28));
break;
}
DBG("%s platform detected.\n", p->CPU.isMobile?"Mobile":"Desktop");
DBG("%s platform detected.\n",isMobile?"Mobile":"Desktop");
}
if (!cpuFrequency) cpuFrequency = tscFrequency;
if (!tscFrequency) tscFrequency = cpuFrequency;
if (!CPUFreq) CPUFreq = TSCFreq;
if (!TSCFreq) TSCFreq = CPUFreq;
p->CPU.MaxCoef = maxcoef;
p->CPU.MaxDiv = maxdiv;
p->CPU.CurrCoef = currcoef;
p->CPU.CurrDiv = currdiv;
p->CPU.TSCFrequency = tscFrequency ;
p->CPU.FSBFrequency = fsbFrequency ;
p->CPU.CPUFrequency = cpuFrequency ;
if (Vendor == CPUID_VENDOR_INTEL) {
set_env(envDynamicAcceleration, dynamic_acceleration);
set_env(envInvariantAPICTimer, invariant_APIC_timer);
set_env(envFineGrainClockMod, fine_grain_clock_mod);
set_env(envMicrocodeVersion, MicrocodeVersion);
set_env(envSubCstates, sub_Cstates);
}
set_env(envVendor, Vendor);
set_env(envModel, Model);
set_env(envExtModel, ExtModel);
DBG("CPU: Vendor/Model/ExtModel: 0x%x/0x%x/0x%x\n", p->CPU.Vendor, p->CPU.Model, p->CPU.ExtModel);
DBG("CPU: Family/ExtFamily: 0x%x/0x%x\n", p->CPU.Family, p->CPU.ExtFamily);
if (p->CPU.Vendor == 0x68747541 /* AMD */)
{
DBG("CPU (AMD): TSCFreq: %dMHz\n", p->CPU.TSCFrequency / 1000000);
DBG("CPU (AMD): FSBFreq: %dMHz\n", p->CPU.FSBFrequency / 1000000);
DBG("CPU (AMD): CPUFreq: %dMHz\n", p->CPU.CPUFrequency / 1000000);
DBG("CPU (AMD): MaxCoef/CurrCoef: 0x%x/0x%x\n", p->CPU.MaxCoef, p->CPU.CurrCoef);
DBG("CPU (AMD): MaxDiv/CurrDiv: 0x%x/0x%x\n", p->CPU.MaxDiv, p->CPU.CurrDiv);
}
else
{
DBG("CPU: TSCFreq: %dMHz\n", p->CPU.TSCFrequency / 1000000);
DBG("CPU: FSBFreq: %dMHz\n", p->CPU.FSBFrequency / 1000000);
DBG("CPU: CPUFreq: %dMHz\n", p->CPU.CPUFrequency / 1000000);
DBG("CPU: MaxCoef/CurrCoef: 0x%x/0x%x\n", p->CPU.MaxCoef, p->CPU.CurrCoef);
DBG("CPU: MaxDiv/CurrDiv: 0x%x/0x%x\n", p->CPU.MaxDiv, p->CPU.CurrDiv);
}
DBG("CPU: NoCores/NoThreads: %d/%d\n", p->CPU.NoCores, p->CPU.NoThreads);
DBG("CPU: Features: 0x%08x\n", p->CPU.Features);
DBG("CPU: ExtFeatures: 0x%08x\n", p->CPU.ExtFeatures);
if (p->CPU.Vendor == 0x756E6547 /* Intel */)
DBG("CPU: MicrocodeVersion: %d\n", p->CPU.MicrocodeVersion);
set_env(envCPUIDMaxBasic, cpuid_max_basic);
set_env(envCPUIDMaxBasic, cpuid_max_ext);
#if DEBUG_CPU
pause();
#endif
set_env_copy(envBrandString, CpuBrandString, sizeof(CpuBrandString));
set_env(envSignature, Signature);
set_env(envStepping, Stepping);
set_env(envFamily, Family);
set_env(envExtModel, ExtModel);
set_env(envExtFamily, ExtFamily);
set_env(envBrand, Brand);
set_env(envFeatures, Features);
set_env(envExtFeatures, ExtFeatures);
set_env(envExtensions, extensions);
set_env(envNoThreads, NoThreads);
set_env(envNoCores, NoCores);
set_env(envIsMobile, isMobile);
set_env(envMaxCoef, maxcoef);
set_env(envMaxDiv, maxdiv);
set_env(envCurrCoef, currcoef);
set_env(envCurrDiv, currdiv);
set_env(envTSCFreq, TSCFreq);
set_env(envFSBFreq, FSBFreq);
set_env(envCPUFreq, CPUFreq);
}
branches/cparm/i386/libsaio/modules.c
659659
660660
661661
662
662
663663
664664
665665
case REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB:
{
// Locate address to begin rebasing
segmentAddress = 0;
//segmentAddress = 0;
struct segment_command* segCommand = NULL; // NOTE: 32bit only
branches/cparm/i386/libsaio/platform.c
11
22
33
4
4
55
66
77
......
405405
406406
407407
408
409
410
411
412
413
414
415
416
417
418
408419
409420
410421
/*
* platform_env.c
*
* Copyright 2010,2011 Cadet-petit Armel <armelcadetpetit@gmail.com>. All rights reserved.
* Copyright 2012 Cadet-petit Armel <armelcadetpetit@gmail.com>. All rights reserved.
*/
#include "libsaio.h"
// shamefully ripped to http://wiki.osdev.org/CMOS
/*
* http://wiki.osdev.org/OSDev_Wiki:General_disclaimer
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#define CURRENT_YEAR 2012 // Change this each year!
static int century_register = 0x00; // Set by ACPI table parsing code if possible(... in FADT table)
branches/cparm/i386/libsaio/CoreHash.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
/*
* CoreHash usage example
*
*/
#include "libsaio.h"
#include "bootstruct.h"
#include "pci.h"
#include "platform.h"
#include "cpu.h"
#include "CoreHash.h"
#ifndef DEBUG_PLATFORM
#define DEBUG_PLATFORM 0
#endif
#if DEBUG_PLATFORM
#define DBG(x...)printf(x)
#else
#define DBG(x...)
#endif
char *gboardproduct = NULL;
char *gPlatformName = NULL;
char *gRootDevice = NULL;
typedef enum envtype {
kEnvPtr = 0,
kEnvValue = 1
} envtype;
struct env_struct {
CoreHashHeader
unsigned long value;
void * ptr;
enum envtype Type;
};
// CoreHash Declarations
CHInitStr(env_struct)
CHUnInit(env_struct)
static void CopyVarPtr (struct env_struct *var, void* ptr, size_t size);
static struct env_struct *find_env(const char *name);
static void _re_set_env_copy(struct env_struct *var , void* ptr,size_t size);
struct env_struct *platform_env = NULL;
static void CopyVarPtr (struct env_struct *var, void* ptr, size_t size)
{
var->ptr = malloc(size);
memcpy(var->ptr, ptr, size);
}
static struct env_struct *find_env(const char *name) {
return env_struct_FindStrVar(name,platform_env);
}
static void _re_set_env_copy(struct env_struct *var , void* ptr,size_t size) {
if (var->Type == kEnvPtr) {
return ;
}
if (var->ptr) {
free(var->ptr);
var->ptr = NULL;
}
CopyVarPtr(var, ptr, size);
return;
}
void re_set_env_copy(const char *name , void* ptr,size_t size) {
struct env_struct *var;
var = find_env(name);
if (!var|| (var->Type == kEnvPtr)) {
printf("Unable to find environement variable %s\n",name);
return ;
}
_re_set_env_copy(var , ptr, size);
return;
}
static void _set_env(const char *name, unsigned long value, enum envtype Type, void* ptr, size_t size ) {
struct env_struct *var;
var = env_struct_NewStrVar(name, &platform_env);
if (!var) {
return;
}
if (Type == kEnvPtr) {
CopyVarPtr( var, ptr, size);
}
else if (Type == kEnvValue)
var->value = value;
else
return;
var->Type = Type;
}
/* Warning: set_env will create a new variable each time it will be called,
* if you want to set again an existing variable, please use safe_set_env or re_set_env .
* NOTE: If you set several times the "same variable" by using this function,
* the HASH_COUNT will grow up,
* but hopefully find_env will return the last variable that you have set with the same name
* ex: set_env("test",10);
* set_env("test",20);
*
* HASH_COUNT will be equal to 2, get_env("test") will return 20
*
* safe_set_env("test",10);
* safe_set_env("test",20);
*
* HASH_COUNT will be equal to 1, get_env("test") will return 20
*
* set_env("test",10);
* re_set_env("test",20);
*
* HASH_COUNT will be equal to 1, get_env("test") will return 20
*
*/
void set_env(const char *name, unsigned long value ) {
_set_env(name, value, kEnvValue,0,0);
}
void set_env_copy(const char *name, void * ptr, size_t size ) {
_set_env(name, 0, kEnvPtr,ptr,size);
}
unsigned long get_env_var(const char *name) {
struct env_struct *var;
var = find_env(name);
if (!var) {
printf("Unable to find environement variable %s\n",name);
return 0;
}
if (var->Type != kEnvValue) {
printf("Variable %s is not a value\n",name);
return 0;
}
return var->value;
}
unsigned long get_env(const char *name) {
return get_env_var(name);
}
void * get_env_ptr(const char *name) {
struct env_struct *var;
var = find_env(name);
if (!var) {
printf("Unable to get environement ptr variable %s\n",name);
return 0;
}
if (var->Type != kEnvPtr) {
printf("Variable %s is not a ptr\n",name);
return 0;
}
return var->ptr;
}
/* If no specified variable exist, safe_set_env will create one, else it only modify the value */
static void _safe_set_env(const char *name, unsigned long long value, enum envtype Type, void* ptr, size_t size )
{
struct env_struct *var;
var = find_env(name);
if (!var) {
if (Type == kEnvPtr) {
_set_env(name, 0, kEnvPtr,ptr,size);
}
else if (Type == kEnvValue) {
_set_env(name, value, kEnvValue,0,0);
}
}
else if (var->Type != Type) {
return;
}
else {
if (Type == kEnvValue)
var->value = value;
else if (Type == kEnvPtr)
_re_set_env_copy(var,ptr,size);
}
return;
}
void safe_set_env_copy(const char *name , void * ptr, size_t size ) {
_safe_set_env(name, 0, kEnvPtr,ptr,size);
return;
}
void safe_set_env(const char *name , unsigned long value) {
_safe_set_env(name, value, kEnvValue,0,0);
return;
}
void re_set_env(const char *name , unsigned long value) {
struct env_struct *var;
var = find_env(name);
if (!var || (var->Type != kEnvValue)/* kEnvPtr currently unsupported */) {
printf("Unable to reset environement value variable %s\n",name);
return ;
}
var->value = value;
return;
}
void unset_env(const char *name) {
env_struct_DeleteStrVar(name, platform_env);
}
void free_platform_env(void) {
env_struct_DeleteAll(platform_env );
}
branches/cparm/i386/libsaio/CoreHash.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
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
//
// CoreHash.h
//
// Created by Cadet-petit Armel <armelcadetpetit@gmail.com> on 08/03/12.
// Copyright (c) 2012 . All rights reserved.
//
// CoreHash allows in few lines to take full advantages of hashable structures.
#ifndef CoreHash_h
#define CoreHash_h
#include "uthash.h"
//CoreHash Header and reserved fields
#define CoreHashHeader \
char name[10]; \
int id; \
UT_hash_handle hh; /* makes this structure hashable */
#define __CHFindStrVar(HObj) \
static struct HObj * HObj##_FindStrVar(const char *name, struct HObj *container) { \
struct HObj *var; \
\
if (setjmp(h_buf_error) == -1) { \
\
return NULL; \
} else { \
HASH_FIND_STR( container, name, var ); \
} \
return var; \
}
#define __CHNewStrVar(HObj) \
static struct HObj * HObj##_NewStrVar(const char *name, struct HObj **container ) { \
struct HObj *var; \
\
var = (struct HObj*)malloc(sizeof(struct HObj)); \
if (!var) \
return NULL; \
\
strlcpy(var->name, name, sizeof(var->name));\
\
if (setjmp(h_buf_error) == -1) { \
\
free(var); \
return NULL; \
} else { \
HASH_ADD_STR( *container, name, var ); \
\
} \
return var;\
}
#define __CHFindStrVarOrCreate(HObj)\
static struct HObj * HObj##_FindStrVarOrCreate(const char *name, struct HObj *container )\
{\
struct HObj *var;\
\
var = HObj##_FindStrVar(name,container);\
\
if (!var) {\
HObj##_NewStrVar(name,&container); \
}\
return var;\
}
#define __CHDeleteStrVar(HObj) \
static void HObj##_DeleteStrVar(const char *name, struct HObj *container ) { \
struct HObj *var; \
\
var = HObj##_FindStrVar(name,container); \
\
if (!var) { \
return; \
} \
\
if (setjmp(h_buf_error) == -1) { \
return; \
} else { \
HASH_DEL( container, var); \
} \
free(var); \
}
#define CHInitStr(HObj) \
__CHFindStrVar(HObj) \
__CHNewStrVar(HObj) \
__CHFindStrVarOrCreate(HObj) \
__CHDeleteStrVar(HObj)
//CoreHash Int Implementation
#define __CHFindIntVar(HObj) \
static struct HObj * HObj##_FindIntVar(int id, struct HObj *container) {\
struct HObj *var; \
\
if (setjmp(h_buf_error) == -1) { \
\
return NULL; \
} else { \
HASH_FIND_INT( container, &id, var ); \
} \
return var; \
}
#define __CHNewIntVar(HObj) \
static struct HObj * HObj##_NewIntVar(int id, struct HObj **container ) {\
struct HObj *var; \
\
var = (struct HObj*)malloc(sizeof(struct HObj)); \
if (!var) \
return NULL; \
\
var->id = id;\
\
if (setjmp(h_buf_error) == -1) { \
\
free(var); \
return NULL; \
} else { \
HASH_ADD_INT( *container, id, var ); \
\
} \
return var;\
}
#define __CHFindIntVarOrCreate(HObj) \
static struct HObj * HObj##_FindIntVarOrCreate(int id, struct HObj *container )\
{ \
struct HObj *var; \
\
var = HObj##_FindIntVar(id,container);\
\
if (!var) { \
HObj##_NewIntVar(id,&container); \
} \
return var; \
}
#define __CHDeleteIntVar(HObj)\
static void HObj##_DeleteIntVar(int id, struct HObj *container ) {\
struct HObj *var;\
\
var = HObj##_FindIntVar(id,container);\
\
if (!var) {\
return;\
}\
\
if (setjmp(h_buf_error) == -1) {\
return;\
} else {\
HASH_DEL( container, var);\
}\
free(var);\
}
#define CHInitInt(HObj) \
__CHFindIntVar(HObj) \
__CHNewIntVar(HObj) \
__CHFindIntVarOrCreate(HObj) \
__CHDeleteIntVar(HObj)
// CoreHash Common Implementation
#define __CHDebug(HObj) \
static void HObj##_Debug(struct HObj *container ) \
{ \
struct HObj *current_var; \
printf("Var list: \n");\
for(current_var=container;current_var;current_var=(struct HObj*)(current_var->hh.next)) \
{ \
printf(" Name = %s , id = %d\n",current_var->name, current_var->id); \
} \
}
#define __CHDeleteAll(HObj) \
static void HObj##_DeleteAll(struct HObj *container ) { \
struct HObj *current_var, *tmp; \
\
if (setjmp(h_buf_error) == -1) { \
return;\
} else { \
HASH_ITER(hh, container, current_var, tmp) { \
HASH_DEL(container,current_var); \
free(current_var); \
} \
} \
}
#define CHUnInit(HObj)\
__CHDeleteAll(HObj)
#define CHDebug(HObj) \
__CHDebug(HObj)
#endif
branches/cparm/i386/libsaio/lzss.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
/*
* Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
* Reserved. This file contains Original Code and/or Modifications of
* Original Code as defined in and that are subject to the Apple Public
* Source License Version 2.0 (the "License"). You may not use this file
* except in compliance with the License. Please obtain a copy of the
* License at http://www.apple.com/publicsource and read it before using
* this file.
*
* The Original Code and all software distributed under the License are
* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
* License for the specific language governing rights and limitations
* under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/**************************************************************
LZSS.C -- A Data Compression Program
***************************************************************
4/6/1989 Haruhiko Okumura
Use, distribute, and modify this program freely.
Please send me your improved versions.
PC-VAN SCIENCE
NIFTY-Serve PAF01022
CompuServe 74050,1022
**************************************************************/
/*
* lzss.c - Package for decompressing lzss compressed objects
*
* Copyright (c) 2003 Apple Computer, Inc.
*
* DRI: Josh de Cesare
*/
#include "sl.h"
#define N 4096 /* size of ring buffer - must be power of 2 */
#define F 18 /* upper limit for match_length */
#define THRESHOLD 2 /* encode string into position and length
if match_length is greater than this */
//#define NIL N /* index for root of binary search trees */
int
decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen)
{
/* ring buffer of size N, with extra F-1 bytes to aid string comparison */
u_int8_t text_buf[N + F - 1];
u_int8_t *dststart = dst;
u_int8_t *srcend = src + srclen;
int i, j, k, r, c;
unsigned int flags;
dst = dststart;
srcend = src + srclen;
for (i = 0; i < N - F; i++)
text_buf[i] = ' ';
r = N - F;
flags = 0;
for ( ; ; ) {
if (((flags >>= 1) & 0x100) == 0) {
if (src < srcend) c = *src++; else break;
flags = c | 0xFF00; /* uses higher byte cleverly */
} /* to count eight */
if (flags & 1) {
if (src < srcend) c = *src++; else break;
*dst++ = c;
text_buf[r++] = c;
r &= (N - 1);
} else {
if (src < srcend) i = *src++; else break;
if (src < srcend) j = *src++; else break;
i |= ((j & 0xF0) << 4);
j = (j & 0x0F) + THRESHOLD;
for (k = 0; k <= j; k++) {
c = text_buf[(i + k) & (N - 1)];
*dst++ = c;
text_buf[r++] = c;
r &= (N - 1);
}
}
}
return dst - dststart;
}
branches/cparm/i386/libsaio/saio_internal.h
152152
153153
154154
155
156
157
158
159
155160
156161
157162
......
178183
179184
180185
181
186
182187
183188
184189
extern long ThinFatFile(void **binary, unsigned long *length);
extern long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize);
/*
* lzss.c
*/
extern int decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen);
/* memory.c */
long AllocateKernelMemory( long inSize );
#if UNUSED
extern BVRef nbpScanBootVolumes(int biosdev, int *count);
#endif
/* platform.h */
/* platform.c */
extern void scan_platform(void);
extern void SetgRootDevice(const char * str);
extern void Setgboardproduct(const char * str);
branches/cparm/i386/boot2/boot.c
181181
182182
183183
184
185
184
185
186186
187187
188188
......
415415
416416
417417
418
418
419
419420
420421
421422
......
425426
426427
427428
428
429
430
431
429
432430
433
434
431
432
435433
436434
437435
......
454452
455453
456454
457
458
459
460
455
456
457
458
459
461460
462461
463462
464
465
463
464
466465
467466
468467
469468
470469
471470
472
471
473472
474
473
475474
476475
477476
......
481480
482481
483482
484
485483
486484
485
486
487487
488488
489489
......
506506
507507
508508
509
509
510510
511511
512512
513513
514514
515
515
516516
517517
518518
......
826826
827827
828828
829
829
830
831
832
833
830834
831835
832836
outb(0x21, 0x01);
outb(0xA1, 0x01);
outb(0x70,0x80); /* Disable NMI */
outb(0x70, inb(0x70)|0x80); /* Disable NMI */
outb(0x21, 0xff); /* Maskout all interrupts Pic1 */
outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */
}
bool firstRun = true;
int devcnt = 0;
int bvCount = 0;
int BIOSDev = 0;
long gBootMode = kBootModeNormal; /* defaults to 0 == kBootModeNormal */
unsigned int allowBVFlags = kBVFlagSystemVolume|kBVFlagForeignBoot;
unsigned int denyBVFlags = kBVFlagEFISystem;
// the base code will result in a hang or kernel panic.
gUnloadPXEOnExit = true;
#endif
// Record the device that the booter was loaded from.
safe_set_env(envgBIOSDev,biosdev & kBIOSDevMask);
// Setup VGA text mode.
// Not sure if it is safe to call setVideoMode() before the
// config table has been loaded. Call video_mode() instead.
// It's unsafe to call setVideoMode() before the
// bootargs is initialized, we call video_mode() instead.
#if DEBUG
printf("before video_mode\n");
#endif
// Scan and record the system's hardware information.
scan_platform();
safe_set_env(envgBootMode, kBootModeNormal); /* defaults to 0 == kBootModeNormal */
safe_set_env(envShouldboot, false);
safe_set_env(envkCache, (uint32_t)gBootKernelCacheFile);
safe_set_env(envMKextName, (uint32_t)gMKextName);
set_env(envgBIOSDev, (BIOSDev = biosdev & kBIOSDevMask));
set_env(envShouldboot, false);
set_env(envkCache, (uint32_t)gBootKernelCacheFile);
set_env(envMKextName, (uint32_t)gMKextName);
InitBootPrompt();
// First get info for boot volume.
scanBootVolumes((int)get_env(envgBIOSDev), 0);
bvChain = getBVChainForBIOSDev((int)get_env(envgBIOSDev));
scanBootVolumes(BIOSDev, 0);
bvChain = getBVChainForBIOSDev(BIOSDev);
setBootGlobals(bvChain);
// Load Booter boot.plist config file
status = loadBooterConfig();
{
bool isServer = get_env(envIsServer);
bool isServer = false;
getBoolForKey(kIsServer, &isServer, DEFAULT_BOOT_CONFIG); // set this as soon as possible
safe_set_env(envIsServer , isServer);
set_env(envIsServer , isServer);
}
{
long gBootMode = kBootModeNormal;
gBootMode |= kBootModeQuiet;
safe_set_env(envgBootMode, gBootMode);
}
}
set_env(envgBootMode, gBootMode);
{
bool instantMenu = false;
// Create a list of partitions on device(s).
if (ScanSingleDrive)
{
scanBootVolumes((int)get_env(envgBIOSDev), &bvCount);
scanBootVolumes(BIOSDev, &bvCount);
}
else
#endif
{
#if UNUSED
scanDisks((int)get_env(envgBIOSDev), &bvCount);
scanDisks(BIOSDev, &bvCount);
#else
scanDisks();
#endif
else
{
/* Won't return if successful. */
ret = ExecKernel(binary);
if ( ExecKernel(binary))
{
firstRun = true;
continue;
}
}
}
branches/cparm/i386/boot2/prompt.c
5353
5454
5555
56
57
58
56
57
58
5959
void InitBootPrompt(void)
{
safe_set_env(envBootBanner,(uint32_t)bootBanner);
safe_set_env(envBootPrompt,(uint32_t)bootPrompt);
safe_set_env(envBootRescanPrompt,(uint32_t)bootRescanPrompt);
set_env(envBootBanner,(uint32_t)bootBanner);
set_env(envBootPrompt,(uint32_t)bootPrompt);
set_env(envBootRescanPrompt,(uint32_t)bootRescanPrompt);
}
branches/cparm/i386/libsa/lzss.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
/*
* Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
* Reserved. This file contains Original Code and/or Modifications of
* Original Code as defined in and that are subject to the Apple Public
* Source License Version 2.0 (the "License"). You may not use this file
* except in compliance with the License. Please obtain a copy of the
* License at http://www.apple.com/publicsource and read it before using
* this file.
*
* The Original Code and all software distributed under the License are
* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
* License for the specific language governing rights and limitations
* under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/**************************************************************
LZSS.C -- A Data Compression Program
***************************************************************
4/6/1989 Haruhiko Okumura
Use, distribute, and modify this program freely.
Please send me your improved versions.
PC-VAN SCIENCE
NIFTY-Serve PAF01022
CompuServe 74050,1022
**************************************************************/
/*
* lzss.c - Package for decompressing lzss compressed objects
*
* Copyright (c) 2003 Apple Computer, Inc.
*
* DRI: Josh de Cesare
*/
#include "sl.h"
#define N 4096 /* size of ring buffer - must be power of 2 */
#define F 18 /* upper limit for match_length */
#define THRESHOLD 2 /* encode string into position and length
if match_length is greater than this */
//#define NIL N /* index for root of binary search trees */
int
decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen)
{
/* ring buffer of size N, with extra F-1 bytes to aid string comparison */
u_int8_t text_buf[N + F - 1];
u_int8_t *dststart = dst;
u_int8_t *srcend = src + srclen;
int i, j, k, r, c;
unsigned int flags;
dst = dststart;
srcend = src + srclen;
for (i = 0; i < N - F; i++)
text_buf[i] = ' ';
r = N - F;
flags = 0;
for ( ; ; ) {
if (((flags >>= 1) & 0x100) == 0) {
if (src < srcend) c = *src++; else break;
flags = c | 0xFF00; /* uses higher byte cleverly */
} /* to count eight */
if (flags & 1) {
if (src < srcend) c = *src++; else break;
*dst++ = c;
text_buf[r++] = c;
r &= (N - 1);
} else {
if (src < srcend) i = *src++; else break;
if (src < srcend) j = *src++; else break;
i |= ((j & 0xF0) << 4);
j = (j & 0x0F) + THRESHOLD;
for (k = 0; k <= j; k++) {
c = text_buf[(i + k) & (N - 1)];
*dst++ = c;
text_buf[r++] = c;
r &= (N - 1);
}
}
}
return dst - dststart;
}
branches/cparm/i386/libsa/libsa.h
5656
5757
5858
59
60
61
62
63
6459
6560
6661
#define ispunct(c) (c == '.' || c == '-') //Azi: TODO - add more ponctuation characters as needed; at least these two, i need for PartNo.
/*
* lzss.c
*/
extern int decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen);
/*
* string.c
*/
branches/cparm/i386/libsa/Makefile
2828
2929
3030
31
31
3232
3333
3434
3535
36
36
3737
3838
3939
SA_OBJS = qdivrem.o umoddi3.o udivdi3.o divdi3.o moddi3.o bzero.o bcopy.o prf.o printf.o zalloc.o\
string.o strtol.o \
setjmp.o qsort.o efi_tables.o lzss.o
setjmp.o qsort.o efi_tables.o
SFILES = setjmp.s bzero.s bcopy.s
CFILES = qdivrem.c umoddi3.c udivdi3.c divdi3.c moddi3.c prf.c printf.c zalloc.c \
string.c strtol.c \
qsort.c efi_tables.c lzss.c
qsort.c efi_tables.c
HFILES = memory.h
EXPORTED_HFILES = libsa.h memory.h

Archive Download the corresponding diff file

Revision: 1887