Compare commits
4706 Commits
Author | SHA1 | Date | |
---|---|---|---|
0bc12abc2b | |||
96aff03dcd | |||
b05eee46c3 | |||
1ac773fa55 | |||
58caa8ba8c | |||
4fda9bd0ec | |||
9ac7a66f0e | |||
5b6bdcc1a5 | |||
01fbc3a1dd | |||
a52f883b10 | |||
63583f0987 | |||
a247d8e53c | |||
9a20551b7e | |||
ff8bf410d9 | |||
29f8708fca | |||
c68ab5e8e5 | |||
db52f23fbd | |||
c8c73a68be | |||
968292b8e1 | |||
950d48fe6b | |||
3401f5a20c | |||
2f72a618f1 | |||
2c8f3bd91b | |||
4247426be6 | |||
bebeb7497d | |||
e2e40cc17e | |||
2af174a7dc | |||
03bf301d82 | |||
165af1c5c2 | |||
d770bad317 | |||
1190e9cf42 | |||
62f4dad88d | |||
4aa295ca28 | |||
fe3eabcaed | |||
7141ff3b9f | |||
e1f0ac4baa | |||
49a7c37de9 | |||
571fb1fb44 | |||
46829869c8 | |||
626f8c8440 | |||
6f8b7df8ab | |||
c9848a82e2 | |||
519c4b7298 | |||
0de17e74ff | |||
de14ea77c3 | |||
eff596b51a | |||
6ed319a796 | |||
023e284a06 | |||
46445fc3c7 | |||
6dfffdc297 | |||
b23ed4e252 | |||
ff25b6c35b | |||
f10b5ff8a9 | |||
8d94fbd999 | |||
aacd548c26 | |||
e7aeb2f602 | |||
83b9703505 | |||
f8d399904c | |||
4da1aa8561 | |||
11302f38cd | |||
1a77fd3e36 | |||
e809dd3a84 | |||
6bc3b96831 | |||
59840d1dee | |||
decf90e4eb | |||
d13b147235 | |||
e0ee4c87e8 | |||
fd5c658871 | |||
a81bef1bd6 | |||
913684cd2e | |||
ab5f3d1304 | |||
f641779bac | |||
34a6537512 | |||
5b1bb3d980 | |||
801a8ef2c3 | |||
aa9df0f0de | |||
0910f4e76f | |||
7692807f4f | |||
2e6aeba9ca | |||
1a9035988a | |||
dd78aa665a | |||
135eae91d5 | |||
9344bde4fe | |||
7d87e767b6 | |||
90ba189744 | |||
035df005c5 | |||
c44fb50185 | |||
9b865b47b0 | |||
ec28aadbd1 | |||
f2fcf22d22 | |||
028200f75f | |||
35c01bc4e0 | |||
93b51e7ac9 | |||
e06a1b895c | |||
5d0847f757 | |||
509c4c409c | |||
5ddecdcf32 | |||
ba0b9abcce | |||
1e404a962a | |||
e757bf9acd | |||
e865a3d89b | |||
f08f38883e | |||
c9fea5cdec | |||
7d8ccfb9b3 | |||
0b1a90da76 | |||
c3e85139e6 | |||
737a7cc9f1 | |||
681b6b9433 | |||
547a059b34 | |||
d3600b1405 | |||
25626389c8 | |||
74fedbe377 | |||
8e09de297f | |||
7ae73fc3a0 | |||
b37c8c065c | |||
aa58a9eebf | |||
dd42db6348 | |||
7f965891b6 | |||
a39a5b60b4 | |||
48f708d199 | |||
77ba882c67 | |||
52669fc4dc | |||
7feb86b26b | |||
f7d519c1c7 | |||
584dbf2e3a | |||
2768a119ce | |||
1eb69b4a64 | |||
a02e4a0428 | |||
ffcc07dbad | |||
7db506c3dd | |||
fb190ed764 | |||
58afca4a1a | |||
5e0242b0ec | |||
0d4b11a4f8 | |||
18cd8a64a4 | |||
5c22825c19 | |||
738a3b043e | |||
38ab6f2839 | |||
a7d0027083 | |||
6d6c00a502 | |||
8bc8be4d0e | |||
fa95625867 | |||
3d6db6f0fa | |||
74295c1fb1 | |||
e5f3611ce3 | |||
5b005196ea | |||
c59cc22e57 | |||
3b87812f00 | |||
cc3365a039 | |||
5db043f0d6 | |||
a90c7859d9 | |||
bbda950e13 | |||
2fc06c8203 | |||
f95daa510d | |||
3674c8240d | |||
6b63990602 | |||
ca159f0fb3 | |||
76e8c00be6 | |||
97c460a2d1 | |||
62a193899c | |||
c6452bb8c5 | |||
08449eb583 | |||
75b2237473 | |||
728273eebf | |||
b4d8257dff | |||
c3d490cc24 | |||
bbcb8bc971 | |||
075ff736f6 | |||
dae8fe747c | |||
cb6b120e93 | |||
cf81bd3002 | |||
117fd8d645 | |||
80fa9d899c | |||
311fb696cf | |||
48a0129d97 | |||
bc97b4e37d | |||
0b9ecb5831 | |||
b59bcb2d5f | |||
7dfc8a5ebd | |||
494d398ae4 | |||
d677d9cedd | |||
31f5c130b1 | |||
5a9ca4d1ec | |||
44ec92a48d | |||
54f857b29e | |||
e1654235fd | |||
127b5d1270 | |||
0c31a677b0 | |||
aabd7203a8 | |||
0e505f1bfe | |||
129c26e5ea | |||
4951677b16 | |||
c4ddfe45a8 | |||
b31c3d1b92 | |||
fa74e4705d | |||
6d16e1ff87 | |||
fbf2c79b48 | |||
eeabb75e8c | |||
39aa6309ba | |||
6da74da345 | |||
8f372d031b | |||
c6317e0c95 | |||
497b5fe87a | |||
499ccbe41c | |||
1a657e9334 | |||
d9ceae5f20 | |||
28821dbb22 | |||
9108680c1c | |||
f9c41974cd | |||
a6b863a2bc | |||
99a92ac722 | |||
02fdb3e014 | |||
bf97ca42cd | |||
333176e5d3 | |||
d3284a6977 | |||
2e77e0aa3f | |||
91fa9d7696 | |||
59cf5028a8 | |||
05201d7783 | |||
c64a6d63ed | |||
fe222005b8 | |||
8918968557 | |||
b87a734771 | |||
8da96e57c8 | |||
f4df9d1156 | |||
57a3cd21f1 | |||
c2586db790 | |||
d4c89e40c0 | |||
62d4b0062b | |||
e4cf954f52 | |||
1d359b5512 | |||
0f671f6ee9 | |||
66c2c1a2d4 | |||
04a1f6a3bc | |||
75797166ce | |||
156d87c024 | |||
aee7f46cd3 | |||
bd74d561ad | |||
78df0bf46d | |||
cc414dd47f | |||
152e78e794 | |||
b6a6bb5393 | |||
e1606731b6 | |||
8aa20193a6 | |||
904538bcc1 | |||
1ba3432301 | |||
776498ac7e | |||
a813160fbc | |||
6fcfd919f1 | |||
401bd31b2d | |||
94cc485338 | |||
2e79009503 | |||
a673d1cd2d | |||
1f6e681355 | |||
f235a9b1b0 | |||
d3920e71d6 | |||
510cb6a144 | |||
1dc036ce48 | |||
3727a8d909 | |||
2ea13c8699 | |||
dca223cb38 | |||
8ea06512e6 | |||
2ab981b87e | |||
03b9ecb2cf | |||
a5aad2ed68 | |||
531b87ac4e | |||
04f8fd981f | |||
78c63860a6 | |||
17c2b94ac1 | |||
386f084f97 | |||
03cd118025 | |||
2b7a6019f2 | |||
f52288f935 | |||
dd6ab34d5b | |||
b6bf1ddb91 | |||
aa1d314ac2 | |||
57bfbb0508 | |||
1ce2ba6832 | |||
374c39e3cf | |||
22710a66ac | |||
ddb2465f8b | |||
6350a2e43f | |||
ed5f159ed5 | |||
0a15fe9299 | |||
1d8daa66ee | |||
9309552068 | |||
cf13950736 | |||
a0fed37044 | |||
c92abedd3a | |||
69d658f59d | |||
f352e2fab8 | |||
d4fea5c675 | |||
a3d15afc67 | |||
2051448359 | |||
9a9c8dba8d | |||
c021ffee45 | |||
bf7faa1a63 | |||
9b8ebfb96c | |||
1de4f9549b | |||
4d534870c2 | |||
18f58982b5 | |||
7c8e78750b | |||
11bfb5e4f0 | |||
1efcfcfff9 | |||
bf2c8c6a47 | |||
6d412c7b81 | |||
120f112844 | |||
9d4b11c26a | |||
24de342438 | |||
a5e419c511 | |||
3d43a7c111 | |||
5e3dad6622 | |||
884dfe6329 | |||
1241e7db55 | |||
557e1a729a | |||
6f5ceb26b9 | |||
93c778688f | |||
97a2a1ece1 | |||
c565f99107 | |||
64df72e8e2 | |||
1c8491c3ab | |||
a2d4062d42 | |||
21130c6508 | |||
767009aeab | |||
ec9168f52b | |||
c33f08b672 | |||
0b1a5c259b | |||
c51522f516 | |||
de6ad8369f | |||
a9e03a34b0 | |||
79587ed894 | |||
1e9a914207 | |||
6b0cebccc4 | |||
c701393e20 | |||
dfe614ff9f | |||
be5492aec0 | |||
2e09d2b239 | |||
fec0328c5f | |||
871da8e580 | |||
c8ae5995bb | |||
629ca43859 | |||
13d880fd37 | |||
cf5430fd5c | |||
237916ac0a | |||
705a063e65 | |||
7a3a8a5f85 | |||
91bba828fc | |||
96a48f1489 | |||
ab9395f612 | |||
2bf453c70e | |||
16be0337d9 | |||
d173907747 | |||
b599919495 | |||
563de15b8a | |||
16e9d459a0 | |||
5ff7390fcd | |||
5bf42c6c23 | |||
69966ccb5d | |||
8448ac47d2 | |||
fbce31a2cc | |||
f8a7b2c008 | |||
772555a214 | |||
db54bb5e3a | |||
7e10c8209b | |||
35240ebe3c | |||
8cdeef1c0d | |||
ef8deaffcb | |||
9e81540b85 | |||
9a23569ee1 | |||
6d8e39127b | |||
a1e1e5c7e3 | |||
a422ffc534 | |||
ec4555b96d | |||
8d7181ddd1 | |||
5ea2cadfff | |||
040117af52 | |||
061d781e99 | |||
196e3d439e | |||
25f75b28e4 | |||
823f1a9bbf | |||
1a9da7acf6 | |||
8126daf6f3 | |||
10505470bc | |||
66a02c1ef3 | |||
6cf441523a | |||
c6557d0807 | |||
ad62eddeb0 | |||
d33355da39 | |||
1ac9728048 | |||
1e1b866d28 | |||
bf4224c723 | |||
b0a60e5b21 | |||
0501ece181 | |||
f65ccb2cd6 | |||
30d55bf001 | |||
ef8021cc1b | |||
837618bf20 | |||
e889b19ba0 | |||
f727c7ce38 | |||
34c835db30 | |||
78785e7c41 | |||
1bf8c4d443 | |||
5251a08d68 | |||
53620b85be | |||
93e6f1a917 | |||
6a1a36f7e9 | |||
03d10ea29c | |||
65c7ccc8b1 | |||
449368c2f0 | |||
4f2754c720 | |||
9d18e330fd | |||
6e8b3c1110 | |||
6b72787d27 | |||
c7702536ed | |||
746b6abea5 | |||
d12ea11c01 | |||
a761fa5ec9 | |||
43e5b576b9 | |||
06868f8154 | |||
d2ec56985f | |||
55eee48b0e | |||
e8c2e83973 | |||
8453c4f2fb | |||
b1b44d34e3 | |||
d2e92e461d | |||
6584973bdc | |||
91aea428b5 | |||
ba349ab12e | |||
f9aac2f4ac | |||
3c6bfaf8ca | |||
f068a73807 | |||
4e1d9f6b23 | |||
d3b55c1bb5 | |||
60a6e153b0 | |||
1004710579 | |||
7ea0fe5cbf | |||
e6a5f608e1 | |||
6e4204a0d1 | |||
55a54f662e | |||
305224f47a | |||
88af372fe8 | |||
994a4a16a5 | |||
3ab8ce52f9 | |||
7e516fbb47 | |||
e642b2d1d3 | |||
1ca196841a | |||
7fbdad80fd | |||
b5026bf9e0 | |||
3eb65eca69 | |||
e0d7e2690f | |||
e8cf4ffbee | |||
93157f6c1c | |||
cbc0416ea7 | |||
29fc9bb855 | |||
614ffc60cf | |||
a99c64e129 | |||
523e90f9c7 | |||
57321db3ca | |||
d4aa2c4348 | |||
a66df49e15 | |||
b6a77aa720 | |||
88df48c555 | |||
8ba2010d12 | |||
e52592078e | |||
587f9cb6ce | |||
b933109594 | |||
112ab91837 | |||
c2875872c8 | |||
6eb8e1d6cc | |||
ffa765f6eb | |||
efa579fdc2 | |||
40ae1706a4 | |||
4a560769ad | |||
e937513352 | |||
bd366ab485 | |||
994d8b4f13 | |||
93c5470434 | |||
37ddb630dd | |||
8db1f8dabb | |||
d94967dd22 | |||
475d2cb19e | |||
d1e365ac38 | |||
b64389d840 | |||
10d67cbad5 | |||
ac39da44d1 | |||
8ffd050cf0 | |||
a15dde0719 | |||
96a8b54edb | |||
4551bf6dbf | |||
297c559562 | |||
c6080c6bfc | |||
70f5b825c6 | |||
45b3b82f18 | |||
6fc430b3eb | |||
20c9afa9c7 | |||
dac8240c2e | |||
0604106438 | |||
114d7c3ada | |||
4435a490cd | |||
5a87de86ae | |||
48b4cbdd94 | |||
2128d625ca | |||
2765a893ca | |||
d1cab66502 | |||
36d405268f | |||
9391aac2e0 | |||
eb2e688a8e | |||
c31ba0ef52 | |||
e96543e1fa | |||
51a0f7cee4 | |||
4bf48e8c33 | |||
7aded784c1 | |||
734b3d1be0 | |||
5cf758d45b | |||
26d484a237 | |||
477bc97ba0 | |||
079feec561 | |||
e603a90045 | |||
9a251c0280 | |||
f0cd74dd84 | |||
3681de8ab6 | |||
0577a1e9d3 | |||
a795ae1392 | |||
61e6c4448c | |||
12df950583 | |||
5a7e72f1ae | |||
2b010b8795 | |||
195c26810d | |||
ba28e8d73b | |||
2e4d80687d | |||
d75b04f2b3 | |||
4a83f1cf24 | |||
3c80408fc8 | |||
1222a73205 | |||
874a8f961f | |||
868cd71282 | |||
f706020ed6 | |||
70c496b24e | |||
54aa89c7b4 | |||
a4e7165fd1 | |||
c42a9ac4ab | |||
07215aaf71 | |||
4dfe130819 | |||
3156934bf8 | |||
62d1313925 | |||
9912310181 | |||
fe349392a4 | |||
c3d74273a7 | |||
41a3fa66a0 | |||
a1e3924869 | |||
dbf30678ee | |||
cbe7464c62 | |||
3f4aece4e0 | |||
7f72c9b30e | |||
0dde2917a5 | |||
7c8d74c103 | |||
2078e75b00 | |||
f772f9c6d2 | |||
11fc8015bd | |||
a1ac10fc85 | |||
70d79a4546 | |||
03b040b95f | |||
eb131f30a3 | |||
329031fded | |||
3c814b2e2b | |||
f975e55dcd | |||
71885a4960 | |||
2a1847ea12 | |||
6e5421d2a8 | |||
3b0e761dd5 | |||
de9fed4c2a | |||
d6bb5495f9 | |||
f7ce40baf6 | |||
70385968ce | |||
a6914d2343 | |||
dde073829f | |||
67e4df8b65 | |||
93f34e1a74 | |||
1b5581c8d9 | |||
a73a803bcd | |||
f643d661e1 | |||
cafb10c672 | |||
857e33e27f | |||
3965a522c2 | |||
b6648cd888 | |||
85b1aadcc1 | |||
d9ff75f2cb | |||
538e44683b | |||
e53e488cf1 | |||
0638b60590 | |||
7f9df96825 | |||
d6e96864c9 | |||
38424987c6 | |||
ccf78f083c | |||
7378d925a3 | |||
6f23374590 | |||
904dd303cb | |||
df76f8983f | |||
7931c6a81d | |||
1bc2b0bed0 | |||
64444268e2 | |||
5a859517e2 | |||
97e0a65081 | |||
63e424cec2 | |||
3828e55a8c | |||
200f11eb87 | |||
986c658c41 | |||
15f6f3aa58 | |||
98e0ee6214 | |||
ba2b63a20a | |||
b18a6665df | |||
5bb9e93ea6 | |||
d10f9d57c2 | |||
bccaab8658 | |||
e4cc8cd00b | |||
7b2c781dbd | |||
6f1155916a | |||
5180dd2c4b | |||
c0a823c737 | |||
2e03fbced7 | |||
5861b585e7 | |||
67d487e687 | |||
1ad9f946b6 | |||
504b8f2da2 | |||
dcbccd6a1e | |||
e8e118dd32 | |||
3326f15991 | |||
16c173fdf5 | |||
d3d77beffa | |||
cb6096d71d | |||
82bd0c352c | |||
8dc20bb698 | |||
a7fa5dd3a9 | |||
08e842c0d1 | |||
240853bf25 | |||
3ad63565a5 | |||
ecd9a94213 | |||
cf73c1317d | |||
4a36c4e9fc | |||
2d97cb1be5 | |||
f75d1dfad3 | |||
e7de6fb162 | |||
91f6e679cc | |||
0bb62294ac | |||
9cc8cb2090 | |||
d23ee5de22 | |||
4f79e66185 | |||
4157bd8d61 | |||
5fa08f3c0f | |||
e4cc4733eb | |||
c3b024e99b | |||
edd79590b0 | |||
e56191e8ec | |||
bdb6cc97eb | |||
a91901c221 | |||
691dac0b55 | |||
a83bbf5854 | |||
3cef11753d | |||
5ff952259a | |||
363526cfb8 | |||
38103bde75 | |||
4d6ef3ab01 | |||
28a3ee6d29 | |||
12974436a9 | |||
49eca13353 | |||
289f0578ce | |||
8ab989e315 | |||
589ef9de8f | |||
109a7db2bb | |||
34e4a1c01a | |||
c7740d640d | |||
5faf4ba7b3 | |||
1143d08f7e | |||
55ffccfbae | |||
1b52e2596e | |||
51fc93fb22 | |||
6359a75926 | |||
3a21d0f341 | |||
105828d12a | |||
7f3ecedd77 | |||
785ff1b7db | |||
1394bba6bb | |||
c42b5917af | |||
6e1884ff5d | |||
d6f7fd5261 | |||
da723ce42f | |||
21c54d26cb | |||
e206ab7a78 | |||
934693955f | |||
f3656d8238 | |||
5986d2972a | |||
513693ca3a | |||
1f3458b7b5 | |||
080affb1cc | |||
189b89621d | |||
2a31fcd6f8 | |||
c1645faeff | |||
d7127b09ae | |||
bb003c8126 | |||
a7a9c463fd | |||
5e07a7e474 | |||
00a38a4a9e | |||
c52a4f7328 | |||
219c3328f1 | |||
a8b86b3a9f | |||
5de5458c2c | |||
93ef3ffdf0 | |||
fc46583807 | |||
3922cec524 | |||
09115a92f6 | |||
a46ee4d34d | |||
eec1c28bd4 | |||
18fedb360f | |||
367f2b9568 | |||
4884c5d52d | |||
9d130a9e10 | |||
0284f62db2 | |||
1bf00079c1 | |||
3d609325b9 | |||
0c290a0c85 | |||
eff0c6a99d | |||
27f94eea6c | |||
5c4748b342 | |||
57603e2b84 | |||
8f0b4f40bf | |||
16559c3447 | |||
32f54508ec | |||
480a38f64d | |||
9ba069957b | |||
0c634159a3 | |||
e67cd9ee90 | |||
0b2cf172fb | |||
271a2c2763 | |||
e6a2ecf893 | |||
f41a9a6459 | |||
281c994ce2 | |||
422c440fa6 | |||
bec07535ac | |||
c9c27bb14e | |||
824255ea28 | |||
25f8a4f6d4 | |||
3205170a2e | |||
052a995567 | |||
e25d3ff9bd | |||
5a6955517f | |||
83f79083ce | |||
fb8fb0e142 | |||
36fdec88e6 | |||
9b0a343059 | |||
2d45c28675 | |||
16246ea9ce | |||
968ddf27e2 | |||
258a3507de | |||
a7b97510ae | |||
8f2f22d258 | |||
0dddcd76d7 | |||
5d3d69ca95 | |||
09ae1d533e | |||
41ddd4fcc1 | |||
98c65c1b01 | |||
9844d56993 | |||
58644a0e0f | |||
7b405178f4 | |||
b927bec09a | |||
f3bba44a04 | |||
61486b506d | |||
5d41949782 | |||
dfb373541b | |||
3731903646 | |||
d89bcf2841 | |||
35cca5a923 | |||
44d0ddcc81 | |||
d924fac759 | |||
bcbb205454 | |||
6c481755c4 | |||
f61de073e5 | |||
3de7d4a9b2 | |||
f74ce24de1 | |||
d52636113a | |||
f26fc0f28b | |||
102f625360 | |||
6e05c33626 | |||
88a25ec20a | |||
9a162d7791 | |||
751bff14db | |||
8ff24803a3 | |||
5690f0e6d8 | |||
60b4618a84 | |||
b6739d1b56 | |||
fec95be8b6 | |||
d03596f4ca | |||
e85de02fd4 | |||
b9eee8e468 | |||
d6319e8cc0 | |||
9e561f8e80 | |||
d1a00515ff | |||
40d62f3db7 | |||
5e6771b1cb | |||
47ca65a791 | |||
5fafc6ad54 | |||
72fe7acbbb | |||
3440db5827 | |||
3741a0b225 | |||
ce8ff85fe5 | |||
77051e061f | |||
38e0cc0aa4 | |||
01728bb2ed | |||
3d0e3cf4b1 | |||
14d09264a2 | |||
1cfb555e71 | |||
5407310e64 | |||
9ade717571 | |||
f641a27b63 | |||
21a5bff77b | |||
d4d76959c0 | |||
b0afbad8e1 | |||
d87d8eaca1 | |||
b20d4ba57a | |||
94e502be7a | |||
37b5ef26eb | |||
806fa2463f | |||
9671faa497 | |||
52d0c682bf | |||
ac3b0a6e9f | |||
e6f2f74b29 | |||
0a38b227c8 | |||
cc5be8b72b | |||
aded214e74 | |||
935a4303d7 | |||
1b41f4dd77 | |||
145796e171 | |||
ae39fc45a8 | |||
5976143475 | |||
d5817c887e | |||
67d169721a | |||
5aea588f69 | |||
8d66bee7be | |||
5e61233fc1 | |||
672df16a49 | |||
48e0792e4a | |||
47f7b0e196 | |||
8c8403ff5f | |||
b168db78d6 | |||
0f2025da0f | |||
6e8233a60b | |||
aac31ca221 | |||
0cd338e6e4 | |||
bb9722bd77 | |||
049b46270d | |||
f67e2cf9cf | |||
c1dc9d725e | |||
dd65ef86c3 | |||
64f38acc29 | |||
4c18de2de9 | |||
0c1843aeb9 | |||
33ab4fea23 | |||
41b3196bc8 | |||
8cab72e1d8 | |||
1f9c07fcd7 | |||
449fb9b6eb | |||
2a600263dc | |||
91e0e3ccbe | |||
7753731f0c | |||
038e7247dc | |||
f9e7d1b0ca | |||
2660a1321a | |||
1fcebe7fd9 | |||
c091604363 | |||
21ce6efe28 | |||
e8c413318f | |||
030c73031d | |||
be8f0fa2bb | |||
8260650cde | |||
e8f2ef51e1 | |||
90ed31beac | |||
bce1807d9c | |||
b97cf79e2e | |||
57f221e6c4 | |||
c663a1f033 | |||
95fe8fb1e0 | |||
14caed85e1 | |||
312e9f586a | |||
777ea897e8 | |||
45de1fe4fb | |||
fa640a2f56 | |||
d82be923b1 | |||
918535a657 | |||
1bcd7fcb61 | |||
15279a9696 | |||
585d1a0e7d | |||
9071670a84 | |||
08492f70b7 | |||
5ae61d94e7 | |||
4c72d3612b | |||
4b48ed8f38 | |||
828e73e0b6 | |||
783d0c146f | |||
28434a9ca7 | |||
cf05183d1f | |||
171e2c965a | |||
b0f81518b5 | |||
212820c8d7 | |||
6e37e90193 | |||
ce37e47f46 | |||
ec2947fb07 | |||
3707fc2d96 | |||
df5ead9d2d | |||
47bd2d957d | |||
ab88c7d366 | |||
df12d1923f | |||
fde3275fb4 | |||
aad4587c03 | |||
2b119b380f | |||
cd9e1e423f | |||
5dd2b18540 | |||
44887c3e36 | |||
e51387896f | |||
2098778726 | |||
8e63017096 | |||
62bd9f93dd | |||
0cc02efb23 | |||
a90f41bdd7 | |||
89f6d6079e | |||
50b9258a0b | |||
e4a8537ce2 | |||
68d5d8b28a | |||
e3e2bb0a89 | |||
7ab98fb790 | |||
e5a5084b70 | |||
3339861435 | |||
0faf401823 | |||
baf88d3703 | |||
0d9cd92efb | |||
c66a02634c | |||
faf07a8fab | |||
a7f11b8ecf | |||
01ac811b08 | |||
18b02c5630 | |||
0325dc6f7c | |||
2a12e2e8da | |||
af8ef2a810 | |||
c31973760f | |||
bc24b85e6a | |||
139314bffd | |||
60cc75df83 | |||
46114517d7 | |||
94938fb2a8 | |||
5f4b4c4296 | |||
ae738acdc5 | |||
7c2e5396a3 | |||
40d93494c3 | |||
9cbc90a1f6 | |||
aa3e8a8124 | |||
c7dfbe26fd | |||
700b03962b | |||
4cfde2a389 | |||
99f1b2f755 | |||
e82b5057e3 | |||
a7491502dc | |||
49d233006b | |||
dc4820baed | |||
9551bed306 | |||
d950f5191d | |||
27cd96a661 | |||
e2422e38ce | |||
3eabe6e9ec | |||
b8257df83b | |||
7c7b291e55 | |||
9dc00ef625 | |||
de110ee07d | |||
85aa135326 | |||
041bc76386 | |||
8edfc1c512 | |||
6d448e3aa6 | |||
a6c5ddd595 | |||
610a33a7f4 | |||
87b1bcc4af | |||
b1b465f093 | |||
5dd6a910da | |||
168eb6ad6f | |||
1e4c091e9b | |||
2c29d34b37 | |||
5d208ff395 | |||
e9a9c6a33c | |||
3f22abb0a7 | |||
b37d01d309 | |||
a38677b664 | |||
9d29c3cc31 | |||
df7ad44853 | |||
cc19806ae7 | |||
fc4c15b9e2 | |||
48f662d941 | |||
dd8ed42ed6 | |||
17dbec1593 | |||
aa00e0893e | |||
8a2f167e7b | |||
eb61ea84f7 | |||
9ec691429f | |||
a27fba67a0 | |||
81527e8d7f | |||
ede69f0d62 | |||
150f476c96 | |||
a877b74a79 | |||
7899db2355 | |||
67870f508f | |||
4b1668fd12 | |||
613702b5dc | |||
c9de92c021 | |||
ed75b279a3 | |||
b0672402ec | |||
f9a5d5fa63 | |||
546eb451e3 | |||
e28ac06868 | |||
00aa45391d | |||
3a94a3ba5b | |||
1b1d4b7ae6 | |||
91ef21df62 | |||
6401188024 | |||
fcd51ffae8 | |||
35d42c7564 | |||
f41f2aab7c | |||
02e504cdb1 | |||
98ea636770 | |||
f0ec82450b | |||
ec065e8096 | |||
32ac01823b | |||
d04639b3d6 | |||
a413e5e455 | |||
b4302504e3 | |||
2792868519 | |||
a3a06aeac5 | |||
ddbdcc3898 | |||
28a4e0e460 | |||
5fbe12dc7e | |||
746b906cf9 | |||
dc97b1ce2f | |||
b921725b52 | |||
47995fbb36 | |||
b8e67acc91 | |||
5d687add85 | |||
b4d3d09ded | |||
e19d9af9ee | |||
d83b0e9ac4 | |||
3a96ac44e2 | |||
6101dfbaf3 | |||
9b4be0fce0 | |||
89e7b49a11 | |||
d779605c29 | |||
97fc426070 | |||
df6eb79a22 | |||
32a38ee85b | |||
cbb23af2da | |||
f32d5b8b66 | |||
bd274e1363 | |||
bce9bbdfd4 | |||
a2a7e981d6 | |||
3969df875e | |||
38613d079d | |||
1a75560599 | |||
c2b7779d60 | |||
996b15c934 | |||
b743b1a843 | |||
f1e22d5c39 | |||
bf168e740f | |||
648c9ae371 | |||
4d7a9a5569 | |||
e99194555b | |||
671909b891 | |||
78c6843a2b | |||
da5f5094f0 | |||
340898f21a | |||
15e439a72e | |||
9e6d143a82 | |||
c159bb0d76 | |||
e0a49147a6 | |||
1b6196dec9 | |||
f5cfaa3934 | |||
56db47fe20 | |||
ed35b7c546 | |||
20a588b3de | |||
932e09d168 | |||
9fe0ff2f83 | |||
30b0c7adf0 | |||
95c4344a20 | |||
ab1960c08a | |||
0dca6490b9 | |||
97dc98658a | |||
580db7fd90 | |||
0776fcb1b5 | |||
a406c2a954 | |||
0562783182 | |||
8cb974e83e | |||
5282fe62d4 | |||
f3b3ccfe73 | |||
1dd0bc0f60 | |||
d570a5ada0 | |||
3030eaf55e | |||
585c781323 | |||
bcfa7ccb28 | |||
5f8cb140e6 | |||
8aa8caf191 | |||
455c3c9064 | |||
c98aac0589 | |||
8660580567 | |||
dbd8b54441 | |||
3cad2de612 | |||
7804790226 | |||
bc62834306 | |||
9a6ebda9b4 | |||
141ce41112 | |||
bb6af29470 | |||
f0416edc63 | |||
4dc680aaf1 | |||
f5ef699f40 | |||
4c0851cc37 | |||
1ec76030ed | |||
adfbbde7c9 | |||
7ee057c700 | |||
6acb9a6012 | |||
ebba4d7c2f | |||
d9137d56fd | |||
bc927107a0 | |||
03e4472e17 | |||
1a98050f1a | |||
690ac93aa0 | |||
061e4ff362 | |||
1935ce583a | |||
0cf11cb783 | |||
81d1e09113 | |||
b72c67b713 | |||
1318e88352 | |||
c79101ab84 | |||
96bb4d01d0 | |||
a277bacd56 | |||
d41a338d55 | |||
b6fc727903 | |||
044fb53a2e | |||
0dd655f8a8 | |||
edfcce80b2 | |||
4934818118 | |||
5d2c0ef740 | |||
066e0f3923 | |||
6e5c5a15bc | |||
7f149c7bb4 | |||
e51e1045e4 | |||
bfe6f6a72e | |||
f626b9311d | |||
660c67a01f | |||
89186b2eb8 | |||
74bb412753 | |||
5d49b4a4bc | |||
1592bfb77e | |||
7db2cd21e9 | |||
bdd06de15d | |||
3d703bcc70 | |||
10ea104476 | |||
e3d78b82a7 | |||
9e624fc27f | |||
58826fc85e | |||
6e69bfdb02 | |||
627afc2685 | |||
245d4577d5 | |||
05155c0013 | |||
e5c00a5d2c | |||
70cd54310b | |||
b5664de76d | |||
d113190d23 | |||
880b458bc9 | |||
1f83ffac1b | |||
9ae0985328 | |||
dc54270210 | |||
5d94c26653 | |||
24ba659d08 | |||
8b022dd884 | |||
e98d72e2a3 | |||
d9fc5fb31b | |||
5edbb0427c | |||
dba7e76da1 | |||
ffc9990ece | |||
9217f9def0 | |||
a845f427fe | |||
8d3c4d1bb3 | |||
ebe148d58e | |||
fe767a7dc0 | |||
87579aee69 | |||
a790f1b085 | |||
f41ac2298e | |||
85d8027628 | |||
3727776a8b | |||
5b2d55ed95 | |||
7f78c9d03b | |||
7b0e0d9810 | |||
2d0281c6c9 | |||
e4da9aa897 | |||
6507e6f056 | |||
7124882aeb | |||
e1d6aa6e41 | |||
93db5a5eee | |||
2566f9173d | |||
6c571462e5 | |||
9007ffd3d1 | |||
234d246535 | |||
11ea2b378b | |||
b2213edc65 | |||
e22d96c0f9 | |||
2b80734811 | |||
e46dbcc53a | |||
5b6c5a500e | |||
0b806285a7 | |||
24a594f42a | |||
ccae9aec53 | |||
29f351e7df | |||
e9808b145f | |||
fadfc2e2f6 | |||
4025e26fc5 | |||
d02685b053 | |||
abdbed9cf3 | |||
366cd21472 | |||
d25dd99866 | |||
5b6c28c43d | |||
d48d5a626b | |||
ff8bce0a5f | |||
02fcc88782 | |||
8f9c866caf | |||
fc04f9b5ee | |||
6aa45c090b | |||
e1a022ade4 | |||
222381e390 | |||
cc37c85ab4 | |||
af9f35a2ce | |||
90e716691d | |||
734aa8713c | |||
36de4652e0 | |||
2656219008 | |||
be87f73c68 | |||
9a0c9ac912 | |||
61f4b42f2c | |||
66c20c4dfa | |||
c4c8383967 | |||
c14a1a940f | |||
ed114da437 | |||
e9657bc8dc | |||
5e0a9c7436 | |||
ed0f6d7cb7 | |||
78461a9d55 | |||
9d8b2ffb49 | |||
ba3d626cfb | |||
deed18627d | |||
165b6cf5c1 | |||
c30bfcaa9e | |||
1891bfdac6 | |||
65e8f647bc | |||
7b3512dde3 | |||
3d0e2871cb | |||
cbaa2abd6f | |||
2dd226a713 | |||
9d0cce2087 | |||
fefc77afd0 | |||
719f9b5389 | |||
4f7d329caa | |||
bc141debb5 | |||
6dfe25dc8b | |||
6516422034 | |||
c58b9c9d76 | |||
b023e5e32f | |||
4c1cb4287b | |||
9b7262115b | |||
c7204dfe0a | |||
e6b5a4f5f0 | |||
310580ea13 | |||
627c27bb92 | |||
ad6960c45a | |||
bc679bc23c | |||
fe0dd6fc93 | |||
850e45f19f | |||
2622b54936 | |||
e5f48d20e7 | |||
5992afa57d | |||
1973c39c82 | |||
901e43c904 | |||
3dbea29ee6 | |||
33fd66b463 | |||
0f593c22a8 | |||
43e1bfd13c | |||
9c0e180655 | |||
7865932481 | |||
2cf99e1655 | |||
9482cf6c09 | |||
a2be7fbff5 | |||
d6ae2f6edb | |||
c8ea4c111c | |||
8ecd6f849c | |||
82ef8ada82 | |||
c86da67436 | |||
ed3ccc2cad | |||
aa8e7e7776 | |||
c8d24dd150 | |||
46bfce3353 | |||
a1850bafbf | |||
f359997f86 | |||
0306e6a8bf | |||
c948746c21 | |||
203fe7278a | |||
321a6a94f9 | |||
3fd57d8239 | |||
e31d24366c | |||
50df52244e | |||
9e6b0ee2c4 | |||
2c109a74cb | |||
26588707c5 | |||
0e820ce745 | |||
8065bd4ce1 | |||
14b2a4d574 | |||
4cff1d52a5 | |||
cf0e60faf4 | |||
8e627a2e51 | |||
d132c996a6 | |||
34fcec1933 | |||
a16cd9cdda | |||
65cc526f6f | |||
c5400efc11 | |||
75d139bdf2 | |||
8431fcb8c8 | |||
b4f827d45a | |||
e00b2de71c | |||
9a5c4fefec | |||
5a4be8a2c7 | |||
8f1f982565 | |||
e0667f7b54 | |||
49f7dd9982 | |||
0be3da53c6 | |||
bdcda710a7 | |||
d3f4c5be8b | |||
2b57691ce0 | |||
f4dac8ac06 | |||
bae6383607 | |||
cad9b63136 | |||
bd205419f1 | |||
6ac226d915 | |||
88a1f14cad | |||
9993286de2 | |||
2c68b1c732 | |||
95f6022cb1 | |||
119dcee1dd | |||
8200761912 | |||
1706cb3ee3 | |||
15fa992cc8 | |||
4c3de9c3ed | |||
41bcf8adbf | |||
408d392823 | |||
07921540dd | |||
633c57d1d1 | |||
710566093a | |||
2459f67731 | |||
057ac4da0e | |||
5b9a253ae9 | |||
072d436b3f | |||
f2a50d1231 | |||
55409ebbb6 | |||
d4c53e3fdd | |||
4307835d26 | |||
577aad6f13 | |||
b7b1b2884f | |||
7bddd30e94 | |||
4089a17cb9 | |||
e6bab8fb91 | |||
d71cfd2041 | |||
4b86314495 | |||
c6986fac77 | |||
e325b223a2 | |||
5276941c8b | |||
e93e7102cf | |||
831a7ef541 | |||
9d2762ca6f | |||
e813c15443 | |||
fda691ef53 | |||
3bded7db7e | |||
d72cc4111b | |||
a969ed34db | |||
465eff61f4 | |||
bec853e9ad | |||
e51c20bf2c | |||
4b373ca8a0 | |||
2c4a60da35 | |||
5a3833d2d3 | |||
f09d39db4e | |||
1f40ae2d74 | |||
d01f5a01e6 | |||
eb8b7d6ef4 | |||
82a612202b | |||
d450609145 | |||
579fdb4910 | |||
e9cf848dad | |||
ce9e21a0ea | |||
6c3c31e49d | |||
065b683618 | |||
1ee6f0bdc8 | |||
ac57f084a2 | |||
a554b71e32 | |||
7929dd02e6 | |||
266a1f794d | |||
e7f35cd292 | |||
fe42b11cdf | |||
d15e9aaa48 | |||
1282b8d996 | |||
f934efc9f8 | |||
a9067c6ec0 | |||
4ac82401a8 | |||
6f762171de | |||
061e0fb9ac | |||
5343b1fc27 | |||
bb9c90a207 | |||
70e03fea5b | |||
75ced9a123 | |||
cf6526c211 | |||
99f065fb6e | |||
0a0f9c5d68 | |||
76655cb82c | |||
8c7e416309 | |||
2030d257d1 | |||
db601b6818 | |||
d131ea3078 | |||
fdc8c8b5fa | |||
3790a42003 | |||
47d4f7cec3 | |||
c9bf8bfabf | |||
9048384def | |||
6735871531 | |||
de4b09fa26 | |||
1a718642ea | |||
1b8ee0b88a | |||
4001f244ad | |||
7a29cdcc0f | |||
3892597349 | |||
538b324c5f | |||
c8d45ac88e | |||
7f3156dad6 | |||
205ed2d2b5 | |||
8a14c39ac6 | |||
ec00968f08 | |||
72179fad42 | |||
96fbc31027 | |||
8f8cf4d336 | |||
9ed93cb5d5 | |||
221fdd8cce | |||
5554d1cf8a | |||
993dbe1fc8 | |||
37fcd58ba6 | |||
6a587343a9 | |||
0f61da8582 | |||
f8daa37861 | |||
5f8cdc641b | |||
1c6c5836bd | |||
bc46ac5c7d | |||
b14693193c | |||
b8743080d8 | |||
75c37058b3 | |||
00f21c7724 | |||
7d38fafd96 | |||
09b6444b88 | |||
f7f1244bc6 | |||
f6118c62a4 | |||
d841da8512 | |||
e3a8f46c0e | |||
0d9839b333 | |||
6724b1b6b4 | |||
517aa8b065 | |||
9aba60ed6e | |||
5d9cc7866f | |||
a942bd4952 | |||
68e1dcfdd9 | |||
062ef1cca6 | |||
a03609b496 | |||
7afcfe0f9f | |||
90e63deeba | |||
5003632407 | |||
206e157cc1 | |||
b97dc871d9 | |||
6de9795143 | |||
db1b344207 | |||
11f3443db6 | |||
b62c5e8949 | |||
b497b48027 | |||
d1cec75ce8 | |||
e747b7473e | |||
287cd7563e | |||
fc3741f379 | |||
eb0e7bc976 | |||
8e97d00755 | |||
3fa4350d6a | |||
44bb9bdec8 | |||
e3a692d7da | |||
b54a2d1d76 | |||
d5583a5e61 | |||
ab90f96ba5 | |||
0bca3c914e | |||
d52f2580e7 | |||
c5b758bec8 | |||
7db15094c2 | |||
21a097aedc | |||
5c026445f0 | |||
9fed935f5a | |||
40b41bc799 | |||
1bfcc843ff | |||
830fdc77cb | |||
5919ba42ed | |||
14d1a93e44 | |||
7522dc3c07 | |||
16f3d3d35f | |||
85e3c77226 | |||
d6463dd42c | |||
7043bf353a | |||
3ac9d4cbb0 | |||
55d2e5398b | |||
989842c972 | |||
bc518d5cab | |||
ac78db3a53 | |||
fd91dee420 | |||
a5258cba6f | |||
56c99f2850 | |||
ca65bb7b4e | |||
2a8cc3064e | |||
d5493683ea | |||
5e808cb811 | |||
6b24dfce74 | |||
7f4b053980 | |||
773ee2bb17 | |||
5ef051a53a | |||
a87fcabd2e | |||
4acb0e7742 | |||
0a54fb533d | |||
204af8157d | |||
b28a411362 | |||
e983f0cb4b | |||
2abd3f9e1c | |||
a090ae04c2 | |||
2b2f465fcb | |||
b25a45ca46 | |||
98d69c0627 | |||
026003e621 | |||
0d8bb7427b | |||
011533e4c3 | |||
8f3aaa8a4c | |||
ca543396a7 | |||
233f1b6a38 | |||
97d56fa1a2 | |||
1716375507 | |||
e0849350aa | |||
69088c2825 | |||
e4cca16b42 | |||
161d2334e8 | |||
559e947306 | |||
70c86d9b26 | |||
1010b4aeac | |||
cfb6ea7e65 | |||
6b7c1f605c | |||
b3f5418ec1 | |||
07dd474d65 | |||
2b56ba5a4f | |||
7a3edb6f27 | |||
bef75e7dd9 | |||
10221a0e57 | |||
a9ac2d9b91 | |||
842dfe8d63 | |||
b6b233a6e5 | |||
1ac194e14a | |||
c4ea8f7d3f | |||
c16918ac11 | |||
944655dada | |||
bbac5ace53 | |||
1285598a99 | |||
988b3fd2ee | |||
483004f6d7 | |||
15a53c6329 | |||
b2b425b05b | |||
1cdce27cad | |||
d9c84ca7ef | |||
ba0fc470dd | |||
e6dcafbc1a | |||
9acd39d95e | |||
277279343f | |||
fd45658a68 | |||
2c51572435 | |||
c123ccfa12 | |||
e2e561d31f | |||
f8841120b2 | |||
6923e8c40d | |||
e1bff02ebe | |||
9f444c351c | |||
f6b1039f86 | |||
2e63c2a566 | |||
66bd65d0f7 | |||
3a39f44fc4 | |||
2f6fb9f5f9 | |||
d9af3cecae | |||
3829f238fa | |||
b9552841bf | |||
9891b4a28b | |||
09210a1487 | |||
79091db72b | |||
eaa0a17ac2 | |||
766ba779bd | |||
f5babed62f | |||
ff196b6227 | |||
63e7b5b8a7 | |||
87c6097c8f | |||
bea930d7e4 | |||
0f7885722e | |||
d4d3ecb551 | |||
462e14139e | |||
2f7ed8d775 | |||
95b7a6c6db | |||
ad6ee02146 | |||
a9cd4a2f11 | |||
2832c4125b | |||
728fffd33c | |||
4b9cd535e4 | |||
f4181ce3b3 | |||
307ca379d1 | |||
c7f32a5bb4 | |||
2d96be6484 | |||
08311f5033 | |||
82171ea0ff | |||
f87275f821 | |||
664d585882 | |||
0e46307574 | |||
5ede3d8cce | |||
9be1a115f1 | |||
868679fe96 | |||
dc4ae11366 | |||
060b215fa7 | |||
493ec92eb3 | |||
15843bdad0 | |||
ac690b1e9b | |||
0e962eeb93 | |||
5d9f5ff910 | |||
3f0fe68c4b | |||
274d20a065 | |||
0ba307f0fe | |||
2296479dfd | |||
4bab6e79b0 | |||
083da160af | |||
4c56a58f63 | |||
76684bf75b | |||
d3989a26c1 | |||
00c35c1a98 | |||
c1cbc605cd | |||
016d8f75d8 | |||
451b1e0b9d | |||
1811768c64 | |||
abe2de8854 | |||
f7c3876c28 | |||
56b69aa9c7 | |||
9ccae7558d | |||
4650f5baff | |||
b7ce5fe311 | |||
b1fb0152bf | |||
b2aa5283e6 | |||
e065bb43d7 | |||
fc2e7413b3 | |||
0b4db13994 | |||
1eaf58be2c | |||
a53977e232 | |||
4aef682819 | |||
478c889847 | |||
fc6a9f2c20 | |||
c10ac755f0 | |||
572f074971 | |||
c3ee3f6d7e | |||
d867b7d87c | |||
898c47c5dc | |||
788e736b4f | |||
717dccc3ee | |||
c364019486 | |||
810caa9949 | |||
010225c777 | |||
e22f536bf8 | |||
74d06f2554 | |||
fbb3e6c108 | |||
bf1e481944 | |||
044e4b5745 | |||
3716f3957b | |||
b0c2fe0554 | |||
61c1a05c07 | |||
03f50720df | |||
5f4f36116d | |||
cd355fed62 | |||
f7327fa64b | |||
90c0a18e8d | |||
55e75452d4 | |||
0933572507 | |||
b5390acac0 | |||
6fbc763b81 | |||
2596764f34 | |||
3939acaa77 | |||
fce799c1b2 | |||
f136524d00 | |||
b4cf306514 | |||
db0c3b3192 | |||
a86a1837d2 | |||
520d5fb427 | |||
ad8c35c8ee | |||
de62e0f079 | |||
0175fb1b4f | |||
35d4a35669 | |||
3a749ee654 | |||
c3f16a96b9 | |||
9541ba828f | |||
5df833179d | |||
838125b3cd | |||
a486af46b2 | |||
4df1e0a2da | |||
8ce14a7948 | |||
9f1e0c5428 | |||
10c3749207 | |||
2817cc568c | |||
fa927687d3 | |||
3bbd90173a | |||
dc17d2de34 | |||
a6935c2508 | |||
c84e2fe893 | |||
70ca32e0ba | |||
53052fe5ee | |||
a5d72a3170 | |||
99894127ab | |||
84da72c988 | |||
251ce85b58 | |||
d112f46bed | |||
12a8aba418 | |||
6ec72c9b4f | |||
148762110c | |||
a63398059b | |||
614ef40815 | |||
f92a98c56e | |||
2dfbd93ed6 | |||
c1ae7e9183 | |||
905a933f46 | |||
fb5332900b | |||
55b6645495 | |||
591298a575 | |||
8e8a00cabf | |||
04884b65cc | |||
be929f41af | |||
b9a7877568 | |||
f9cbe35319 | |||
50afb0631f | |||
93649b122e | |||
b4cdd2532c | |||
bf48fbbcc1 | |||
08d177b091 | |||
1e80ab341a | |||
19eb7509d3 | |||
c4cbf482f7 | |||
5dae9306d9 | |||
ef2eb9df6c | |||
92c2f5e38b | |||
015ae11bf6 | |||
4f17374dfd | |||
347c83cfc9 | |||
a1f873f069 | |||
fe7aa2096d | |||
ce60d5a139 | |||
a1f82a3498 | |||
b38895ea38 | |||
f5702e70d6 | |||
2d3570adfc | |||
212eb16795 | |||
d3ae4f1364 | |||
53e78539de | |||
b7041a7ee2 | |||
1efc72affa | |||
374c50e876 | |||
19318ddab5 | |||
9a57095bd2 | |||
8ea218b2cb | |||
4a04a7bf10 | |||
866cc3d662 | |||
5dc87fe470 | |||
934c683933 | |||
8e0ffe2088 | |||
9a8b67d0af | |||
e09b5f2d4f | |||
d2ea674635 | |||
8957dd6b52 | |||
0dcd41739f | |||
536f5a7eb9 | |||
30554c8416 | |||
0067a426e7 | |||
e8e219d63d | |||
7bb37ef068 | |||
7802119005 | |||
1e162bf8bd | |||
94b18a1757 | |||
2e78aa5a78 | |||
66fbeaec98 | |||
2a6f251f4d | |||
292be87205 | |||
fe0609dc3e | |||
617536e580 | |||
24850ccf9b | |||
d5a6eb44ca | |||
851ef96f4e | |||
3aa34a8167 | |||
665fca156c | |||
532f319c9d | |||
0d3a5126db | |||
5ff7031f72 | |||
bdd921c772 | |||
e237f8b766 | |||
c1526f0458 | |||
d5b7c55c46 | |||
7ec9b6c6ac | |||
f5ff854c36 | |||
ef10529187 | |||
ab00d779ed | |||
6366d92803 | |||
770d7c7395 | |||
5822582981 | |||
463af337b0 | |||
309b8571cf | |||
e72b9d483f | |||
bbe4a7e944 | |||
8346b04445 | |||
c681409a8a | |||
d264b46c49 | |||
3b0f20ba70 | |||
5caf89b9f8 | |||
f7dd6d5da1 | |||
4c3f5dc03c | |||
63e3dff02f | |||
4dd34eee09 | |||
5c4ddebb16 | |||
3dc5d079fe | |||
498f3d0cd5 | |||
ae8e3a0bbb | |||
2da008afa6 | |||
15f755bd01 | |||
1116fa86e3 | |||
9c9bde3aa3 | |||
2ccb74b6e9 | |||
1e302cbd09 | |||
564dc9c7c8 | |||
d3fccfbc41 | |||
2a07a4d62b | |||
b04bb65504 | |||
82501922b6 | |||
d87c7bc07c | |||
aa431c0e17 | |||
a41e030fbc | |||
5f72f960df | |||
bc2d151b00 | |||
d9d2102bec | |||
a344b68936 | |||
293d1e39fa | |||
b1900797e3 | |||
6f94c5d41a | |||
36d7418afa | |||
0cf7acc688 | |||
06a0b567ce | |||
58a150a1a3 | |||
919be612b8 | |||
849635d4ef | |||
fa5aba0484 | |||
6f07ff10d1 | |||
5cc0ee270c | |||
127c131754 | |||
98ab22711d | |||
2d67d12570 | |||
eee0e22976 | |||
0e55632661 | |||
ddf4fa0cc3 | |||
aef586548a | |||
800b0173c9 | |||
a6e9051bc6 | |||
a2118a21c9 | |||
394041b149 | |||
4c76ab678a | |||
2a8adac7f5 | |||
f03217b6bb | |||
5b724d48bc | |||
ac6bd5b037 | |||
2bb1d30d69 | |||
29dd5da1dc | |||
263c679075 | |||
7f731f8d4f | |||
efcee9fadd | |||
6bcbe5749b | |||
733b39aed4 | |||
80a3df2607 | |||
588ccaa9a7 | |||
fa6f861b57 | |||
09e3bfbd8b | |||
8f407f695e | |||
d6d50099e0 | |||
7611e7e2f1 | |||
608d991cf8 | |||
bf13d3f567 | |||
223498fa16 | |||
1bd0c0c497 | |||
164e8f1d9b | |||
0c85b7f4d7 | |||
e976bd4469 | |||
f748f83ecb | |||
2b9a5f5688 | |||
cbf1a0fec8 | |||
4520c5e757 | |||
1ba068550d | |||
d047ab590e | |||
4005d9b2e4 | |||
4793ec3ea1 | |||
c410b18337 | |||
698366654c | |||
f62065f15b | |||
9bc6674b7c | |||
99e27ceb6d | |||
0739b9fe85 | |||
3242bcfa0f | |||
c1b98b909c | |||
4488d7371a | |||
7501b6c285 | |||
3383a25f91 | |||
2fb2483d44 | |||
477a0d69e5 | |||
c6400e974e | |||
019dbd31be | |||
50a8c8c95d | |||
8b9c807d72 | |||
5a359365b9 | |||
490160140a | |||
b474afdd21 | |||
0b6ff78342 | |||
d255744dba | |||
ebef00faf6 | |||
f790672f2d | |||
c012428291 | |||
3a6374c454 | |||
12b641d3df | |||
a4db050318 | |||
5481c961b2 | |||
d4afa938c3 | |||
8984af89b8 | |||
dcee908921 | |||
86cbfa00d0 | |||
60eb2c2c40 | |||
a0546da57a | |||
0eb1f1cba9 | |||
f7dca0a275 | |||
581c42807d | |||
defbdcf3e5 | |||
e0383d2ce8 | |||
479e31e090 | |||
cc93ce79b1 | |||
abe40e0664 | |||
cccef34155 | |||
57abb998a9 | |||
d8d42c2f5f | |||
d68a13a602 | |||
60c64325cc | |||
736aa74faf | |||
e44b407b00 | |||
ae29635876 | |||
4dcbdb0ab9 | |||
318e2ac974 | |||
0793afe913 | |||
a53958098e | |||
7fae59b049 | |||
f4609f9abf | |||
56f19818dd | |||
fa45b52b09 | |||
0aeece7689 | |||
1211590ca3 | |||
1f83dd8fb6 | |||
c1e9d6b761 | |||
cb7041ff6b | |||
27bcd6c9e8 | |||
431aa6dd1f | |||
efb866f519 | |||
7c85168c45 | |||
86ddd732bd | |||
3812597c66 | |||
88e83e580d | |||
7844912f37 | |||
b194a43397 | |||
41f0e0fd4d | |||
043976065b | |||
ee862ffc44 | |||
fbec6b160e | |||
bfe5726571 | |||
b55bc7c9f3 | |||
26ac4db383 | |||
5de5522685 | |||
91d94b0907 | |||
a6dbfb5808 | |||
3b42119237 | |||
433e8d272d | |||
59493717ad | |||
fab8ae77cb | |||
777028fd8a | |||
88352d7365 | |||
831d65d0ba | |||
17573035fd | |||
785a31d67e | |||
01bc897dfa | |||
9c6c791351 | |||
c42b786485 | |||
b3ee03c404 | |||
44d009dc7f | |||
a29bc9786d | |||
7f53b98112 | |||
cb672a5857 | |||
2859c45033 | |||
4e63077d6b | |||
534c5e1133 | |||
0a20c08d0f | |||
d7cba288e4 | |||
cd9aec6fb0 | |||
ae10016c8b | |||
62d3400dd9 | |||
ebabfadcec | |||
a2f4758900 | |||
fbec1ad4ef | |||
6d6b129ea4 | |||
d4c175b97b | |||
c14b54dd17 | |||
46f8bd70ef | |||
2bffa8aa84 | |||
888a98b872 | |||
84129b8c68 | |||
e69d6c2e7b | |||
3cfbc4a608 | |||
9551cf4709 | |||
c5b0e3b566 | |||
3aa362bca9 | |||
411ca3d663 | |||
9943b8829b | |||
87f025aa21 | |||
bb5953d1d0 | |||
31a477c3e8 | |||
ac0478150e | |||
eaa57736ac | |||
711a478c05 | |||
c6ee58c790 | |||
399332d271 | |||
e07e13d7fd | |||
28c78abaf7 | |||
108cd0e16d | |||
ff7670915c | |||
e03305358f | |||
6c1e81059d | |||
444ece2a38 | |||
c13866fd40 | |||
d1b6ff80c0 | |||
796e77ef25 | |||
cf482c1794 | |||
51d43fc9c5 | |||
30461a9197 | |||
a7ff9c59a1 | |||
2fc82d699d | |||
186b9de95d | |||
4fa154e87c | |||
b13d454f35 | |||
064a50160a | |||
54e055179d | |||
2c34e3155c | |||
7fbe6ae900 | |||
0581a6759d | |||
b8671eafde | |||
01dfdc5369 | |||
711bfa9710 | |||
6f3a55ae7e | |||
b2229dc199 | |||
edff1655fe | |||
eee6a7fa28 | |||
8f251d9227 | |||
56abd4d878 | |||
b2f9a10c18 | |||
2bf7a2ca82 | |||
ef5a238cb9 | |||
25852099ee | |||
ba3a69f9c7 | |||
0ac4e5a7f8 | |||
7bd886b503 | |||
bdd9df7637 | |||
0a4b47ee2d | |||
922064162b | |||
5a57725126 | |||
ba817d0931 | |||
e9205d537c | |||
1d9370b3a5 | |||
49e917bffd | |||
056e454da3 | |||
c5c3d76127 | |||
3503b3f730 | |||
a6dd535354 | |||
b0801e11f0 | |||
62c8dbe970 | |||
0a36022b69 | |||
2b6db9738e | |||
2268e0dc15 | |||
2fe2d3d775 | |||
45f77b81a4 | |||
a4fbc385e0 | |||
2fff2a6e31 | |||
e904c7cdea | |||
31d1959d75 | |||
24a845b622 | |||
101351fe95 | |||
9ef671769b | |||
1000a5561d | |||
fcc434764d | |||
85cc5fdc4a | |||
b88d57c2d4 | |||
47a9af483c | |||
c71359413d | |||
7b9bca0b2b | |||
473e0c35fe | |||
c445b4fc77 | |||
e036270953 | |||
3187576429 | |||
66959011d8 | |||
82657cad24 | |||
87eacacb35 | |||
faa74b0fb8 | |||
096f457926 | |||
dd95e006e3 | |||
5be350b9fb | |||
a33c6d773b | |||
595688a3d6 | |||
7123e2e9b6 | |||
15c736be05 | |||
808a9c223d | |||
7454bdf3e2 | |||
b3ddf83a11 | |||
e35db2c6eb | |||
c00f4d669d | |||
c094d99611 | |||
3b55602b25 | |||
f961becc43 | |||
33aaa921f7 | |||
27e085a8ee | |||
e9e7b20f43 | |||
79cfcde458 | |||
89cc9ce399 | |||
2dfdc7746d | |||
a613a311b2 | |||
fe4983e5aa | |||
92658db3ca | |||
735eccea4a | |||
cf9e0bc6a6 | |||
6f009dc485 | |||
169956db9d | |||
e2e0057ee7 | |||
ec38c3d956 | |||
4cd9a11477 | |||
4c3b156a26 | |||
cc9963e3f2 | |||
d8fe4431ec | |||
77e351d9d1 | |||
5aecd0e533 | |||
6959f5c915 | |||
591790fca5 | |||
95f7b22dc4 | |||
588c79ddde | |||
54accfe0d6 | |||
1fc02d1d34 | |||
64b35f341b | |||
6911219ccc | |||
a45a0b70a5 | |||
f1d807c5c6 | |||
263522db97 | |||
eebe0e0db1 | |||
7f8afe0631 | |||
2b23948535 | |||
4a1c69aa34 | |||
94271b428e | |||
f51b12735d | |||
5c10abeb73 | |||
ade606df16 | |||
c54113468b | |||
316ded82f5 | |||
0bb292e384 | |||
7c54d2a760 | |||
d33ebd1374 | |||
f7d4f73053 | |||
a4d8180913 | |||
b953d05e60 | |||
e9a6d1a813 | |||
d75ed0bfd9 | |||
1f1f2c4d38 | |||
66a98ee967 | |||
57dbbbb596 | |||
57fcae1031 | |||
057ce5fa55 | |||
ae269c0276 | |||
e68a4385d4 | |||
c8ed34075b | |||
c2b50ace1b | |||
f3f654ddb9 | |||
331ac1b078 | |||
39e55209dc | |||
aad2903c9c | |||
32154d7b12 | |||
b4e5c5eb1e | |||
5fa5da1083 | |||
264bf0b27e | |||
94534b3132 | |||
62af53fe10 | |||
1129f7f636 | |||
1a1515b949 | |||
d7f6bd5860 | |||
db2815ecf4 | |||
80547369ea | |||
3385ebe59a | |||
8ebb95d0c8 | |||
740e5ec013 | |||
3693d0f94b | |||
00feb3928f | |||
621dd8468f | |||
9125073d2a | |||
730d47537e | |||
821844534c | |||
347a7529aa | |||
805d44f2c7 | |||
f0acf47ae1 | |||
31575f6391 | |||
1e6b86b8b6 | |||
8fda04449f | |||
96d14ac1c9 | |||
24ae84d260 | |||
8ba235e2ac | |||
08e920e50d | |||
15fca66bf0 | |||
08bfba4f02 | |||
59be62480e | |||
bc5ad1087b | |||
d43186418a | |||
fa31751fc7 | |||
cbfec89037 | |||
983608daa5 | |||
10008107b7 | |||
2510e2aa44 | |||
e3fd63f264 | |||
63db6142b6 | |||
2d987fe0fb | |||
3aa91dc7be | |||
d68e0476e9 | |||
d47d77692a | |||
fe4d62708a | |||
898e965abb | |||
af31a998c9 | |||
d2077af1af | |||
0bdfec8578 | |||
c6d7dcc832 | |||
9a64ec4dd2 | |||
fd99eca800 | |||
a622f28cb2 | |||
d8bb51eb4e | |||
5ffb6887c2 | |||
358f66a442 | |||
7d7dc20e9e | |||
a9f6529924 | |||
603cb8511f | |||
cd6aac1524 | |||
70b3044e45 | |||
0443ecc5b2 | |||
22d94ba8a2 | |||
e2979df3df | |||
f059e97cc8 | |||
72980b15de | |||
27eba676e0 | |||
f3570d2479 | |||
fa2ed276c3 | |||
dac533725c | |||
da1e02a3a0 | |||
b74a2eca80 | |||
a3f7fe8219 | |||
f14f640168 | |||
92fc072c2f | |||
81c5c761b3 | |||
013accca7f | |||
f0ab23cb03 | |||
10d6fceaa0 | |||
ed85f614b0 | |||
6116f369e9 | |||
00e49aed52 | |||
71d3101259 | |||
ff09952921 | |||
5368504e44 | |||
8a61a2f2d5 | |||
1aca8b898d | |||
9c3ff1ba52 | |||
143a78c9f8 | |||
3e0f74d6b5 | |||
342cf7f6a4 | |||
c3fbda4e73 | |||
3f1abb84e8 | |||
1484c03916 | |||
2114880f66 | |||
2e1f73181a | |||
50583f0e1f | |||
8eb221deaf | |||
bbfcf62512 | |||
7109304cf2 | |||
468dc33325 | |||
3677520fd9 | |||
f2e0461d89 | |||
447d9489a2 | |||
c7a1a3e994 | |||
a2176d8ef6 | |||
555d6c2161 | |||
1e70cda320 | |||
e953dce7c4 | |||
ffc51d475a | |||
70efecd4a2 | |||
9d903a1dd3 | |||
7760261db7 | |||
7e3903b1f1 | |||
3d840d09ae | |||
422bf6b472 | |||
1eb1e3b8bf | |||
fffee873c8 | |||
0819a47d14 | |||
5ad9acaba6 | |||
679755778b | |||
0fcd6f912b | |||
9b28f0023c | |||
40672becaa | |||
ac1c9ece23 | |||
e884592209 | |||
566dd35768 | |||
4f66648c09 | |||
2a08137fee | |||
f545208597 | |||
61980af95d | |||
3d3b76b832 | |||
8951ed8b90 | |||
339886cff4 | |||
7f761658a5 | |||
d76d60bf56 | |||
a1bb091d00 | |||
a5ae62e9d2 | |||
491c016d77 | |||
41aa8bc9ab | |||
e63be8971b | |||
e99e2b65cf | |||
f466ea97bf | |||
9d5e36e839 | |||
0d18791755 | |||
b4831460a5 | |||
5672dcd58c | |||
fb22ff4c03 | |||
9b2e9bd1bb | |||
9de55cce55 | |||
42c4e886c8 | |||
465fc13c0e | |||
6321d7c14b | |||
2a3434757e | |||
2ae9cce87a | |||
fba78bf897 | |||
6d3cd08252 | |||
fcfa94d6e8 | |||
7b209ddea7 | |||
be63a24c4c | |||
f7fd63066f | |||
73f7069fe6 | |||
dd56de974d | |||
b1bca88a04 | |||
bc839fba3d | |||
98b5f907ac | |||
8e7928a6fe | |||
42f42ff450 | |||
ca1b2d19a9 | |||
d51a0896c6 | |||
ab8f923f53 | |||
ca55f0a0ea | |||
8198c678f7 | |||
4330a9c8e5 | |||
ccd300b4b4 | |||
f8468d43e0 | |||
0fd068b3c3 | |||
998d8561d1 | |||
9738970c15 | |||
b37fd67e87 | |||
0e6c0e18e3 | |||
b97009ed43 | |||
076915955f | |||
c3a08a9d5e | |||
ebf732b4a5 | |||
bbf508914d | |||
266b5171a3 | |||
9f3f9154c9 | |||
2bdeb7f843 | |||
77e45d3ecc | |||
58c68d56de | |||
4a53db06ec | |||
9b1936dc82 | |||
ed5642234a | |||
c77e041909 | |||
163506a8f6 | |||
b7c40630d9 | |||
fb944f4270 | |||
b7e69a2e56 | |||
2a696c07b9 | |||
f4b7f22584 | |||
1e67106001 | |||
4815fb8dc5 | |||
e355ee26b8 | |||
1cdaccab1c | |||
efcddd9717 | |||
689b26f57b | |||
9b64dc4226 | |||
a9a06eea0b | |||
79f065a79d | |||
a6de5470fa | |||
4ee073d476 | |||
ca20b5fa6f | |||
283fd8e653 | |||
d7ee9dda70 | |||
4351ace145 | |||
7d82499634 | |||
ba894be382 | |||
d912f1d4f9 | |||
9c44b25645 | |||
0e92bb010f | |||
bfe07899e3 | |||
951f7c7e78 | |||
672be9a028 | |||
a513519df0 | |||
be7cbdcc9d | |||
0aa7d247ae | |||
6181030ba6 | |||
a7141c518a | |||
e0b3c7bef1 | |||
1c3b1112fa | |||
0155457449 | |||
116485a634 | |||
8b831da586 | |||
87fe2360c4 | |||
abf7d4d7e8 | |||
22aa9e3fcc | |||
bf08da27d5 | |||
d08eb062df | |||
17cb0370a7 | |||
1173bf30fa | |||
10104685c5 | |||
273a8dca1f | |||
9a4881a783 | |||
09f2921b5d | |||
0e3d7de741 | |||
862c385f9a | |||
f7c01aa774 | |||
d3de85cbcc | |||
9d0215363d | |||
a05d033226 | |||
f0d39c409b | |||
4f22267b09 | |||
c7a943397d | |||
cda71b8dea | |||
63cf7cd258 | |||
a7cac0c21d | |||
f92c3fb260 | |||
2d5d552fa5 | |||
8a0dae628f | |||
f2134f3bab | |||
bd1fdc6e84 | |||
c3b0b72813 | |||
6e2f3d1df4 | |||
9831244cb8 | |||
41462bd0c3 | |||
a649a543ba | |||
f55f3e67be | |||
de8c7e39bc | |||
db7410e0a4 | |||
55fdfca833 | |||
152e5a03a1 | |||
e0969aec25 | |||
f6ada1c307 | |||
38cd3756b8 | |||
f16d904192 | |||
deba4e8560 | |||
dbae4d03ef | |||
654fd0703a | |||
535333dd54 | |||
b457649ef6 | |||
a95baf9f7f | |||
800e964eef | |||
21111be199 | |||
9f54297fab | |||
f43e51d444 | |||
85a255fbd8 | |||
05082737a9 | |||
eb960f1af9 | |||
e4f9d5c70a | |||
801471436e | |||
e8e66f4763 | |||
ffc31d07f7 | |||
0362517d1c | |||
106053537c | |||
b43efa694e | |||
18452628b3 | |||
7fcaf77c2d | |||
2e8117143a | |||
6a622311e4 | |||
0188b1399a | |||
44ef167d21 | |||
32d3995587 | |||
647e34dbe5 | |||
59de6c9c71 | |||
7ee16b7348 | |||
6f0e6fa6e1 | |||
5f0cd58e0e | |||
3054c8b754 | |||
73b753a7f5 | |||
4ed5cb3fb3 | |||
13a2e949d5 | |||
bedbd67e64 | |||
07a196eaa2 | |||
bc2c0a325a | |||
37a54b7f65 | |||
85bb946362 | |||
bd82d18ee5 | |||
c370fe37ad | |||
c65b8f128e | |||
ada13ed4cb | |||
65ac3d862f | |||
a50478f151 | |||
a25b5d257d | |||
d189987fc9 | |||
ce8c4bfc71 | |||
8c09377dea | |||
4b13c7c61e | |||
343ea08388 | |||
0a07c5c4a0 | |||
d2990c90fd | |||
b2ad8108ab | |||
cf0e9021da | |||
a0f6abcada | |||
421b340993 | |||
f004b6b927 | |||
144eea0697 | |||
c37c7c8b1f | |||
5cde0cb0a7 | |||
4a84e47211 | |||
0544b31a49 | |||
f0d0d91868 | |||
3740d77020 | |||
613d3ad208 | |||
ffbb3c0b8a | |||
622eea7e81 | |||
711455f244 | |||
ae4b854080 | |||
ae3f3024d9 | |||
69d20c45ec | |||
87fb1a6cdb | |||
57799dcdd1 | |||
86f6a135a1 | |||
dfc2b31517 | |||
9f428137b7 | |||
1509c908aa | |||
0492c8cf26 | |||
c52d4f5745 | |||
3bc543a5c3 | |||
6a1219cfe0 | |||
ee9e4ae5bf | |||
a02bb653fd | |||
5a70d6bdf2 | |||
9e620eaff4 | |||
59ff3400b0 | |||
a3e4833e5d | |||
b19425b46b | |||
6b881b24a3 | |||
aaa3b4a0d7 | |||
8e68aff51c | |||
3834520ba1 | |||
372d0ff1d1 | |||
89c61b5630 | |||
d4edacb2e4 | |||
43cdff6b45 | |||
3968653f25 | |||
318ef96af3 | |||
c285b30b7d | |||
93fc60621c | |||
b2eea81992 | |||
f80331f261 | |||
d4adf58e03 | |||
42636a7a0c | |||
15f4d8c1bb | |||
eda794d2cc | |||
662237614b | |||
609bd9445e | |||
bf725b48f7 | |||
21c0650fdd | |||
c3686b3d02 | |||
2dc15e9ea8 | |||
b27c24f69b | |||
bb7dbcdf30 | |||
01586063ab | |||
764bd9789d | |||
ec730396cc | |||
d200e0e7fb | |||
2bb16a5218 | |||
03be2383e7 | |||
4852dec1ab | |||
1c85fea945 | |||
e995dad2e1 | |||
08ec1ae2c2 | |||
f2ad50feda | |||
87df8d08d6 | |||
5d7df71cfe | |||
825f937b81 | |||
fe97013454 | |||
70cada2de0 | |||
d87cc3f24e | |||
8a0d274444 | |||
16ff85971f | |||
0165038561 | |||
3cbf8d955f | |||
88b28ada69 | |||
a7ba56e3ce | |||
9fd0895cb4 | |||
cff5f09e93 | |||
35852b9037 | |||
c71a3db33f | |||
fcf776fd02 | |||
66decf1644 | |||
7e0078b990 | |||
a1e4de47c6 | |||
e8424cf10f | |||
b251a50714 | |||
4551b68c83 | |||
f098a7310a | |||
4e543d3915 | |||
fec8872c9d | |||
31682364ba | |||
606b6ec686 | |||
7acb56fa97 | |||
ec0b586f92 | |||
380e167680 | |||
93dd5f78ff | |||
4af905ac95 | |||
6c1bf27dae | |||
50c3ba24d4 | |||
4121f9e555 | |||
f52fb2f750 | |||
0f9d5c454b | |||
586a517dfd | |||
849e4f5e78 | |||
5e29106ee4 | |||
7bc39a0983 | |||
cbc3c378dc | |||
a1faa4cfc7 | |||
49b2383ddb | |||
f55e7ddbd6 | |||
5dbefd9ff6 | |||
87c9faeb4c | |||
43e6d6a124 | |||
9dca83c762 | |||
e2cea4f458 | |||
eb31685bbb | |||
2ed7eb795c | |||
5bcbd11b0d | |||
de4defbaaf | |||
c1b9e7934c | |||
5b429ac2b2 | |||
2c8b0b1373 | |||
0e06f5bd70 | |||
a1c3beddbb | |||
a357ece751 | |||
0ca5f33e5f | |||
a9ffa9e7f2 | |||
71ea717f72 | |||
3df9262b09 | |||
5ea87ff861 | |||
0db0e61f64 | |||
4505787724 | |||
b09a5696a6 | |||
e3f47eada3 | |||
c389635f6e | |||
11a262c86c | |||
420caafee8 | |||
0cd9ff8987 | |||
a9fa0c897c | |||
6c0ccfb10d | |||
d5779c15eb | |||
22009a3a58 | |||
8adbcc2430 | |||
2cc2ff6f3f | |||
9590992402 | |||
05c0215ff3 | |||
c1e4f89953 | |||
2f91403303 | |||
bda8a04b01 | |||
f92068d9c2 | |||
f76ceea705 | |||
0d473512c7 | |||
96a598b6c9 | |||
cfc80c2211 | |||
bbf1399c73 | |||
f8db028a32 | |||
50943b15a3 | |||
b00ddecd99 | |||
1010868f87 | |||
9ab9c33d7d | |||
21724934d5 | |||
bd8ab8890f | |||
cb1dec57dc | |||
b410d267e3 | |||
e79cb5e19d | |||
b8d746fd13 | |||
448e386309 | |||
c2ed40b48a | |||
c04f894f6b | |||
cb93c130cf | |||
51c31696f2 | |||
919c459c17 | |||
0df7046ad0 | |||
3679d7f909 | |||
68e3f6dd37 | |||
a851bbb40a | |||
ea1a5fef4d | |||
27522ad375 | |||
eaa014676e | |||
e0918bbc68 | |||
2387220c1b | |||
8b73cee9e5 | |||
b5400ad412 | |||
08cf90f860 | |||
ab2d777360 | |||
b58d349ca9 | |||
08ee1cfafc | |||
819e67242f | |||
572a856b97 | |||
6bfbf1c66f | |||
63ea4930e4 | |||
721ee01bb0 | |||
7e86cd4bb2 | |||
6be6c8f282 | |||
f8e491339f | |||
3141eac900 | |||
1bf5e64096 | |||
efe7ff0f81 | |||
ddc30767dc | |||
60fad89091 | |||
35a2bcaa21 | |||
93d53677da | |||
172f886586 | |||
4ba65aacae | |||
40e1fac56a | |||
e10d07e336 | |||
6d2ca02101 | |||
5166827c57 | |||
3e3d969e6f | |||
b2cc1299af | |||
fbdc719414 | |||
dcc3ecc940 | |||
988ee17fd2 | |||
8274accde8 | |||
2ba84cd7de | |||
cfea0bb44e | |||
4c9c2f0d0d | |||
8e9106db20 | |||
71f864191f | |||
9253ce60c4 | |||
c70966cd26 | |||
c4d317f107 | |||
5680fafb4d | |||
216fc50411 | |||
d63115daa8 | |||
fe9876a763 | |||
9fb08f55a8 | |||
43f16f8dd8 | |||
23cc9b09c7 | |||
ff8076d75a | |||
cc728f0284 | |||
e8cc52fab0 | |||
01be52eca9 | |||
060bc7941f | |||
ba6dfe4cc5 | |||
73600e3199 | |||
2b9696239f | |||
d077b58c61 | |||
9657f3bb09 | |||
b1e4bd0d28 | |||
c4153c1b15 | |||
731e463495 | |||
79445c72b2 | |||
89a6685ede | |||
b0eb594b34 | |||
103f00daab | |||
26f64069d2 | |||
c681638116 | |||
1d03f36887 | |||
aff502e87a | |||
71c60ca482 | |||
5dc628a2ef | |||
63eb917275 | |||
761c2942ef | |||
301999f4b8 | |||
7102d005b9 | |||
51fdb9256a | |||
b092c9e9c1 | |||
98fc426a98 | |||
81b09f4008 | |||
116d67323b | |||
2abcffcc40 | |||
39f84fa662 | |||
4f4c6e88be | |||
97f09c3f19 | |||
fc5489fc5e | |||
d4b26b2923 | |||
b11591064b | |||
a608969ebb | |||
4b7a00867a | |||
393d9322ba | |||
ffc2260d74 | |||
4f7a3614cd | |||
95bfcaecf9 | |||
dd4b66e228 | |||
7ee6cd5901 | |||
d6577e1cb8 | |||
a1a6f7535b | |||
74c86456af | |||
2dd5f4cce6 | |||
0a97d7eeba | |||
998671c125 | |||
ed7275f2c3 | |||
2cfab90baa | |||
b8f8cdbd9e | |||
decefea272 | |||
de45c59080 | |||
4af5886ab1 | |||
345f2b7d6b | |||
2950cd2de1 | |||
546f29dbf1 | |||
ca41a6ab0a | |||
32c4a06a43 | |||
10b7ceface | |||
2bb574e52c | |||
7224e87d10 | |||
db84a99011 | |||
ad9a2bb0de | |||
2d500ba598 | |||
a2df081d44 | |||
ba2af2e21d | |||
39495bae5f | |||
6aa6eab98b | |||
19ce16ae69 | |||
a39e6d1cf9 | |||
c4c7f166c2 | |||
eb907b3c90 | |||
1b915b8904 | |||
4a30ab9096 | |||
0302b060b6 | |||
c7b2b7c67d | |||
4408409d05 | |||
89798bcb0c | |||
b9b2c6fef2 | |||
e3413cce3c | |||
767b45fe96 | |||
82d9a31d9e | |||
a737940240 | |||
f764d1458d | |||
cc248bcce3 | |||
1fcee36ad7 | |||
9733ba5bd0 | |||
64a6b9229a | |||
5d7c38ffa9 | |||
0c22084ec0 | |||
11f4a297c0 | |||
d95a463e49 | |||
5a899e92f1 | |||
7119222cfa | |||
13eada654c | |||
8e76f34bf4 | |||
369ae53ef4 | |||
49cb61b41a | |||
f585af395d | |||
ab0df6d5a4 | |||
261059479a | |||
1dda32bb13 | |||
5d7cbc272e | |||
e91e70cb92 | |||
5942e065f8 | |||
c0fb361be8 | |||
27807c66ee | |||
420b2a513e | |||
5f92a5a295 | |||
15184e081a | |||
8ff4308243 | |||
530e1f7455 | |||
e223e895a8 | |||
822fb87737 | |||
dc6c43182e | |||
95f33f4e7e | |||
9cfb40adb7 | |||
1249f056c1 | |||
6324de17ab | |||
a69d2f4268 | |||
f28929d393 | |||
f9495eae2c | |||
2cd9c05dc1 | |||
e9995f1469 | |||
c8d4abd8ba | |||
5d7ab39024 | |||
e02be0e14a | |||
9a17d04e40 | |||
a5a628e86b | |||
5d935b3377 | |||
48c232c1da | |||
bdaa1b5a72 | |||
c3771b0f8f | |||
6966759edb | |||
6720394ffc | |||
757943c7d1 | |||
aaf2841ff7 | |||
4e153d6ee7 | |||
66bbb3187e | |||
ee464b17ce | |||
cc96624de4 | |||
89683c0d26 | |||
5f4ee47c6c | |||
8faea7d93d | |||
576b7c7264 | |||
b0a2d3c298 | |||
1533f13d43 | |||
19bb1391bf | |||
02f4764bf3 | |||
fb456e61a9 | |||
aad9b6a086 | |||
967881d0b6 | |||
7559946896 | |||
6313bc7731 | |||
54093e4fce | |||
a1b3547f0f | |||
bdab9f787c | |||
b7090ee1d0 | |||
bbef4bde2e | |||
31fa749b4d | |||
8c78d0a3c9 | |||
a0ee532af7 | |||
ec19fccf76 | |||
07651fa3fb | |||
f1eac38bda | |||
c6950576af | |||
3e5c12691f | |||
0691f25e53 | |||
bc58a878cd | |||
07e9e6f737 | |||
fefce18533 | |||
497ff3ce7c | |||
8bd6bd26ed | |||
5535cead09 | |||
f991bf071a | |||
425a466948 | |||
d5fd2dddde | |||
1ed1659367 | |||
e369010ab8 | |||
67e11d1e4f | |||
a9e1a2235f | |||
f564606170 | |||
a67526e61d | |||
c019cec4c0 | |||
8d66665637 | |||
77e9f09937 | |||
244cf2ecda | |||
a5244c34b0 | |||
a7feb9fa2d | |||
758c171539 | |||
a09aa5ae40 | |||
df21440d68 | |||
ae34cae4fe | |||
ddd9f1a5a6 | |||
63f8c0af4b | |||
970132f725 | |||
15144d5500 | |||
d4fd0a0fc1 | |||
30f53cd397 | |||
c4511e2b73 | |||
fd277d8f94 | |||
a656362402 | |||
4e7e987b24 | |||
f4d015dbf8 | |||
8e442dc09a | |||
b7c39b2bc1 | |||
699af19359 | |||
5d4735d140 | |||
285b44f723 | |||
06b0098c5b | |||
7846e34c02 | |||
df13c31ed6 | |||
e28846a0e8 | |||
6a370748cb | |||
7e513d1d04 | |||
441be59ae0 | |||
d91b1dfabb | |||
27d71da71a | |||
5d6929b1d7 | |||
c5dfdc5992 | |||
67ea2fb449 | |||
2672ee3e3a | |||
0ab8e00aeb | |||
086730b062 | |||
3fc42772bc | |||
2b1e8b3c3d | |||
b6319c1121 | |||
19d9fe9ebc | |||
517d4a6a61 | |||
cf0f6b8b21 | |||
647e385187 | |||
fb87998150 | |||
e64f794f3a | |||
b57772d2bf | |||
ff25b7532c | |||
fbc4609265 | |||
b7a42d388b | |||
228aae589c | |||
4d27c42604 | |||
3b43fa9086 | |||
da6666b050 | |||
e5bf90ac03 | |||
02c1f86213 | |||
3a749710cf | |||
5a18a0cb20 | |||
ed8a723f42 | |||
9420a5205c | |||
047363f6f1 | |||
1f35fdde71 | |||
da1a70ea03 | |||
9df9e93914 | |||
1ff0f54f03 | |||
edb937acd6 | |||
1766b1ea9d | |||
a7cf7b7776 | |||
45a221de79 | |||
baf00e6b28 | |||
a6e7702787 | |||
3cbe62fe37 | |||
b851cc69d6 | |||
c3571da263 | |||
924f0a6421 | |||
d201e8c38a | |||
b87bb29f4f | |||
14ec199bd1 | |||
f8970f53ef | |||
485225e0a3 | |||
cf77d28ff7 | |||
e44adfa5de | |||
eb20e60c9c | |||
a20ac2f7b3 | |||
02ec8feb2c | |||
a696ae7e30 | |||
498e315988 | |||
cbe38923d9 | |||
d274c99ad7 | |||
daa9e12bc5 | |||
1b44f7e390 | |||
0ecbdde285 | |||
aede3fc828 | |||
5933814e27 | |||
5559e8935e | |||
8e6b0a2ae2 | |||
2de6410eee | |||
ee352cdcca | |||
6b2d83c352 | |||
229d427c12 | |||
7c6c4df68c | |||
8846382cbb | |||
fecc24af04 | |||
b95a074586 | |||
481a19cf99 | |||
9dbdf520d8 | |||
e396317244 | |||
2ed0aa258f | |||
2e0d9447db | |||
f8532b16be | |||
24ca41d074 | |||
2ba837d8c7 | |||
7051dea5f4 | |||
033abe5e69 | |||
af0216f1b8 | |||
c4b684ebee | |||
f3e60d0d69 | |||
51d4de818d | |||
03f7a49f5a | |||
c2054f3212 | |||
4fdd8030a4 | |||
d59d1b61da | |||
6dc53b485a | |||
c764c7488b | |||
046d217420 | |||
0ff8f9048b | |||
4ba946c1e1 | |||
74432e1b61 | |||
b47dc52f30 | |||
bfa19e1e47 | |||
bb826ef661 | |||
12c55eda11 | |||
f812c44f00 | |||
331c722dd7 | |||
272a1f05b9 | |||
29a04d9ed1 | |||
bd0bb23838 | |||
214e4af102 | |||
cbb6c75061 | |||
3e6303ebe2 | |||
ca0a67624b | |||
295d58bda8 | |||
990ab7efe5 | |||
af91b8b086 | |||
31c4b64ab4 | |||
a9f62359e2 | |||
68d0e4a5a1 | |||
9631016660 | |||
77133afe31 | |||
ada36d4cff | |||
5981a63a9f | |||
73b7997ba4 | |||
a23e2ce5b7 | |||
2ab652f606 | |||
bb85f9eb73 | |||
42d55e0caf | |||
5aaeb27de9 | |||
0a207399ce | |||
08debacad1 | |||
4e8f23b896 | |||
4f3d400a30 | |||
3218e794ba | |||
88357548a2 | |||
56e64598a2 | |||
7100cf2b40 | |||
1136447a37 | |||
cbe7a8e100 | |||
4b513a618d | |||
9074cec9b9 | |||
d09a881988 | |||
da1ca20ac3 | |||
000e8aa3f7 | |||
8a13743569 | |||
acc94a73ba | |||
65e33c08a9 | |||
173fe0732b | |||
62c0276f94 | |||
43a1f780ff | |||
e7a336ac29 | |||
c2b51085ca | |||
4af3655622 | |||
90d12351fd | |||
8d2b49f1f7 | |||
791d0580b8 | |||
9d08c4a5fd | |||
d890b45520 | |||
80ef7b778e | |||
0fa4f6f23d | |||
c89099641e | |||
a4c5740752 | |||
721f2998a5 | |||
6b95406ff3 | |||
f6d3bd4815 | |||
fb5647a60b | |||
d4c2484cc8 | |||
2b2ff7fa6a | |||
9f25da1f49 | |||
072b5aa5c5 | |||
574d165592 | |||
2e44ea2d94 | |||
d0128df777 | |||
1eaaa0e446 | |||
5f2bf6d02d | |||
7b22d84d55 | |||
5a3f1e54d5 | |||
1f7395bb4d | |||
d373a00a79 | |||
d18f81be85 | |||
3747ba16c7 | |||
e87e73edba | |||
c32e80d604 | |||
92898b424b | |||
2e8d4ed794 | |||
3bdd45e714 | |||
74babffccb | |||
fdaf9cca36 | |||
ffcd9393a4 | |||
6d2c7226cb | |||
6fc544d3d4 | |||
35272fd237 | |||
019cdbf79b | |||
6b07cba70f | |||
6f656138a6 | |||
03d4ae7684 | |||
fa6014a6ec | |||
1e1c7ac3b4 | |||
49bbfcd5d3 | |||
b619f44c67 | |||
747d0f898b | |||
490006bf7d | |||
07a1b281a8 | |||
ecd4cfcb86 | |||
44d5342835 | |||
a09bb426d4 | |||
69bbfacd25 | |||
16ff807ba6 | |||
ed4aa043c6 | |||
8a3592eec3 | |||
929b60267c | |||
bc6e7c0905 | |||
a606598150 | |||
f79062f478 | |||
ae1bab3c9d | |||
3e41ee9847 | |||
f77516cb6d | |||
91d9cbc2fb | |||
5a98bf2c0a | |||
10f7f5044e | |||
fad2313400 | |||
7e7a4df580 | |||
6d720f38e0 | |||
bf3dbaf86d | |||
9ed54f99c7 | |||
0a105cd067 | |||
e7cd0f889e | |||
a962e062cb | |||
1fa2809561 | |||
9731119b32 | |||
72c83a8e23 | |||
c7c30a8400 | |||
d7ad21aa5c | |||
9c073ed2fd | |||
3fb73c267c | |||
c989e07fe6 | |||
db557477a2 | |||
66d0f11115 | |||
55b147ddef | |||
704662a4b9 | |||
85f362e9b6 | |||
6215b88aee | |||
e1e9ed37da | |||
b790fe944d | |||
b9de78beb6 | |||
359737d897 | |||
369b561315 | |||
9f656c0316 | |||
980a8c1d02 | |||
4f8ff240dd | |||
5a8d619a1c | |||
2a27a85809 | |||
533f6668a4 | |||
0eae36486a | |||
753af5b104 | |||
d347f6cb0b | |||
eca844b949 | |||
49fdf3f957 | |||
7c38e1e8bc | |||
19fbdcc828 | |||
ad4764dddd | |||
d49bbff8ff | |||
cf752fe966 | |||
242ee89f98 | |||
9c940aec36 | |||
ea7b636607 | |||
c4fa3fdd3e | |||
c24f3d615a | |||
7b45d07cff | |||
864b48daf0 | |||
ec90adb2e7 | |||
762cdfaaa0 | |||
0dd8315bcc | |||
31ae314f0f | |||
a91402fc1e | |||
446c5dcd14 | |||
4d166f9380 | |||
886f478925 | |||
ac0bc0cd66 | |||
69056d9452 | |||
1b304cc23c | |||
b29bd27b06 | |||
1d05731e11 | |||
cd920bf1c0 | |||
6e1192019e | |||
c6a8d2ca7b | |||
99d05c74b6 | |||
b135baa0db | |||
86933f89c4 | |||
65873ca934 | |||
9d48e1732a | |||
1a8e43e4e3 | |||
8c83c65ef3 | |||
5e2cfb5cbb | |||
a8aef3acbc | |||
5b242f6307 | |||
7a2963b86c | |||
4938feaee5 | |||
8996084f82 | |||
21cc96cacd | |||
fb50983008 | |||
590ac64d55 | |||
1fc5d1f01a | |||
a009158bf9 | |||
e1aceef955 | |||
ad77bf9320 | |||
fb622cc471 | |||
f9fad12875 | |||
3d7b6069e1 | |||
f82e8ab697 | |||
857829654c | |||
9b423a77d1 | |||
03688ec1da | |||
16c7e0f56c | |||
5dda4df424 | |||
0316e1a69f | |||
cbce4de976 | |||
347234c1ef | |||
8cf590fb1b | |||
708226e906 | |||
1cab0125cc | |||
67cb6aa6a7 | |||
99ae578b43 | |||
c7b26c381c | |||
b6acc3071f | |||
7aa3ceaf24 | |||
d808017760 | |||
cacbcf4815 | |||
89b4abdf80 | |||
d9c193d8b3 | |||
335a9b61b3 | |||
74d165b18d | |||
149c4c5d01 | |||
003d15cab4 | |||
f7060f1d0f | |||
1a38374535 | |||
273384638b | |||
f8549e88e2 | |||
09830faa8d | |||
346fcb2894 | |||
93107bebf6 | |||
f1436e58d2 | |||
5edc6695f8 | |||
d45a3477b7 | |||
317b58234a | |||
6dc8570719 | |||
bd88fa0ef6 | |||
4013469c50 | |||
309303884c | |||
9586dc72db | |||
b4b298c449 | |||
16a3a7515a | |||
01b9f8e4c2 | |||
323c7db204 | |||
4502df12aa | |||
df499b53c3 | |||
0eb163d5d3 | |||
2ca8b31ff5 | |||
551b3830c6 | |||
10420ccd54 | |||
c35bd54a5e | |||
1eee076269 | |||
9b5b536b18 | |||
8528e39fba | |||
4d5317e5a4 | |||
316170e22c | |||
edf965a01e | |||
3bb9405494 | |||
4eea174695 | |||
dde96fb2f1 | |||
232df8b2d2 | |||
d38b22f8ec | |||
30ff36249c | |||
20d9fb4692 | |||
905507c379 | |||
4fcc9f2e54 | |||
56c8ef9a91 | |||
259549678b | |||
eda407f4eb | |||
601ea3d40e | |||
c5fb1a2ea8 | |||
8b954f5790 | |||
d26c9d603e | |||
6149233cce | |||
69759401db | |||
76f14b2b60 | |||
21dbc2fc3c | |||
56033a9f2d | |||
e597e63e49 | |||
b9434aa853 | |||
f5fd4c99d5 | |||
1ef80141c0 | |||
2286138561 | |||
ab1e77fb01 | |||
c8e1073359 | |||
84216dca3a | |||
ce3456dacd | |||
50001b80f5 | |||
68130f506d | |||
b174667534 | |||
593f5c8a48 | |||
62477931c8 | |||
0cf0805e92 | |||
ef33e035e7 | |||
6f1e074c3d | |||
a8c6c7f30c | |||
44e4a4e4db | |||
ff8ccf05b0 | |||
a52d5d1269 | |||
5a0375a2f6 | |||
121ef60666 | |||
acd47aeaa3 | |||
c5bb7bd957 | |||
40d073c3c5 | |||
77c67b3d30 | |||
845b00ce33 | |||
7e1465431a | |||
31fbb712fe | |||
991f18475c | |||
baa1acde7b | |||
aab3ad256a | |||
0d2fdeb36a | |||
eb295a3e69 | |||
71b8f01b62 | |||
99f80422f6 | |||
4dc6cabd36 | |||
167c03ad4a | |||
ffa4054483 | |||
37f4565b8b | |||
75cdfd1d06 | |||
3a18a80146 | |||
ac76ed9998 | |||
b50d8fbb6e | |||
2d3d1b7eee | |||
42b6265035 | |||
4aac08afec | |||
965704a962 | |||
caf0adac4f | |||
fdf31cb9d9 | |||
7c55f374d1 | |||
5173bb7d9d | |||
a40f64f7fb | |||
d89736072f | |||
92a97f459f | |||
0f1553b89a | |||
5ff2502151 | |||
aa5f5b153f | |||
9c6d2b8f4c | |||
21deb06b32 | |||
c29e57d88c | |||
b90b94d3ef | |||
fb128734ec | |||
e740f4845d | |||
5cf5828c02 | |||
d2e8f6ad33 | |||
e536a4d916 | |||
5bbc5e5e0d | |||
9b7bb4911d | |||
6dda31d287 | |||
bdb4af8bfd | |||
8b4f98a41f | |||
839d68f101 | |||
1bb4083859 | |||
669807682e | |||
2f3fd2640f | |||
37450ff534 | |||
f730e44baa | |||
267efa2bd0 | |||
9b51568897 | |||
b15a0d0a6f | |||
bca67fb7dc | |||
78e226cf36 | |||
9fa0760e97 | |||
14dd3701c3 | |||
3d0ba1c47f | |||
48bfcdf006 | |||
4530df431e | |||
51cfbcddde | |||
371d291df5 | |||
b7eb1715ba | |||
8fe681872b | |||
a791fbb0fa | |||
dea0a7f9ae | |||
7bc74ab25b | |||
9d0330f537 | |||
362dbea2c9 | |||
c64f21c02e | |||
9c7ff7bc15 | |||
df95b51ab6 | |||
b06015b92e | |||
1455437c9e | |||
ae16c4034c | |||
619fc95e7c | |||
355dfda3f0 | |||
8420ad4b41 | |||
68b79cdda4 | |||
0122afb609 | |||
631c8a2690 | |||
71c0aa29fa | |||
7760a47892 | |||
c494c7d68d | |||
2b7103cb0f | |||
3db94686e5 | |||
4aca1477cb | |||
d49d42f629 | |||
ce6c35699b | |||
8a44b0b18c | |||
aad34cda4b | |||
240766af02 | |||
9f1fbb9a30 | |||
7dcf9d51e5 | |||
d3634c108d | |||
0dc6a1e898 | |||
90ca3412ff | |||
46f7b0494f | |||
07648928eb | |||
0307e0a499 | |||
66a476ad5f | |||
29016ea3b4 | |||
f682d0028c | |||
474ff3dee5 | |||
72e33a75cb | |||
f41ad02c83 | |||
3ecfdbde14 | |||
d35c264b71 | |||
5f06d53bdb | |||
dc4cb05763 | |||
323a2af8e2 | |||
3ca41166d7 | |||
9597790571 | |||
21be0d2bd0 | |||
a44daac7e6 | |||
4ef4fc6c3b | |||
dee6b1ff39 | |||
f3aa375f44 | |||
b7a8b8c6fb | |||
11739a48ce | |||
9426e4fcf5 | |||
5288cedac1 | |||
38508a0ff1 | |||
eb2f6fff32 | |||
876bdd4ab3 | |||
0d0375b3c6 | |||
6b6c653ce7 | |||
0e545c66a3 | |||
92bcaa2226 | |||
2035d9aa94 | |||
7db2b6cacc | |||
9b24f7ca9a | |||
66aae6d3ba | |||
fe35623f20 | |||
1dcb10eeb6 | |||
685ab2a2f2 | |||
c41c6a4412 | |||
2603812c87 | |||
0111459119 | |||
5260a44a96 | |||
31ec0f3257 | |||
7fd3ef57cb | |||
14ebf951e4 | |||
398540f568 | |||
795ee1a6cd | |||
ef62eacb3b | |||
f3b9fd3265 | |||
861f920cdf | |||
266609968b | |||
83b7761373 | |||
f902722357 | |||
f70946ff4d | |||
ab87c4db30 | |||
4f85a1eb76 | |||
2ea24dabd6 | |||
28a45d4c1b | |||
9b5480dd5e | |||
fe2ae61906 | |||
e36fb7434c | |||
010d62311e | |||
0dc117aa5d | |||
278f20e88d | |||
e4d438e8dc | |||
b87f2a55a2 | |||
c1f864e257 | |||
a85f3ae852 | |||
0ca1b2f547 | |||
b13845191f | |||
bec1108cbc | |||
c7e4c27c3b | |||
45de61de8b | |||
83abd81c8a | |||
dd4390b6e0 | |||
b31017b3ac | |||
406834717a | |||
737c54d4d3 | |||
74e03a4fdd | |||
cfb93e70bf | |||
df1fb9c05f | |||
1b708656b2 | |||
86fc11d0c9 | |||
fe4cbf1167 | |||
03a0a65172 | |||
95b97848cc | |||
22dfccf5b7 | |||
f89a05ed9f | |||
2b206775fa | |||
5d7dc5545d | |||
45ded7df03 | |||
7593bda5a8 | |||
69ded8f79f | |||
39456c2cca | |||
1115625595 | |||
9fc5e0bc89 | |||
7c29040442 | |||
52c0180dcc | |||
c5ab0979f6 | |||
3844d9a30c | |||
8993df1d16 | |||
f3601c406f | |||
502a7e41df | |||
9f21230e36 | |||
f76de841f1 | |||
63d5088bb6 | |||
029f3550ef | |||
a2d131511f | |||
bb3934c3c2 | |||
b38e9a962e | |||
43f6fd3827 | |||
7804bb002f | |||
158abf9737 | |||
1f780994eb | |||
453b543716 | |||
4c502697ee | |||
295358454a | |||
47b6a825a7 | |||
bf54c2cc5c | |||
3d6c95c1cd | |||
e78a1bedc5 | |||
85810cce50 | |||
dc5b10bd92 | |||
dcbb1287a7 | |||
fbdfed01eb | |||
f3aea52a70 | |||
69e89f249f | |||
b65fd3e305 | |||
7c62e17f2e | |||
d9247828fd | |||
c8f0c0316c | |||
59597ead1f | |||
9849f35459 | |||
00018c8270 | |||
8a3ff6aa34 | |||
3b0a626edc | |||
2d72345f80 | |||
cb492da913 | |||
31f4d00c95 | |||
5a4554a73f | |||
721c407caa | |||
1e8a3015e9 | |||
e619a9ac9b | |||
3ff36b05cd | |||
f8537c1cd1 | |||
8bd1c36abb | |||
6ee6bdec25 | |||
4e0d794039 | |||
fdb3a8d07d | |||
b3f6ad3522 | |||
1148786c05 | |||
0325a45fd0 | |||
8c8e2b7e4c | |||
a62191b827 | |||
55ed6728b1 | |||
ed98e945c0 | |||
740edf4f95 | |||
a58c0b02ba | |||
82860f8549 | |||
625b944e75 | |||
5d49038704 | |||
1897c2c350 | |||
aeb2103ab5 | |||
eb90aaf29e | |||
d5d94ea90a | |||
8346aca83a | |||
1528ffa57c | |||
77d37d21db | |||
47657ea1e1 | |||
2ca76e688c | |||
a28e9084bf | |||
2524be4aff | |||
102245fbed | |||
b791799d9a | |||
0dd72e8b1d | |||
f86d035105 | |||
593e7de5a7 | |||
855fc1fcdb | |||
24391321e8 | |||
5a1f3370ea | |||
91ba80dd79 | |||
11bee4019a | |||
9d9ce0d6d2 | |||
bb9469c450 | |||
b2dae79301 | |||
bc39b488a5 | |||
6c4751d596 | |||
e561f35fa5 | |||
50a29f8170 | |||
09c0c114e6 | |||
82cb7875ff | |||
3bfd7cc61e | |||
2a4f58ac12 | |||
e0e7bba2de | |||
c1daad2e6f | |||
6e99c59223 | |||
1ca2d864dd | |||
730a043fb6 | |||
d150006c4a | |||
b30d7ed8f0 | |||
69b11f9d40 | |||
502d457bf9 | |||
2a83935d9f | |||
65eec4d959 | |||
6882574093 | |||
d28474b46d | |||
3b01cf17d2 | |||
70460249fd | |||
f6dc544318 | |||
5ab5a39d2e | |||
0c65dccd3f | |||
c2050f014d | |||
df7cee23c8 | |||
35261c0d47 | |||
85f4b3c9b3 | |||
e6adabdf3a | |||
b2a1a59ab5 | |||
babb2e67bc | |||
160ad6aa75 | |||
0746452a26 | |||
3c47e8a782 | |||
ee0028da3b | |||
a73b93157f | |||
74b13a5616 | |||
ab355750fc | |||
0ace013523 | |||
172a14de8e | |||
f7613ecacc | |||
42444f6f53 | |||
a57ad8f2ab | |||
53552cc08c | |||
6c4ea738ff | |||
0cca93162f | |||
3e6ba4dacc | |||
3efcd2eeee | |||
31ff120a2c | |||
ac901e6bed | |||
f79d05b778 | |||
01327d185b | |||
16643aa686 | |||
dd132a5d2d | |||
5fa4cb6d32 | |||
d91ddc8d31 | |||
772029fe73 | |||
0390cc6b3a | |||
a843211481 | |||
6a2df9a5e8 | |||
59d0e040c8 | |||
4ea0cc087e | |||
fce128cdfb | |||
77a1d1adae | |||
273911cfd6 | |||
5c5c4a6943 | |||
e3b5d36321 | |||
6b171b3163 | |||
e67d240444 | |||
2caf3cbac0 | |||
56699948b7 | |||
c6cd5d4ed5 | |||
ab95702f1e | |||
529fd81f64 | |||
439a527014 | |||
6db10452b4 | |||
5ece96a00f | |||
8db7e6702b | |||
564fbbeac9 | |||
919d9ba633 | |||
8f5053c626 | |||
5907eb8f5a | |||
e11f6c3be1 | |||
114a9489ed | |||
eabce729a7 | |||
bcaaad1c55 | |||
694fd13390 | |||
cedcb882c1 | |||
8e982eabfa | |||
5a1e85c405 | |||
4f930c9649 | |||
1762502929 | |||
3fcb11478f | |||
cdc526e582 | |||
8e1f020cee | |||
1d941068d8 | |||
d4bbfe863b | |||
ce2564ac51 | |||
6fecb7106e | |||
5dba15c180 | |||
f012f1276e | |||
823259332c | |||
ba5487acf4 | |||
f372fb5529 | |||
ad038c1a14 | |||
6ce7459d67 | |||
2ccb280f51 | |||
158d00148f | |||
64d04806f9 | |||
246179a808 | |||
a5c5db37ee | |||
53538be49d | |||
85c39a4ce5 | |||
539aed0646 | |||
662380f157 | |||
990ae70698 | |||
be70646ccc | |||
dcc63b6cb7 | |||
20b7907041 | |||
9aed1465d7 | |||
a11e3ff160 | |||
f86515244a | |||
bed16d9706 | |||
fed269b1c4 | |||
dd49eccb50 | |||
09ad206cda | |||
3f66398ef8 | |||
fe86666913 | |||
4f1fe47178 | |||
7d40e969e1 | |||
20ffe1944c | |||
f969d4a5ef | |||
d5855ec532 | |||
66208bd3d5 | |||
94b856ef9a | |||
597de2849d | |||
aeb2e15428 | |||
1d77c721d3 | |||
f16bb7cce3 | |||
09170f16a4 | |||
4a6ac1e0e7 | |||
a9ba459550 | |||
8b11b2c4df | |||
d0def39413 | |||
9cd8e5aebf | |||
952cb03b9e | |||
e57e72681f | |||
b45dde0b78 | |||
32074149f7 | |||
246115eb01 | |||
2003844378 | |||
ff5d0b2518 | |||
d1adafec05 | |||
c19f876e94 | |||
a00e61599a | |||
99e1a672ec | |||
b8a355dcdf | |||
7a5413a81c | |||
850e7d4884 | |||
3acece2362 | |||
5213c53f6f | |||
cd9ba8ac03 | |||
8eb63fa063 | |||
5c68bbc7d6 | |||
f23216dc5b | |||
fd9cdf6dec | |||
4a14dc2fd9 | |||
ccecd457df | |||
c8c099f1ea | |||
67a71ea230 | |||
21f8193843 | |||
4919047d31 | |||
6544cb3f1b | |||
4731423b91 | |||
83c3c9e1d5 | |||
ee3ec8e212 | |||
2a16acee6b | |||
785b3eb6e8 | |||
7d8a478e70 | |||
d657446884 | |||
1c4508e77c | |||
1fec04b47e | |||
917acb5656 | |||
0be83c09a0 | |||
535452d154 | |||
70f2736b8e | |||
b27dfe9998 | |||
04cf449e77 | |||
c3fcdccb81 | |||
f94ceb138f | |||
478575c049 | |||
d59dc4532b | |||
f7e0a1aaaa | |||
acbdade5cd | |||
cab71b638f | |||
5a0efd255d | |||
a693f524ca | |||
ccc2af14c1 | |||
ae3adffb7d | |||
0dab6d192b | |||
a4d179af56 | |||
9bb09526fa | |||
fc706437cb | |||
035926c0a6 | |||
bb1b259184 | |||
5f302d7bfc | |||
8fc5c64403 | |||
469f593498 | |||
6b0933adf7 | |||
dfb53ef0a5 | |||
354c11d10e | |||
421b47e050 | |||
907ea331f2 | |||
a8d73a3957 | |||
4cde9784e0 | |||
a690a78cda | |||
38629f51ad | |||
76d4636e61 | |||
964aa839ca | |||
efb9d95523 | |||
1ecf252c38 | |||
33fb4cf0ff | |||
3a043c47a9 | |||
8193b068d4 | |||
37743a913f | |||
5e731a7cfc | |||
954a55b950 | |||
3404625bcc | |||
bf6b83abe0 | |||
a4ffe8aa49 | |||
744729a4f0 | |||
5c406459e8 | |||
0859991c4b | |||
821bcd6456 | |||
087477fd0e | |||
d98471ccb4 | |||
3414561f00 | |||
285111f822 | |||
831bbe8446 | |||
8190078ad5 | |||
dc1b3c162e | |||
aa98eec316 | |||
de9adebb10 | |||
ee09d9c658 | |||
8d226f2dbf | |||
606ca51530 | |||
b6d739d449 | |||
e4fc407e3f | |||
5266fe4d97 | |||
7b2f9f6994 | |||
f3214d0248 | |||
cbda504eec | |||
cfbcba5db8 | |||
ace3525e75 | |||
bea714088b | |||
2ea25552e9 | |||
24e6d0445c | |||
6a70dbc397 | |||
49ee5efea7 | |||
615f69e53d | |||
21ca9beda4 | |||
cd32da425c | |||
164dbd6a5c | |||
c82ab0adf5 | |||
f50603176b | |||
b864de5752 | |||
86091f94b6 | |||
58562405c8 | |||
83e4c5613e | |||
aa1b6b06ef | |||
909c512c88 | |||
75c51d9af1 | |||
e3d2d6fd70 | |||
6f499069e8 | |||
b1535e6528 | |||
deeec18520 | |||
d5842f5b5f | |||
62047d1e4a | |||
b66d6739c8 | |||
cfd7f51568 | |||
5d6f0f97b6 | |||
8475f2d0c5 | |||
f45eb062da | |||
b593366e34 | |||
ed253c8fd8 | |||
fb9e378f2d | |||
079fb3fc29 | |||
b5a20b29b7 | |||
e957832b2a | |||
e6af4be158 | |||
cc5ac17fab | |||
3c4053fa59 | |||
13cd3310a5 | |||
951f2d3ebb | |||
ba69c7799e | |||
e1ecfc93af | |||
8ef9c56602 | |||
1e16142997 | |||
d73745178b | |||
fb69a69fce | |||
cd19f7d867 | |||
94020135c8 | |||
78517f3a45 | |||
26fc544575 | |||
6286e3512a | |||
c48f5ef3cc | |||
551cff08d5 | |||
68c70994e5 | |||
d57fb2d97b | |||
8289319f42 | |||
f06b08a60f | |||
55f3e2fd00 | |||
52262662da | |||
9733e28381 | |||
2a510a7a86 | |||
3660c0fc65 | |||
a2bed346a1 | |||
ee2740b7f6 | |||
c46a39237a | |||
dbeedbef70 | |||
0017b0045d | |||
c824c26232 | |||
8a75d82fa5 | |||
37a5d15da9 | |||
72bb66eb9c | |||
3f4a997529 | |||
47818b4d60 | |||
cc32842194 | |||
3a54318856 | |||
f35f5ff3cd | |||
05d39ffbf4 | |||
282dd95143 | |||
bda38eece8 | |||
b142b84afb | |||
715a18e451 | |||
959478a763 | |||
fb50124d22 | |||
ecf2eb463f | |||
ac1f4b86f4 | |||
8a414a0943 | |||
3c96e808f0 | |||
5a4f289c42 | |||
4d77596918 | |||
d38e3de68c | |||
7ffcc0be63 | |||
04ebf598de | |||
923b4d5c58 | |||
8c3780a142 | |||
f74d77a673 | |||
538c6c9ddf | |||
77051f108a | |||
89f20340d5 | |||
44853371f1 | |||
ca97fa7ac3 | |||
8b29322557 | |||
bd0dab2b26 | |||
16fa8823f8 | |||
3faea59e26 | |||
46731237ce | |||
9595ed4731 | |||
6a4d6825ac | |||
b0c6817dbe | |||
57a31317a2 | |||
588ad7b5db | |||
1d85700503 | |||
b20a600ba7 | |||
dd6fa93ded | |||
1bc6a79874 | |||
115360fdb3 | |||
c947fee479 | |||
387084cfb4 | |||
7dcb545ee2 | |||
321402bfce | |||
46a7c82bcf | |||
bebef2133e | |||
2f953d304e | |||
6dd99fcafe | |||
9cc8e92b6c | |||
c159a0ec4a | |||
bf7b5bc64a | |||
98a4431b99 | |||
4a399c2bae | |||
36ad827b68 | |||
41f0a30ea3 | |||
20373c03a8 | |||
16ea519120 | |||
bf84cf93cc | |||
9dcf457707 | |||
f611fcfaca | |||
34ce438e6f | |||
9796f60c62 | |||
a40032780f | |||
d738b14597 | |||
f47f5fb4f1 | |||
d972f78e75 | |||
f66a026d70 | |||
dc9f5cd546 | |||
4b93a4f47a | |||
b946f12ed0 | |||
59e52b975e | |||
a9992d3da5 | |||
239c74231b | |||
eb33b3f80e | |||
1bb487c474 | |||
d66f1da846 | |||
5c6dc72501 | |||
377d1db57d | |||
81a4c85acf | |||
e73da80d2c | |||
a1c8b34d7b | |||
47a0b8494b | |||
d6a42f9af8 | |||
e09eb68088 | |||
c16b1fd8ac | |||
a5be7fa5c1 | |||
a77d0d6b39 | |||
8007c6b6e8 | |||
87c9f0eaa9 | |||
a881000cd1 | |||
52a92606bb | |||
d2cb11811c | |||
741537e1d9 | |||
b090a268a2 | |||
914a21ed9c | |||
4a69562d01 | |||
0d19805f34 | |||
63ebc80e98 | |||
ae570d5cee | |||
cdeb1c4f61 | |||
08c10a9cbc | |||
a47738d10f | |||
ebf623b53c | |||
6e6d042530 | |||
179623a691 | |||
3fda3c2f8d | |||
9b9d4b3a47 | |||
294ce85424 | |||
4be1674d32 | |||
d7339411a9 | |||
b39a974d75 | |||
051a181f0c | |||
a0e7738463 | |||
053322f891 | |||
098c4a8096 | |||
9763d8e9d1 | |||
762cef9198 | |||
d9653e1328 | |||
59598b2e47 | |||
dc37dab7fd | |||
98e0ac00b9 | |||
113d821696 | |||
71a7ba2e5d | |||
66cc843f3d | |||
94a74998c0 | |||
789f2b6c43 | |||
95ba4c87f5 | |||
b094583c6f | |||
87582d1cf2 | |||
db54a67b76 | |||
5f3ea3b77e | |||
cdcadfef07 | |||
4bf410aa29 | |||
91da91f5d1 | |||
74b964ec4a | |||
963bfa7a0f | |||
88b21f31e6 | |||
1a50d08fc7 | |||
0678bea4b6 | |||
44b01fdcd7 | |||
e067083d08 | |||
241f8fcf1a | |||
7fce30c2a5 | |||
c1bc8171e6 | |||
a887492e1e | |||
a7c609c262 | |||
602a82af7c | |||
135ca51314 | |||
bb313bf221 | |||
5e1fb2d074 | |||
5243b79053 | |||
779caddec3 | |||
ab40b91969 | |||
372b67e22b | |||
3bad4cb086 | |||
f966d3b3ae | |||
83bc0db777 | |||
c9b053d07d | |||
d4dd44cc2b | |||
956c4f2d4c | |||
dde7629e9c | |||
e5bad5cd3d | |||
14714e1303 | |||
b2a62622ba | |||
cce557b793 | |||
4de29d48ed | |||
4b34909d09 | |||
cd96c5cf95 | |||
6aa8c5bc58 | |||
0f045a69b8 | |||
d2cd7f6c6a | |||
e581b067ca | |||
85982cd4a2 | |||
3953e3947d | |||
6c950da54c | |||
ccda446e52 | |||
abe03d25e2 | |||
4bd65e1c0c | |||
68957b33ed | |||
a5d98889bd | |||
17ba9445e5 | |||
dd07ef2acd | |||
736a4a2a17 | |||
9ae6cd4280 | |||
0c66e866c9 | |||
1c2de9fc3d | |||
d96f830786 | |||
e031ec3ca3 | |||
cae067f136 | |||
0d65df93f0 | |||
2b9595a872 | |||
5c44d2e23e | |||
3745c65c83 | |||
15c220dc39 | |||
11f356c390 | |||
ce03aaf08c | |||
394d6993b9 | |||
bdc1c87899 | |||
c97106fd48 | |||
e32da955b3 | |||
bf31983836 | |||
86f23acee5 | |||
9171f1ab8d | |||
fbd5367b1c | |||
fe85ae3f41 | |||
bf9df75eac | |||
86d937fb46 | |||
0811230306 | |||
1bfbe7e72a | |||
5c261229ae | |||
f55e6680b9 | |||
9647094672 | |||
8ac492999a | |||
2e4f83b164 | |||
c241855240 | |||
2c482a969a | |||
4460703f59 | |||
38bc916def | |||
3ed0d85d52 | |||
0bc3e325c9 | |||
037581542b | |||
541b567167 | |||
649901e8e8 | |||
4d3de7e328 | |||
c6a177d500 | |||
439356fabc | |||
bc98cc66b2 | |||
5fc6f90ef7 | |||
69ddcf1b6e | |||
beb31d0cdc | |||
7bf47eecd6 | |||
ef549a04c5 | |||
ab5754da66 | |||
57c67e5aa5 | |||
23aeaff41b | |||
61c822900e | |||
a71c83fa5c | |||
c82725c5b9 | |||
8984a637c1 | |||
2c61506630 | |||
4a666423c6 | |||
3f2a945fb8 | |||
27fea06754 | |||
fbff301f78 | |||
c49014e750 | |||
60391b65fd | |||
107d1fb137 | |||
4a2fc3e6f0 | |||
d5b778d269 | |||
418026f63f | |||
d22b9ea1cb | |||
ff3f15cd4d | |||
1cb1c924c5 | |||
681012ab3d | |||
9c98664480 | |||
fdbc1af5e2 | |||
4093148b26 | |||
cf1c94d1bf | |||
fada85e655 | |||
302aeb7a4e | |||
c8dd59df91 | |||
dfdd33eb53 | |||
3b169252ea | |||
1105fad6ea | |||
a0f515354b | |||
91a192f6d0 | |||
17d2fb8dc1 | |||
bcd99301b8 | |||
ad3127f344 | |||
c9d9729f5c | |||
1f79be1f52 | |||
7a2defb2dd | |||
d92f6127e1 | |||
6cba16f6ef | |||
a3fa98a5d7 | |||
31718c039f | |||
a58cf01a1f | |||
08a6fd309f | |||
162aee9a5d | |||
d2d4b5a4ab | |||
c07cdfee08 | |||
9dcd4f059b | |||
fd016a44bb | |||
4aab85be3f | |||
1244c2c961 | |||
5c9a71e9d5 | |||
1dbbe828d4 | |||
41c003ca6d | |||
80f5d5b3e4 | |||
bc140cf111 | |||
3cd280589c | |||
bf8589e957 | |||
5c25d0e8cc | |||
e8a8a00342 | |||
4bfa29e947 | |||
3d092303e3 | |||
3ad69e8d4c | |||
3746465f4a | |||
cbd7de72a4 | |||
affb88b271 | |||
bedbdc4566 | |||
274cde56cd | |||
46502c9e37 | |||
4cd0d2f569 | |||
8c3ab6a5f1 | |||
9a640597e6 | |||
04002a94f9 | |||
e205410728 | |||
40e89b4e5a | |||
7dbf9c6747 | |||
a3b898aaf0 | |||
ffe63e2796 | |||
bf62b8cc8b | |||
50967870a9 | |||
8b3851969d | |||
f8142155f9 | |||
0bdb88b106 | |||
84fb0bfdbb | |||
8d0ab89e5d | |||
d18065b59c | |||
011b0b3af8 | |||
83c2d12a3d | |||
f5252f378b | |||
d5a4afa63d | |||
a60e7b6da5 | |||
dc9dbc0059 | |||
e590358064 | |||
422c636683 | |||
5a96b3743e | |||
415022a86c | |||
028bcaae32 | |||
56260850e8 | |||
c328191728 | |||
699c788837 | |||
7f3f285bf1 | |||
a40b7f3e1d | |||
35a32064f1 | |||
5eed3a5518 | |||
3657eef829 | |||
133dcd386f | |||
31f0521a99 | |||
5cd34e2f15 | |||
e2473c5950 | |||
8c12d6e823 | |||
870d3de270 | |||
c0c115b657 | |||
3ba501b86d | |||
056f6a1f80 | |||
19c80b2391 | |||
ae7efb9257 | |||
7a33b53dc0 | |||
bc39690900 | |||
62c014bcf3 | |||
4eb8abeb85 | |||
64fc433a56 | |||
06e85acb40 | |||
df205067c9 | |||
1fff0d26f8 | |||
56354d503d | |||
dbb50c48f9 | |||
410f9ad1a3 | |||
bea61efdef | |||
967cd9a027 | |||
0974dbe89a | |||
505e609452 | |||
43213be116 | |||
af473ede1f | |||
f58746bd33 | |||
7b928cd0c3 | |||
188e37072f | |||
5c1c3d69dd | |||
f1acb9b69d | |||
4938426783 | |||
416bf45480 | |||
a537f9a2ec | |||
d3a36b8a46 | |||
e56d734816 | |||
8e15bbc665 | |||
fac5eb0c93 | |||
0a31e5975e | |||
1f7fd720c8 | |||
e0334e8296 | |||
5cac25e6b2 | |||
b95fc308af | |||
1afcb23cd7 | |||
c08acf7f70 | |||
41fceafb09 | |||
71a301811f | |||
aa95f629db | |||
3d7020e0c4 | |||
50ed38feba | |||
af030503e8 | |||
13e2ed3f0c | |||
ced995a89f | |||
71e0ac858e | |||
f50b25d7e2 | |||
9a8dc37cdd | |||
799bf781fd | |||
079df39285 | |||
21df8d950b | |||
ccb01f7245 | |||
c43d417039 | |||
d452b6edd6 | |||
abf87a25f2 | |||
a0429b6f3c | |||
6f4c7a6fde | |||
22ea007891 | |||
54546c97c7 | |||
ee9662824d | |||
39bdb0bbcf | |||
75daee5ee9 | |||
57ddd9abc7 | |||
8b4988933c | |||
6fd5bd20d3 | |||
04a066661d | |||
3b6c398bf4 | |||
85654a6650 | |||
c5b91d6800 | |||
43b1066c0d | |||
a7a57701d6 | |||
b4a24995c9 | |||
5f9a3f7fae | |||
03e8188a3f | |||
ab16b33664 | |||
9506aea351 | |||
ffdf901c76 | |||
27baa32fbe | |||
e3260ec29a | |||
e33a1724b3 | |||
14bb36c5ca | |||
edf1cb78e2 | |||
4f7cf3a446 | |||
2ca1274071 | |||
25477e03a1 | |||
ab454c6b71 | |||
dd2d3f933a | |||
3432e556f5 | |||
aa44dbd364 | |||
0dc7354760 | |||
db01ddfd49 | |||
57edf16be5 | |||
edf25d9076 | |||
7fd14184fb | |||
f820497938 | |||
4110abca72 | |||
11ee08f1f1 | |||
e60b55a570 | |||
4e54bf9334 | |||
c6a8da7f93 | |||
433fa5735c | |||
aa7dcef494 | |||
608f9b5b16 | |||
33cfe9b0f8 | |||
21a78a88c6 | |||
82fe90829b | |||
c7ae731430 | |||
1cbef1ce4e | |||
1c487048a7 | |||
f1b7afb4a4 | |||
15dd6c2fa3 | |||
6a106943d0 | |||
d09b32b668 | |||
7605a5ac57 | |||
c07b783716 | |||
f260f51834 | |||
c983671f3d | |||
7db6cef7fd | |||
1517e7029f | |||
54e227efdf | |||
3254ed8607 | |||
701f67d202 | |||
368488ae29 | |||
e10c82a23a | |||
496cdc3626 | |||
c5a6846221 | |||
61234909f8 | |||
6f0e8bdc16 | |||
0dee57837b | |||
1fa5274071 | |||
d146ac6a33 | |||
d0d487aaf4 | |||
2c6fe441a7 | |||
501005f126 | |||
7580b1aca4 | |||
8fad21db54 | |||
d7eb0cbf9a | |||
7572e66bc7 | |||
f534203f06 | |||
eb5f45ac62 | |||
03597d0f01 | |||
9dd8f88841 | |||
133108af25 | |||
6de27da32e | |||
4d7cf0bb47 | |||
0c02eefe2b | |||
1d915cae2b | |||
58474df42a | |||
f43b06d0ee | |||
86980bb46a | |||
8a83b8bb6f | |||
567a68e948 | |||
0b11bd0d02 | |||
9b9400dc90 | |||
916e408526 | |||
e07e0441c2 | |||
11f1d31d78 | |||
e05c1eac44 | |||
74234ebd7b | |||
fb82ebe906 | |||
5d5fcdd82b | |||
8d829bf2cd | |||
db0c0c4a60 | |||
c6a4aae8a3 | |||
e1514070c9 | |||
b551d8b0c3 | |||
1db856d08a | |||
9c1b33e74b | |||
d6cc617e17 | |||
df3b8e66b3 | |||
3e3f4008f8 | |||
12bce3ff93 | |||
221761e0be | |||
6bd016cae8 | |||
c7667f09ad | |||
3f95f1d621 | |||
a7ff453090 | |||
30b755be2b | |||
c33958310e | |||
8d8799a33a | |||
b759ede579 | |||
7f78849fc7 | |||
8dfa660a68 | |||
4f5efb6c21 | |||
ed575681d1 | |||
dec2751847 | |||
dd7e59892d | |||
d4c9346c3f | |||
3bc4373797 | |||
5468e94df1 | |||
153ae105e5 | |||
556538af85 | |||
c3f72751f8 | |||
5e0a2e2d33 | |||
7a625da84f | |||
bf0902eb83 | |||
b10f42bb0a | |||
ef0158ec90 | |||
d8d686663c | |||
31be8e403f | |||
efa615734e | |||
1051bb4042 | |||
05389de33b | |||
5bd030d37a | |||
775f833c55 | |||
65459b3cc8 | |||
acba73aefc | |||
ff40196c6c | |||
c2eae1a4f9 | |||
a501a8f27f | |||
21ee13c3ca | |||
cbaf92782e | |||
8868172b8c | |||
58ae417e23 | |||
8228621955 | |||
46a2c77aaf | |||
0be6d93959 | |||
caa5149b1e | |||
97892bd557 | |||
1383920fef | |||
e95b7d80a2 | |||
0a754021cf | |||
5d8ef4c661 | |||
df5446196c | |||
3332f33009 | |||
d4c700806c | |||
1b0ab81303 | |||
e324cc91e0 | |||
0620b1e8a3 | |||
5da95dc4c2 | |||
67b9430b36 | |||
29e6548ac2 | |||
f226a4d41d | |||
d9c7a7b4da | |||
2b7693d63a | |||
bf697566da | |||
7fea2707ef | |||
87d492fbce | |||
b61ed3550b | |||
f4e9eb9aba | |||
76d16715ec | |||
d68c35dab4 | |||
26dd3582c8 | |||
b993d2f147 | |||
e94c40b254 | |||
a3d36bd969 | |||
d66bc210ae | |||
f82758a876 | |||
75154b801f | |||
baf4e3e92d | |||
46ca690ec0 | |||
a73408d608 | |||
406313d46d | |||
43bf00e594 | |||
1b9635de66 | |||
5c56ce13f4 | |||
bbbfbf2e0f | |||
367ddc91ff | |||
9b71b0e000 | |||
27d153cabc | |||
f077de66ff | |||
02b3243dd3 | |||
356cabbe35 | |||
0893e29755 | |||
477d3284f7 | |||
f92a189151 | |||
98d62f2027 | |||
406effd590 | |||
4d1c5aa9f7 | |||
0d618afc84 | |||
0d869ede7f | |||
752fba7846 | |||
e44a4e8787 | |||
4cfec533f7 | |||
2062473492 | |||
ef21e77bbc | |||
6af48bb7f4 | |||
1332bb8a84 | |||
1f02763050 | |||
89b5fbd534 | |||
c42104189b | |||
01464a69b8 | |||
5cb9ddad3e | |||
b18f522bce | |||
98fc2e9be1 | |||
9346d504ca | |||
ebd3da7dba | |||
ae3d71a4d1 | |||
7acf2465fb | |||
ee59f30958 | |||
5e03cd59a8 | |||
727ba2dadf | |||
4c8494cc12 | |||
cf6cca6cec | |||
37daf353ba | |||
7731cddaa2 | |||
fe48f0941e | |||
e431ab9c84 | |||
0aa1d50be7 | |||
5668e262ff | |||
f61c9e9a59 | |||
5bb90e6999 | |||
ec42486055 | |||
6533671ce0 | |||
158dd5527c | |||
c569b8bfdc | |||
5dc01ac506 | |||
1d14b3e926 | |||
b000513741 | |||
741a0dd89c | |||
fe234c4d2a | |||
e731f721be | |||
2272b80a1d | |||
4d3e4c421e | |||
45acb34ffc | |||
ff9afb3d8e | |||
2a983bd50d | |||
31540fb785 | |||
f61b35d5b0 | |||
fb5d5b16ee | |||
3ac3c4ebac | |||
b0630bfcbe | |||
89f73dccdb | |||
1daee069cd | |||
977587abf8 | |||
995269062e | |||
ad0dda767b | |||
ec505ad21c | |||
fb4233bb22 | |||
d00f180812 | |||
3162a1db7a | |||
b2ba3957e5 | |||
d5e6618a4f |
26
.checkpatch.conf
Normal file
26
.checkpatch.conf
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Not Linux, so don't expect a Linux tree.
|
||||||
|
--no-tree
|
||||||
|
|
||||||
|
# Ignore aspects we don't follow here.
|
||||||
|
--ignore C99_COMMENTS
|
||||||
|
--ignore GLOBAL_INITIALISERS
|
||||||
|
--ignore INITIALISED_STATIC
|
||||||
|
--ignore LINE_SPACING
|
||||||
|
--ignore NEW_TYPEDEFS
|
||||||
|
--ignore PREFER_ALIGNED
|
||||||
|
--ignore PREFER_PACKED
|
||||||
|
--ignore PREFER_PRINTF
|
||||||
|
--ignore SPLIT_STRING
|
||||||
|
--ignore BLOCK_COMMENT_STYLE
|
||||||
|
--ignore AVOID_EXTERNS
|
||||||
|
--ignore VOLATILE
|
||||||
|
--ignore CONFIG_DESCRIPTION
|
||||||
|
|
||||||
|
# FILE_PATH_CHANGES seems to not be working correctly. It will
|
||||||
|
# choke on added / deleted files even if the MAINTAINERS file
|
||||||
|
# is touched.
|
||||||
|
--ignore FILE_PATH_CHANGES
|
||||||
|
|
||||||
|
# This one has a linux path hard coded, so it would choke on
|
||||||
|
# some commits unnecessarily.
|
||||||
|
--ignore EXECUTE_PERMISSIONS
|
6
.clang-format
Normal file
6
.clang-format
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
BasedOnStyle: LLVM
|
||||||
|
IndentWidth: 8
|
||||||
|
UseTab: Always
|
||||||
|
BreakBeforeBraces: Linux
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
IndentCaseLabels: false
|
40
.gitignore
vendored
40
.gitignore
vendored
@ -1,24 +1,38 @@
|
|||||||
|
payloads/libpayload/install/
|
||||||
|
payloads/nvramcui/build
|
||||||
|
payloads/nvramcui/libpayload
|
||||||
|
junit.xml
|
||||||
|
abuild*.xml
|
||||||
.config
|
.config
|
||||||
.config.old
|
.config.old
|
||||||
|
defconfig
|
||||||
.coreboot-version
|
.coreboot-version
|
||||||
.xcompile
|
.xcompile
|
||||||
.ccwrap
|
.ccwrap
|
||||||
build/
|
build/
|
||||||
coreboot-builds/
|
coreboot-builds/
|
||||||
|
payloads/coreinfo/lpbuild/
|
||||||
|
payloads/coreinfo/lp.config*
|
||||||
|
payloads/external/depthcharge/depthcharge/
|
||||||
payloads/external/FILO/filo/
|
payloads/external/FILO/filo/
|
||||||
payloads/external/GRUB2/grub2/
|
payloads/external/GRUB2/grub2/
|
||||||
payloads/external/SeaBIOS/seabios/
|
payloads/external/SeaBIOS/seabios/
|
||||||
|
payloads/external/U-Boot/u-boot/
|
||||||
|
payloads/external/Memtest86Plus/memtest86plus/
|
||||||
|
payloads/external/iPXE/ipxe/
|
||||||
util/crossgcc/acpica-unix-*/
|
util/crossgcc/acpica-unix-*/
|
||||||
util/crossgcc/binutils-*/
|
util/crossgcc/binutils-*/
|
||||||
util/crossgcc/build-*binutils/
|
util/crossgcc/build-*BINUTILS/
|
||||||
util/crossgcc/build-*expat/
|
util/crossgcc/build-*EXPAT/
|
||||||
util/crossgcc/build-*gcc/
|
util/crossgcc/build-*GCC/
|
||||||
util/crossgcc/build-*gdb/
|
util/crossgcc/build-*GDB/
|
||||||
util/crossgcc/build-*gmp/
|
util/crossgcc/build-*GMP/
|
||||||
util/crossgcc/build-*libelf/
|
util/crossgcc/build-*LIBELF/
|
||||||
util/crossgcc/build-*mpc/
|
util/crossgcc/build-*MPC/
|
||||||
util/crossgcc/build-*mpfr/
|
util/crossgcc/build-*MPFR/
|
||||||
util/crossgcc/build-*python/
|
util/crossgcc/build-*PYTHON/
|
||||||
|
util/crossgcc/build-*LVM/
|
||||||
|
util/crossgcc/build-*IASL/
|
||||||
util/crossgcc/expat-*/
|
util/crossgcc/expat-*/
|
||||||
util/crossgcc/gcc-*/
|
util/crossgcc/gcc-*/
|
||||||
util/crossgcc/gdb-*/
|
util/crossgcc/gdb-*/
|
||||||
@ -28,6 +42,7 @@ util/crossgcc/mingwrt-*/
|
|||||||
util/crossgcc/mpc-*/
|
util/crossgcc/mpc-*/
|
||||||
util/crossgcc/mpfr-*/
|
util/crossgcc/mpfr-*/
|
||||||
util/crossgcc/Python-*/
|
util/crossgcc/Python-*/
|
||||||
|
util/crossgcc/*.src/
|
||||||
util/crossgcc/tarballs/
|
util/crossgcc/tarballs/
|
||||||
util/crossgcc/w32api-*/
|
util/crossgcc/w32api-*/
|
||||||
util/crossgcc/xgcc/
|
util/crossgcc/xgcc/
|
||||||
@ -41,6 +56,7 @@ site-local
|
|||||||
*.elf
|
*.elf
|
||||||
*.o
|
*.o
|
||||||
*.out
|
*.out
|
||||||
|
*.pyc
|
||||||
*.swp
|
*.swp
|
||||||
|
|
||||||
# Development friendly files
|
# Development friendly files
|
||||||
@ -61,6 +77,7 @@ tarballs/
|
|||||||
|
|
||||||
util/*/.dependencies
|
util/*/.dependencies
|
||||||
util/*/.test
|
util/*/.test
|
||||||
|
util/amdfwtool/amdfwtool
|
||||||
util/board_status/board-status
|
util/board_status/board-status
|
||||||
util/cbfstool/cbfstool
|
util/cbfstool/cbfstool
|
||||||
util/cbfstool/fmaptool
|
util/cbfstool/fmaptool
|
||||||
@ -75,6 +92,7 @@ util/ifdtool/ifdtool
|
|||||||
util/ifdfake/ifdfake
|
util/ifdfake/ifdfake
|
||||||
util/inteltool/.dependencies
|
util/inteltool/.dependencies
|
||||||
util/inteltool/inteltool
|
util/inteltool/inteltool
|
||||||
|
util/intelvbttool/intelvbttool
|
||||||
util/k8resdump/k8resdump
|
util/k8resdump/k8resdump
|
||||||
util/lbtdump/lbtdump
|
util/lbtdump/lbtdump
|
||||||
util/mptable/mptable
|
util/mptable/mptable
|
||||||
@ -84,9 +102,7 @@ util/msrtool/msrtool
|
|||||||
util/nvramtool/.dependencies
|
util/nvramtool/.dependencies
|
||||||
util/nvramtool/nvramtool
|
util/nvramtool/nvramtool
|
||||||
util/optionlist/Options.wiki
|
util/optionlist/Options.wiki
|
||||||
util/romcc/romcc
|
util/romcc/build
|
||||||
util/romcc/tests/fail_test*.S
|
|
||||||
util/romcc/tests/*.S-O2-mmmx
|
|
||||||
util/runfw/googlesnow
|
util/runfw/googlesnow
|
||||||
util/superiotool/superiotool
|
util/superiotool/superiotool
|
||||||
util/vgabios/testbios
|
util/vgabios/testbios
|
||||||
|
5
.gitmodules
vendored
5
.gitmodules
vendored
@ -1,4 +1,4 @@
|
|||||||
[submodule "3rdparty"]
|
[submodule "3rdparty/blobs"]
|
||||||
path = 3rdparty/blobs
|
path = 3rdparty/blobs
|
||||||
url = ../blobs.git
|
url = ../blobs.git
|
||||||
update = none
|
update = none
|
||||||
@ -12,3 +12,6 @@
|
|||||||
[submodule "arm-trusted-firmware"]
|
[submodule "arm-trusted-firmware"]
|
||||||
path = 3rdparty/arm-trusted-firmware
|
path = 3rdparty/arm-trusted-firmware
|
||||||
url = ../arm-trusted-firmware.git
|
url = ../arm-trusted-firmware.git
|
||||||
|
[submodule "3rdparty/chromeec"]
|
||||||
|
path = 3rdparty/chromeec
|
||||||
|
url = ../chrome-ec.git
|
||||||
|
2
3rdparty/arm-trusted-firmware
vendored
2
3rdparty/arm-trusted-firmware
vendored
Submodule 3rdparty/arm-trusted-firmware updated: 649591bbab...bfd925139f
2
3rdparty/blobs
vendored
2
3rdparty/blobs
vendored
Submodule 3rdparty/blobs updated: 61d663e39b...8ad2d63856
1
3rdparty/chromeec
vendored
Submodule
1
3rdparty/chromeec
vendored
Submodule
Submodule 3rdparty/chromeec added at 83b6d69732
2
3rdparty/vboot
vendored
2
3rdparty/vboot
vendored
Submodule 3rdparty/vboot updated: fbf631c845...46b77fb2f0
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||||||
PROJECT_NAME = coreboot
|
PROJECT_NAME = coreboot
|
||||||
PROJECT_NUMBER =
|
PROJECT_NUMBER =
|
||||||
PROJECT_BRIEF = "coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers."
|
PROJECT_BRIEF = "coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers."
|
||||||
PROJECT_LOGO = documentation/coreboot_logo.png
|
PROJECT_LOGO = Documentation/coreboot_logo.png
|
||||||
OUTPUT_DIRECTORY = doxygen
|
OUTPUT_DIRECTORY = doxygen
|
||||||
CREATE_SUBDIRS = YES
|
CREATE_SUBDIRS = YES
|
||||||
ALLOW_UNICODE_NAMES = NO
|
ALLOW_UNICODE_NAMES = NO
|
||||||
@ -85,8 +85,7 @@ WARN_IF_DOC_ERROR = YES
|
|||||||
WARN_NO_PARAMDOC = YES
|
WARN_NO_PARAMDOC = YES
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
WARN_LOGFILE =
|
WARN_LOGFILE =
|
||||||
INPUT = src \
|
INPUT = src
|
||||||
documentation
|
|
||||||
INPUT_ENCODING = UTF-8
|
INPUT_ENCODING = UTF-8
|
||||||
FILE_PATTERNS =
|
FILE_PATTERNS =
|
||||||
RECURSIVE = YES
|
RECURSIVE = YES
|
||||||
|
162
Documentation/Intel/Board/Galileo_checklist.html
Normal file
162
Documentation/Intel/Board/Galileo_checklist.html
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Galileo Implementation Status</title>
|
||||||
|
</title>
|
||||||
|
<body>
|
||||||
|
<h1>Galileo Implementation Status<br>2016/07/08 06:51:34 PDT</h1>
|
||||||
|
<table>
|
||||||
|
<tr><td colspan=2><b>Legend</b></td></tr>
|
||||||
|
<tr><td bgcolor="#ffc0c0">Red</td><td>Required - To-be-implemented</td></tr>
|
||||||
|
<tr><td bgcolor="#ffffc0">Yellow</td><td>Optional</td></tr>
|
||||||
|
<tr><td bgcolor="#c0ffc0">Green</td><td>Implemented</td></tr>
|
||||||
|
</table>
|
||||||
|
<table>
|
||||||
|
<tr valign="top">
|
||||||
|
<td>
|
||||||
|
<table border=1>
|
||||||
|
<tr><th colspan=2>bootblock: 100% Done</th></tr>
|
||||||
|
<tr><th>Type</th><th>Routine</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>bootblock_c_entry</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>bootblock_main_with_timestamp</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>bootblock_mainboard_early_init</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>bootblock_mainboard_init</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>bootblock_pre_c_entry</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>bootblock_protected_mode_entry</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>bootblock_soc_early_init</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>bootblock_soc_init</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>tsc_freq_mhz</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>uart_init</td></tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width=5> </td>
|
||||||
|
<td>
|
||||||
|
<table border=1>
|
||||||
|
<tr><th colspan=2>romstage: 67% Done</th></tr>
|
||||||
|
<tr><th>Type</th><th>Routine</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>arch_segment_loaded</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>backup_top_of_ram</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>boot_device_init</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>car_mainboard_post_console_init</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>car_mainboard_pre_console_init</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>car_soc_post_console_init</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>car_soc_pre_console_init</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>car_stage_entry</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>cbfs_master_header_locator</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>cbmem_fail_resume</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>clear_recovery_mode_switch</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>cpu_smi_handler</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>fill_power_state</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>get_sw_write_protect_state</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>get_top_of_ram</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>gpio_acpi_path</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>init_timer</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_add_dimm_info</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_check_ec_image</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>mainboard_fill_spd_data</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_io_trap_handler</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>mainboard_memory_init_params</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_post</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>mainboard_romstage_entry</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_save_dimm_info</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_smi_apmc</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_smi_gpi</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_smi_sleep</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>map_oprom_vendev</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>migrate_power_state</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>mrc_cache_get_current_with_version</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>mrc_cache_stash_data_with_version</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>platform_prog_run</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>platform_segment_loaded</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>print_fsp_info</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>raminit</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>ramstage_cache_invalid</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>report_memory_config</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>romstage_common</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>save_chromeos_gpios</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>set_max_freq</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>setup_stack_and_mtrrs</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>smm_region</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>smm_region_size</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>soc_after_ram_init</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>soc_display_memory_init_params</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>soc_display_mtrrs</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>soc_get_variable_mtrr_count</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>soc_memory_init_params</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>soc_pre_ram_init</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>southbridge_smi_handler</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>stage_cache_add</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>stage_cache_load_stage</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>timestamp_get</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>tsc_freq_mhz</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>vb2ex_hwcrypto_digest_extend</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>vb2ex_hwcrypto_digest_finalize</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>vb2ex_hwcrypto_digest_init</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>vboot_platform_prepare_reboot</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>verstage_mainboard_init</td></tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width=5> </td>
|
||||||
|
<td>
|
||||||
|
<table border=1>
|
||||||
|
<tr><th colspan=2>ramstage: 60% Done</th></tr>
|
||||||
|
<tr><th>Type</th><th>Routine</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>acpi_create_serialio_ssdt</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>arch_segment_loaded</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>backup_top_of_ram</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>boot_device_init</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>cbfs_master_header_locator</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>cbmem_fail_resume</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>clear_recovery_mode_switch</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>cpu_smi_handler</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>fw_cfg_acpi_tables</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>get_sw_write_protect_state</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>get_top_of_ram</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>gpio_acpi_path</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>init_timer</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>lb_board</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>lb_framebuffer</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_add_dimm_info</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_io_trap_handler</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_post</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_silicon_init_params</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_smi_apmc</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_smi_gpi</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_smi_sleep</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mainboard_suspend_resume</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>map_oprom_vendev</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>mirror_payload</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>northbridge_smi_handler</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>nvm_mmio_to_flash_offset</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>platform_prog_run</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>platform_segment_loaded</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>save_chromeos_gpios</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>smbios_mainboard_bios_version</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>smbios_mainboard_manufacturer</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>smbios_mainboard_product_name</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>smbios_mainboard_serial_number</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>smbios_mainboard_set_uuid</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>smbios_mainboard_version</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>smm_disable_busmaster</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>soc_after_silicon_init</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>soc_display_silicon_init_params</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>soc_fill_acpi_wake</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>soc_silicon_init_params</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>soc_skip_ucode_update</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>southbridge_smi_handler</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>stage_cache_add</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>stage_cache_load_stage</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>timestamp_get</td></tr>
|
||||||
|
<tr bgcolor=#ffc0c0><td>Required</td><td>timestamp_tick_freq_mhz</td></tr>
|
||||||
|
<tr bgcolor=#c0ffc0><td>Required</td><td>tsc_freq_mhz</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>vb2ex_hwcrypto_digest_extend</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>vb2ex_hwcrypto_digest_finalize</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>vb2ex_hwcrypto_digest_init</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>wifi_regulatory_domain</td></tr>
|
||||||
|
<tr bgcolor=#ffffc0><td>Optional</td><td>write_smp_table</td></tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width=5> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
240
Documentation/Intel/Board/board.html
Normal file
240
Documentation/Intel/Board/board.html
Normal file
@ -0,0 +1,240 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Board</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>x86 Board Development</h1>
|
||||||
|
<p>
|
||||||
|
Board development requires System-on-a-Chip (SoC) support.
|
||||||
|
The combined steps are listed
|
||||||
|
<a target="_blank" href="../development.html">here</a>.
|
||||||
|
The development steps for the board are listed below:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li><a href="#RequiredFiles">Required Files</a></li>
|
||||||
|
<li>Enable <a href="#SerialOutput">Serial Output</a></li>
|
||||||
|
<li>Load the <a href="#SpdData">Memory Timing Data</a></li>
|
||||||
|
<li><a href="#DisablePciDevices">Disable</a> the PCI devices</li>
|
||||||
|
<li><a href="#AcpiTables">ACPI Tables</a></li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="RequiredFiles">Required Files</a></h1>
|
||||||
|
<p>
|
||||||
|
Create the board directory as src/mainboard/<Vendor>/<Board>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The following files are required to build a new board:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Kconfig.name - Defines the Kconfig value for the board</li>
|
||||||
|
<li>Kconfig
|
||||||
|
<ol type="A">
|
||||||
|
<li>Selects the SoC for the board and specifies the SPI flash size
|
||||||
|
<ol type="I">
|
||||||
|
<li>BOARD_ROMSIZE_KB_<Size></li>
|
||||||
|
<li>SOC_<Vendor>_<Chip Family></li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Declare the Kconfig values for:
|
||||||
|
<ol type="I">
|
||||||
|
<li>MAINBOARD_DIR</li>
|
||||||
|
<li>MAINBOARD_PART_NUMBER</li>
|
||||||
|
<li>MAINBOARD_VENDOR</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>devicetree.cb - Enable root bridge and serial port
|
||||||
|
<ol type="A">
|
||||||
|
<li>The first line must be "chip soc/Intel/<soc family>";
|
||||||
|
this path is used by the generated static.c to include the chip.h
|
||||||
|
header file
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>romstage.c
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add routine mainboard_romstage_entry which calls romstage_common</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Configure coreboot build:
|
||||||
|
<ol type="A">
|
||||||
|
<li>Set LOCALVERSION</li>
|
||||||
|
<li>Select vendor for the board</li>
|
||||||
|
<li>Select the board</li>
|
||||||
|
<li>CBFS_SIZE = 0x00100000</li>
|
||||||
|
<li>Set the CPU_MICROCODE_CBFS_LEN</li>
|
||||||
|
<li>Set the CPU_MICROCODE_CBFS_LOC</li>
|
||||||
|
<li>Set the FSP_IMAGE_ID_STRING</li>
|
||||||
|
<li>Set the FSP_LOC</li>
|
||||||
|
<li>Disable GOP_SUPPORT</li>
|
||||||
|
<li>No payload</li>
|
||||||
|
<li>Choose the default value for all other options</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="SerialOutput">Enable Serial Output</a></h1>
|
||||||
|
<p>
|
||||||
|
Use the following steps to enable serial output:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Implement the car_mainboard_pre_console_init routine in the com_init.c
|
||||||
|
file:
|
||||||
|
<ol type="A">
|
||||||
|
<li>Power on and enable the UART controller</li>
|
||||||
|
<li>Connect the UART receive and transmit data lines to the
|
||||||
|
appropriate SoC pins
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Add Makefile.inc
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add com_init.c to romstage</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="SpdData">Memory Timing Data</a></h1>
|
||||||
|
<p>
|
||||||
|
Memory timing data is located in the flash. This data is in the format of
|
||||||
|
<a target="_blank" href="https://en.wikipedia.org/wiki/Serial_presence_detect">serial presence detect</a>
|
||||||
|
(SPD) data.
|
||||||
|
Use the following steps to load the SPD data:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Edit Kconfig to add the DISPLAY_SPD_DATA" value which enables the
|
||||||
|
display of the SPD data being passed to MemoryInit
|
||||||
|
</li>
|
||||||
|
<li>Create an "spd" subdirectory</li>
|
||||||
|
<li>Create an spd/spd.c file for the SPD implementation
|
||||||
|
<ol type="A">
|
||||||
|
<li>Implement the mainboard_fill_spd_data routine
|
||||||
|
<ol type="i">
|
||||||
|
<li>Read the SPD data either from the spd.bin file or using I2C or SMBUS</li>
|
||||||
|
<li>Fill in the pei_data structure with SPD data for each of the DIMMs</li>
|
||||||
|
<li>Set the DIMM channel configuration</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Add an .spd.hex file containing the memory timing data to the spd subdirectory</li>
|
||||||
|
<li>Create spd/Makefile.inc
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add spd.c to romstage</li>
|
||||||
|
<li>Add the .spd.hex file to SPD_SOURCES</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Edit Makefile.inc to add the spd subdirectory</li>
|
||||||
|
<li>Edit romstage.c
|
||||||
|
<ol type="A">
|
||||||
|
<li>Call mainboard_fill_spd_data</li>
|
||||||
|
<li>Add mainboard_memory_init_params to copy the SPD and DRAM
|
||||||
|
configuration data from the pei_data structure into the UPDs
|
||||||
|
for MemoryInit
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Edit devicetree.cb
|
||||||
|
<ol type="A">
|
||||||
|
<li>Include the UPD parameters for MemoryInit except for:
|
||||||
|
<ul>
|
||||||
|
<li>Address of SPD data</li>
|
||||||
|
<li>DRAM configuration set above</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>A working FSP
|
||||||
|
<a target="_blank" href="../fsp1_1.html#MemoryInit">MemoryInit</a>
|
||||||
|
routine is required to complete debugging</li>
|
||||||
|
<li>Debug the result until port 0x80 outputs
|
||||||
|
<ol type="A">
|
||||||
|
<li>0x34:
|
||||||
|
- Just after entering
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/raminit.c;hb=HEAD#l67">raminit</a>
|
||||||
|
</li>
|
||||||
|
<li>0x36:
|
||||||
|
- Just before displaying the
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/raminit.c;hb=HEAD#l106">UPD parameters</a>
|
||||||
|
for FSP MemoryInit
|
||||||
|
</li>
|
||||||
|
<li>0x92: <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l219">POST_FSP_MEMORY_INIT</a>
|
||||||
|
- Just before calling FSP
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/raminit.c;hb=HEAD#l125">MemoryInit</a>
|
||||||
|
</li>
|
||||||
|
<li>0x37:
|
||||||
|
- Just after returning from FSP
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/raminit.c;hb=HEAD#l127">MemoryInit</a>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Continue debugging with CONFIG_DISPLAY_HOBS enabled until TempRamExit is called</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="DisablePciDevices">Disable PCI Devices</a></h1>
|
||||||
|
<p>
|
||||||
|
Ramstage's BS_DEV_ENUMERATE state displays the PCI vendor and device IDs for all
|
||||||
|
of the devices in the system. Edit the devicetree.cb file:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Edit the devicetree.cb file:
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add an entry for a PCI device.function and turn it off. The entry
|
||||||
|
should look similar to:
|
||||||
|
<pre><code>device pci 14.0 off end</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>Turn on the devices for:
|
||||||
|
<ul>
|
||||||
|
<li>Memory Controller</li>
|
||||||
|
<li>Debug serial device</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Debug until the BS_DEV_ENUMERATE state shows the proper state for all of the devices</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="AcpiTables">ACPI Tables</a></h1>
|
||||||
|
<ol>
|
||||||
|
<li>Edit Kconfig
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add "select HAVE_ACPI_TABLES"</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Add the acpi_tables.c module:
|
||||||
|
<ol type="A">
|
||||||
|
<li>Include soc/acpi.h</li>
|
||||||
|
<li>Add the acpi_create_fadt routine
|
||||||
|
<ol type="I">
|
||||||
|
<li>fill in the ACPI header</li>
|
||||||
|
<li>Call the acpi_fill_in_fadt routine</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Add the dsdt.asl module:
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p>Modified: 20 February 2016</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
114
Documentation/Intel/Board/galileo.html
Normal file
114
Documentation/Intel/Board/galileo.html
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Galileo</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Intel® Galileo Development Board</h1>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="http://www.mouser.com/images/microsites/Intel_Galileo2_lrg.jpg"><img alt="Galileo Gen 2" src="http://www.mouser.com/images/microsites/Intel_Galileo2_lrg.jpg" width=500></a></td>
|
||||||
|
<td>
|
||||||
|
The Intel® Galileo Gen 2 mainboard code was developed along with the Intel®
|
||||||
|
<a target="_blank" href="../SoC/quark.html">Quark™</a> SoC:
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="../development.html">Overall</a> development</li>
|
||||||
|
<li><a target="_blank" href="../SoC/soc.html">SoC</a> support</li>
|
||||||
|
<li><a target="_blank" href="../fsp1_1.html">FSP 1.1</a> integration</li>
|
||||||
|
<li><a target="_blank" href="board.html">Board</a> support</li>
|
||||||
|
<li><a target="_blank" href="Galileo_checklist.html">Implementation Checklist</a></li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1>Galileo Board Documentation</h1>
|
||||||
|
<ul>
|
||||||
|
<li>Common Components
|
||||||
|
<ul>
|
||||||
|
<li>A/D: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/adc108s102.pdf">ADC108S102</a></li>
|
||||||
|
<li>Analog Switch: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/ts5a23159.pdf">TS5A23159</a></li>
|
||||||
|
<li>Ethernet (10/100 MB/S): Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/dp83848-ep.pdf">DP83848</a></li>
|
||||||
|
<li>Load Switch: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/tps22920.pdf">TPS22920x</a></li>
|
||||||
|
<li>Memory (256 MiB): Micron <a target="_blank" href="https://www.micron.com/~/media/Documents/Products/Data%20Sheet/DRAM/DDR3/1Gb_1_35V_DDR3L.pdf">MT41K128M8</a></li>
|
||||||
|
<li>SoC: Intel® Quark™ <a target="_blank" href="../SoC/quark.html">X-1000</a></li>
|
||||||
|
<li>Serial EEPROM (1 KiB): ON Semiconductor® <a target="_blank" href="http://www.onsemi.com/pub_link/Collateral/CAT24C01-D.PDF">CAT24C08</a></li>
|
||||||
|
<li>SPI Flash (8 MiB): Winbond™ <a target="_blank" href="http://www.winbond-usa.com/resource-files/w25q64fv_revl1_100713.pdf">W25Q64FV</a></li>
|
||||||
|
<li>Step Down Converter: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/slvsag7c/slvsag7c.pdf">TPS62130</a></li>
|
||||||
|
<li>Step Down Converter: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ug/slvu570/slvu570.pdf">TPS652510</a></li>
|
||||||
|
<li>Termination Regulator: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/tps51200.pdf">TPS51200</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Make a bootable <a target="_blank" href="https://software.intel.com/en-us/get-started-galileo-linux-step1">micro SD card</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Galileo Gen 2 Board Documentation</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="http://files.linuxgizmos.com/intel_galileo_gen2_blockdiagram.jpg">Block Diagram</a></li>
|
||||||
|
<li><a target="_blank" href="https://software.intel.com/en-us/iot/library/galileo-getting-started">Getting Started</a></li>
|
||||||
|
<li><a target="_blank" href="http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-overview.html">Overview</a></li>
|
||||||
|
<li><a target="_blank" href="http://files.linuxgizmos.com/intel_galileo_gen2_ports.jpg">Port Diagram</a></li>
|
||||||
|
<li><a target="_blank" href="http://download.intel.com/support/galileo/sb/intelgalileogen2prodbrief_330736_003.pdf">Product Brief</a></li>
|
||||||
|
<li><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/guides/galileo-g2-schematic.pdf">Schematic</a></li>
|
||||||
|
<li><a target="_blank" href="http://download.intel.com/support/galileo/sb/galileo_boarduserguide_330237_001.pdf">User Guide</a></li>
|
||||||
|
<li>Components
|
||||||
|
<ul>
|
||||||
|
<li>A/D: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/adc108s102.pdf">ADC108S102</a></li>
|
||||||
|
<li>I2C 16-channel, 12-bit PWM: NXP Semiconductors <a target="_blank" href="http://cache.nxp.com/documents/data_sheet/PCA9685.pdf">PCA9685</a></li>
|
||||||
|
<li>I2C I/O Ports: NXP Semiconductors <a target="_blank" href="http://www.nxp.com/documents/data_sheet/PCAL9535A.pdf">PCAL9535A</a></li>
|
||||||
|
<li>Octal Buffer/Driver: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/sn74lv541at.pdf">SN74LV541AT</a></li>
|
||||||
|
<li>Quadruple Bus Buffer: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/sn74lv125a.pdf">SN74LV125A</a></li>
|
||||||
|
<li>Quadruple Bus Buffer with 3-State Outputs: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/sn74lvc126a.pdf">SN74LVC126A</a></li>
|
||||||
|
<li>Serial EEPROM (1 KiB): ON Semiconductor® <a target="_blank" href="http://www.onsemi.com/pub_link/Collateral/CAT24C01-D.PDF">CAT24C08</a></li>
|
||||||
|
<li>Single 2-input multiplexer: NXP Semiconductors <a target="_blank" href="http://www.nxp.com/documents/data_sheet/74LVC1G157.pdf">74LVC1G157</a></li>
|
||||||
|
<li>Step Down Converter: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/slvsag7c/slvsag7c.pdf">TPS62130</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Galileo Gen 1 Board Documentation</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/datasheets/galileo-g1-datasheet.pdf">Datasheet</a></li>
|
||||||
|
<li><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/guides/galileo-g1-schematic.pdf">Schematic</a></li>
|
||||||
|
<li>Components
|
||||||
|
<ul>
|
||||||
|
<li>A/D: Analog Devices <a target="_blank" href="http://www.analog.com/media/en/technical-documentation/data-sheets/AD7298-1.pdf">AD7298</a></li>
|
||||||
|
<li>Analog Switch, 2 channel: Texas Instruments <a target="_blank" href="http://www.ti.com.cn/cn/lit/ds/symlink/ts5a23159.pdf">TS5A23159</a></li>
|
||||||
|
<li>EEPROM & GPIO: Cypress <a target="_blank" href="http://www.cypress.com/file/37971/download">CY8C9540A</a></li>
|
||||||
|
<li>Power Distribution Switch: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/tps2044b.pdf">TPS2051BDBVR</a></li>
|
||||||
|
<li>RS232 Converter: Texas Instruments <a target="_blank" href="http://www.ti.com/lit/ds/symlink/max3232.pdf">MAX3232</a></li>
|
||||||
|
<li>Voltage-Level Translator: Texas Instruments<a target="_blank" href="http://www.ti.com/lit/ds/symlink/txs0108e.pdf">TXS0108E</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1>Debug Tools</h1>
|
||||||
|
<ul>
|
||||||
|
<li>Flash Programmer:
|
||||||
|
<ul>
|
||||||
|
<li>Dediprog <a target="_blank" href="http://www.dediprog.com/pd/spi-flash-solution/SF100">SF100</a> ISP IC Programmer</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>JTAG Connector: <a target="_blank" href="https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=Olimex+ARM-JTAG-20-10">Olimex ARM-JTAG-20-10</a></li>
|
||||||
|
<li>JTAG Debugger:
|
||||||
|
<ul>
|
||||||
|
<li>Olimex LTD <a target="_blank" href="https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=Olimex+ARM-USB-OCD-H">ARM-USB-OCD-H</a></li>
|
||||||
|
<li>Tincan Tools <a target="_blank" href="https://www.tincantools.com/wiki/Flyswatter2">Flyswatter2</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a target="_blank" href="http://download.intel.com/support/processors/quark/sb/sourcedebugusingopenocd_quark_appnote_330015_003.pdf">Hardware Setup and Software Installation</a></li>
|
||||||
|
<li>USB Serial cable: FTDI <a target="_blank" href="https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=FTDI+TTL-232R-3V3">TTL-232R-3V3</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p>Modified: 29 February 2016</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
220
Documentation/Intel/SoC/quark.html
Normal file
220
Documentation/Intel/SoC/quark.html
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Quark™ SoC</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Intel® Quark™ SoC</h1>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/images/embedded/16x9/edc-quark-block-diagram-16x9.png"><img alt="Quark Block Diagram" src="http://www.intel.com/content/dam/www/public/us/en/images/embedded/16x9/edc-quark-block-diagram-16x9.png" width=500></a></td>
|
||||||
|
<td>
|
||||||
|
The Quark™ SoC code was developed using the
|
||||||
|
<a target="_blank" href="../Board/galileo.html">Galileo Gen 2</a>
|
||||||
|
board:
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="../development.html">Overall</a> development</li>
|
||||||
|
<li><a target="_blank" href="soc.html">SoC</a> support</li>
|
||||||
|
<li><a target="_blank" href="../fsp1_1.html">FSP 1.1</a> integration</li>
|
||||||
|
<li><a target="_blank" href="../Board/board.html">Board</a> support</li>
|
||||||
|
<li><a target="_blank" href="#QuarkFsp">Quark™ FSP</a></li>
|
||||||
|
<li><a target="_blank" href="#CorebootPayloadPkg">CorebootPayloadPkg</a></li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1>Quark™ Documentation</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/images/embedded/16x9/edc-quark-block-diagram-16x9.png">Block Diagram</a></li>
|
||||||
|
<li><a target="_blank" href="http://www.intel.com/content/www/us/en/embedded/products/quark/specifications.html">Specifications</a>:
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="http://ark.intel.com/products/79084/Intel-Quark-SoC-X1000-16K-Cache-400-MHz">X1000</a>
|
||||||
|
- <a target="_blank" href="http://www.intel.com/content/www/us/en/search.html?keyword=X1000">Documentation</a>:
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/datasheets/quark-x1000-datasheet.pdf">Datasheet</a></li>
|
||||||
|
<li><a target="_blank" href="http://www.intel.com/content/dam/support/us/en/documents/processors/quark/sb/intelquarkcore_devman_001.pdf">Developer's Manual</a></li>
|
||||||
|
<li><a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/intel-quark-product-brief-v3.pdf">Product Brief</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a target="_blank" href="../index.html#Documentation">More documentation</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="CorebootPayloadPkg">Quark™ EDK2 CorebootPayloadPkg</a></h1>
|
||||||
|
<p>
|
||||||
|
Build Instructions:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Set up <a href="#BuildEnvironment">build environment</a></li>
|
||||||
|
<li>Linux (assumes GCC48):
|
||||||
|
<pre><code>build -p CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc -a IA32 \
|
||||||
|
-t GCC48 -b DEBUG -DDEBUG_PROPERTY_MASK=0x27 \
|
||||||
|
-DDEBUG_PRINT_ERROR_LEVEL=0x80000042 -DSHELL_TYPE=BUILD_SHELL \
|
||||||
|
-DMAX_LOGICAL_PROCESSORS=1
|
||||||
|
ls Build/CorebootPayloadPkgIA32/DEBUG_GCC48/FV/UEFIPAYLOAD.fd
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>Windows (assumes Visual Studio 2015):
|
||||||
|
<pre><code>build -p CorebootPayloadPkg\CorebootPayloadPkgIa32.dsc -a IA32 -t VS2015x86 -b DEBUG -DDEBUG_PROPERTY_MASK=0x27 -DDEBUG_PRINT_ERROR_LEVEL=0x80000042 -DSHELL_TYPE=BUILD_SHELL -DMAX_LOGICAL_PROCESSORS=1
|
||||||
|
dir Build\CorebootPayloadPkgIA32\DEBUG_VS2015x86\FV\UEFIPAYLOAD.fd
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>In the .config for coreboot, set the following Kconfig values:
|
||||||
|
<ul>
|
||||||
|
<li>CONFIG_PAYLOAD_ELF=y</li>
|
||||||
|
<li>CONFIG_PAYLOAD_FILE="path to UEFIPAYLOAD.fd"</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Build coreboot</li>
|
||||||
|
<li>Copy the image build/coreboot.rom into flash</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="BuildEnvironment">Quark™ EDK2 Build Environment</a></h1>
|
||||||
|
<p>
|
||||||
|
Use the following steps to setup a build environment:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Get the EDK2 sources:
|
||||||
|
<ol type="A">
|
||||||
|
<li>EDK2: git clone <a target="_blank" href="https://github.com/tianocore/edk2.git">https://github.com/tianocore/edk2.git</a></li>
|
||||||
|
<li>EDK2-non-osi: git clone <a target="_blank" href="https://github.com/tianocore/edk2-non-osi.git">https://github.com/tianocore/edk2-non-osi.git</a></li>
|
||||||
|
<li>Win32 BaseTools: git clone <a target="_blank" href="https://github.com/tianocore/edk2-BaseTools-win32.git">https://github.com/tianocore/edk2-BaseTools-win32.git</a></li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Set up a build window:
|
||||||
|
<ul>
|
||||||
|
<li>Linux:
|
||||||
|
<pre><code>export WORKSPACE=$PWD
|
||||||
|
export PACKAGES_PATH="$PWD/edk2:$PWD/edk2-non-osi"
|
||||||
|
cd edk2
|
||||||
|
export WORKSPACE=$PWD
|
||||||
|
. edksetup.sh
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>Windows:
|
||||||
|
<pre><code>set WORKSPACE=%CD%
|
||||||
|
set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-non-osi
|
||||||
|
set EDK_TOOLS_BIN=%WORKSPACE%\edk2-BaseTools-win32
|
||||||
|
cd edk2
|
||||||
|
edksetup.bat
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="QuarkFsp">Quark™ FSP</a></h1>
|
||||||
|
<p>
|
||||||
|
Getting the Quark FSP source:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Set up an EDK-II <a href="#BuildEnvironment">Build Environment</a></li>
|
||||||
|
<li>cd edk2</li>
|
||||||
|
<li>mkdir QuarkFspPkg</li>
|
||||||
|
<li>cd QuarkFspPkg</li>
|
||||||
|
<li>Use git to clone <a target="_blank" href="https://review.gerrithub.io/#/admin/projects/LeeLeahy/quarkfsp">QuarkFspPkg</a> into the QuarkFpsPkg directory (.)</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<h2>Building QuarkFspPkg</h2>
|
||||||
|
<p>
|
||||||
|
There are two versions of FSP: FSP 1.1 and FSP 2.0. There are also two
|
||||||
|
different implementations of FSP, one using subroutines without SEC and
|
||||||
|
PEI core and the original implementation which relies on SEC and PEI core.
|
||||||
|
Finally there are two different build x86 types release (r32) and debug (d32).
|
||||||
|
</p>
|
||||||
|
<p>Note that the subroutine implementations are a <b>work in progress</b>.</p>
|
||||||
|
<p>
|
||||||
|
Build commands shown building debug FSP:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Linux:
|
||||||
|
<ul>
|
||||||
|
<li>QuarkFspPkg/BuildFsp1_1.sh -d32</li>
|
||||||
|
<li>QuarkFspPkg/BuildFsp1_1Pei.sh -d32</li>
|
||||||
|
<li>QuarkFspPkg/BuildFsp2_0.sh -d32</li>
|
||||||
|
<li>QuarkFspPkg/BuildFsp2_0Pei.sh -d32</li>
|
||||||
|
</ul>
|
||||||
|
<li>Windows:
|
||||||
|
<ul>
|
||||||
|
<li>QuarkFspPkg/BuildFsp1_1.bat -d32</li>
|
||||||
|
<li>Windows: QuarkFspPkg/BuildFsp2_0.bat -d32</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Copying FSP files into coreboot Source Tree</h2>
|
||||||
|
<p>
|
||||||
|
There are some helper scripts to copy the FSP output into the coreboot
|
||||||
|
source tree. The parameters to these scripts are:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>EDK2 tree root</li>
|
||||||
|
<li>coreboot tree root</li>
|
||||||
|
<li>Build type: DEBUG or RELEASE</li>
|
||||||
|
</ol>
|
||||||
|
<p>
|
||||||
|
Script files:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Linux:
|
||||||
|
<ul>
|
||||||
|
<li>QuarkFspPkg/coreboot_fsp1_1.sh</li>
|
||||||
|
<li>QuarkFspPkg/coreboot_fsp1_1Pei.sh</li>
|
||||||
|
<li>QuarkFspPkg/coreboot_fsp2_0.sh</li>
|
||||||
|
<li>QuarkFspPkg/coreboot_fsp2_0Pei.sh</li>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1>Quark™ EDK2 BIOS</h1>
|
||||||
|
<p>
|
||||||
|
Build Instructions:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Set up <a href="#BuildEnvironment">build environment</a></li>
|
||||||
|
<li>Build the image:
|
||||||
|
<ul>
|
||||||
|
<li>Linux:
|
||||||
|
<pre><code>build -p QuarkPlatformPkg/Quark.dsc -a IA32 -t GCC48 -b DEBUG -DDEBUG_PROPERTY_MASK=0x27 -DDEBUG_PRINT_ERROR_LEVEL=0x80000042
|
||||||
|
ls Build/Quark/DEBUG_GCC48/FV/Quark.fd
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>Windows:
|
||||||
|
<pre><code>build -p QuarkPlatformPkg/Quark.dsc -a IA32 -t VS2012x86 -b DEBUG -DDEBUG_PROPERTY_MASK=0x27 -DDEBUG_PRINT_ERROR_LEVEL=0x80000042
|
||||||
|
dir Build\Quark\DEBUG_VS2012x86\FV\Quark.fd
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Documentation:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="https://github.com/tianocore/edk2/tree/master/QuarkPlatformPkg">EDK II firmware for Intel® Quark™ SoC X1000 based platforms</a></li>
|
||||||
|
<li>Intel® Quark™ SoC X1000 <a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/guides/quark-x1000-uefi-firmware-writers-guide.pdf">UEFI Firmware Writer's Guide</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p>Modified: 17 May 2016</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
734
Documentation/Intel/SoC/soc.html
Normal file
734
Documentation/Intel/SoC/soc.html
Normal file
@ -0,0 +1,734 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>SoC</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>x86 System on a Chip (SoC) Development</h1>
|
||||||
|
<p>
|
||||||
|
SoC development is best done in parallel with development for a specific
|
||||||
|
board. The combined steps are listed
|
||||||
|
<a target="_blank" href="../development.html">here</a>.
|
||||||
|
The development steps for the SoC are listed below:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li><a target="_blank" href="../fsp1_1.html#RequiredFiles">FSP 1.1</a> required files</li>
|
||||||
|
<li>SoC <a href="#RequiredFiles">Required Files</a></li>
|
||||||
|
<li><a href="#Descriptor">Start Booting</a></li>
|
||||||
|
<li><a href="#EarlyDebug">Early Debug</a></li>
|
||||||
|
<li><a href="#Bootblock">Bootblock</a></li>
|
||||||
|
<li><a href="#TempRamInit">TempRamInit</a></li>
|
||||||
|
<li><a href="#Romstage">Romstage</a>
|
||||||
|
<ol type="A">
|
||||||
|
<li>Enable <a href="#SerialOutput">Serial Output"</a></li>
|
||||||
|
<li>Get the <a href="#PreviousSleepState">Previous Sleep State</a></li>
|
||||||
|
<li>Add the <a href="#MemoryInit">MemoryInit</a> Support</li>
|
||||||
|
<li>Disable the <a href="#DisableShadowRom">Shadow ROM</a></li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li><a href="#Ramstage">Ramstage</a>
|
||||||
|
<ol type="A">
|
||||||
|
<li><a href="#DeviceTree">Start Device Tree Processing</a></li>
|
||||||
|
<li>Set up the <a href="#MemoryMap">Memory Map"</a></li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li><a href="#AcpiTables">ACPI Tables</a></li>
|
||||||
|
<li><a href="#LegacyHardware">Legacy Hardware</a></li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="RequiredFiles">Required Files</a></h1>
|
||||||
|
<p>
|
||||||
|
Create the directory as src/soc/<Vendor>/<Chip Family>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The following files are required to build a new SoC:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Include files
|
||||||
|
<ul>
|
||||||
|
<li>include/soc/pei_data.h</li>
|
||||||
|
<li>include/soc/pm.h</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Kconfig - Defines the Kconfig value for the SoC and selects the tool
|
||||||
|
chains for the various stages:
|
||||||
|
<ul>
|
||||||
|
<li>select ARCH_BOOTBLOCK_<Tool Chain></li>
|
||||||
|
<li>select ARCH_RAMSTAGE_<Tool Chain></li>
|
||||||
|
<li>select ARCH_ROMSTAGE_<Tool Chain></li>
|
||||||
|
<li>select ARCH_VERSTAGE_<Tool Chain></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Makefile.inc - Specify the include paths</li>
|
||||||
|
<li>memmap.c - Top of usable RAM</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="Descriptor">Start Booting</a></h1>
|
||||||
|
<p>
|
||||||
|
Some SoC parts require additional firmware components in the flash.
|
||||||
|
This section describes how to add those pieces.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Intel Firmware Descriptor</h2>
|
||||||
|
<p>
|
||||||
|
The Intel Firmware Descriptor (IFD) is located at the base of the flash part.
|
||||||
|
The following command overwrites the base of the flash image with the Intel
|
||||||
|
Firmware Descriptor:
|
||||||
|
</p>
|
||||||
|
<pre><code>dd if=descriptor.bin of=build/coreboot.rom conv=notrunc >/dev/null 2>&1</code></pre>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a name="MEB">Management Engine Binary</a></h2>
|
||||||
|
<p>
|
||||||
|
Some SoC parts contain and require that the Management Engine (ME) be running
|
||||||
|
before it is possible to bring the x86 processor out of reset. A binary file
|
||||||
|
containing the management engine code must be added to the firmware using the
|
||||||
|
ifdtool. The following commands add this binary blob:
|
||||||
|
</p>
|
||||||
|
<pre><code>util/ifdtool/ifdtool -i ME:me.bin build/coreboot.rom
|
||||||
|
mv build/coreboot.rom.new build/coreboot.rom
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a name="EarlyDebug">Early Debug</a></h2>
|
||||||
|
<p>
|
||||||
|
Early debugging between the reset vector and the time the serial port is enabled
|
||||||
|
is most easily done by writing values to port 0x80.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Success</h2>
|
||||||
|
<p>
|
||||||
|
When the reset vector is successfully invoked, port 0x80 will output the following value:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>0x01: <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l45">POST_RESET_VECTOR_CORRECT</a>
|
||||||
|
- Bootblock successfully executed the
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/16bit/reset16.inc;hb=HEAD#l4">reset vector</a>
|
||||||
|
and entered the 16-bit code at
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/16bit/entry16.inc;hb=HEAD#l35">_start</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="Bootblock">Bootblock</a></h1>
|
||||||
|
<p>
|
||||||
|
Implement the bootblock using the following steps:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Create the directory as src/soc/<Vendor>/<Chip Family>/bootblock</li>
|
||||||
|
<li>Add the timestamp.inc file which initializes the floating point registers and saves
|
||||||
|
the initial timestamp.
|
||||||
|
</li>
|
||||||
|
<li>Add the bootblock.c file which:
|
||||||
|
<ol type="A">
|
||||||
|
<li>Enables memory-mapped PCI config access</li>
|
||||||
|
<li>Updates the microcode by calling intel_update_microcode_from_cbfs</li>
|
||||||
|
<li>Enable ROM caching</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Edit the src/soc/<Vendor>/<Chip Family>/Kconfig file
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add the BOOTBLOCK_CPU_INIT value to point to the bootblock.c file</li>
|
||||||
|
<li>Add the CHIPSET_BOOTBLOCK_INCLUDE value to point to the timestamp.inc file</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Edit the src/soc/<Vendor>/<Chip Family>/Makefile.inc file
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add the bootblock subdirectory</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Edit the src/soc/<Vendor>/<Chip Family>/memmap.c file
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add the fsp/memmap.h include file</li>
|
||||||
|
<li>Add the mmap_region_granularity routine</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Add the necessary .h files to define the necessary values and structures</li>
|
||||||
|
<li>When successful port 0x80 will output the following values:
|
||||||
|
<ol type="A">
|
||||||
|
<li>0x01: <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l45">POST_RESET_VECTOR_CORRECT</a>
|
||||||
|
- Bootblock successfully executed the
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/16bit/reset16.inc;hb=HEAD#l4">reset vector</a>
|
||||||
|
and entered the 16-bit code at
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/16bit/entry16.inc;hb=HEAD#l35">_start</a>
|
||||||
|
</li>
|
||||||
|
<li>0x10: <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l53">POST_ENTER_PROTECTED_MODE</a>
|
||||||
|
- Bootblock executing in
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/32bit/entry32.inc;hb=HEAD#l55">32-bit mode</a>
|
||||||
|
</li>
|
||||||
|
<li>0x10 - Verstage/romstage reached 32-bit mode</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<b>Build Note:</b> The following files are included into the default bootblock image:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/bootblock_romcc.S;hb=HEAD">src/arch/x86/bootblock_romcc.S</a>
|
||||||
|
added by <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/Makefile.inc;hb=HEAD#l133">src/arch/x86/Makefile.inc</a>
|
||||||
|
and includes the following files:
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/prologue.inc">src/arch/x86/prologue.inc</a></li>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/16bit/reset16.inc">src/cpu/x86/16bit/reset16.inc</a></li>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/16bit/entry16.inc">src/cpu/x86/16bit/entry16.inc</a></li>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/32bit/entry32.inc">src/cpu/x86/32bit/entry32.inc</a></li>
|
||||||
|
<li>The code in
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/bootblock_romcc.S">src/arch/x86/bootblock_romcc.S</a>
|
||||||
|
includes src/soc/<Vendor>/<Chip Family>/bootblock/timestamp.inc using the
|
||||||
|
CONFIG_CHIPSET_BOOTBLOCK_INCLUDE value set above
|
||||||
|
</li>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/sse_enable.inc">src/cpu/x86/sse_enable.inc</a></li>
|
||||||
|
<li>The code in
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/Makefile.inc;hb=HEAD#l156">src/arch/x86/Makefile.inc</a>
|
||||||
|
invokes the ROMCC tool to convert the following "C" code into assembler as bootblock.inc:
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/include/arch/bootblock_romcc.h">src/arch/x86/include/arch/bootblock_romcc.h</a></li>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/x86/lapic/boot_cpu.c">src/cpu/x86/lapic/boot_cpu.c</a></li>
|
||||||
|
<li>The CONFIG_BOOTBLOCK_CPU_INIT value set above typically points to the code in
|
||||||
|
src/soc/<Vendor>/<Chip Family>/bootblock/bootblock.c
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/id.S">src/arch/x86/id.S</a>
|
||||||
|
added by <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/Makefile.inc;hb=HEAD#l110">src/arch/x86/Makefile.inc</a>
|
||||||
|
</li>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/intel/fit/fit.S">src/cpu/intel/fit/fit.S</a>
|
||||||
|
added by <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/cpu/intel/fit/Makefile.inc;hb=HEAD">src/cpu/intel/fit/Makefile.inc</a>
|
||||||
|
</li>
|
||||||
|
<li><a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/walkcbfs.S">src/arch/x86/walkcbfs.S</a>
|
||||||
|
added by <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/Makefile.inc;hb=HEAD#l137">src/arch/x86/Makefile.inc</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="TempRamInit">TempRamInit</a></h1>
|
||||||
|
<p>
|
||||||
|
Enable the call to TempRamInit in two stages:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Finding the FSP binary in the read-only CBFS region</li>
|
||||||
|
<li>Call TempRamInit</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Find FSP Binary</h2>
|
||||||
|
<p>
|
||||||
|
Use the following steps to locate the FSP binary:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Edit the src/soc/<Vendor>/<Chip Family>/Kconfig file
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add "select USE_GENERIC_FSP_CAR_INC" to enable the use of
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/cache_as_ram.inc">src/drivers/intel/fsp1_1/cache_as_ram.inc</a>
|
||||||
|
</li>
|
||||||
|
<li>Add "select SOC_INTEL_COMMON" to enable the use of the files from src/soc/intel/common
|
||||||
|
specifically building
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/soc/intel/common/util.c">util.c</a>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Debug the result until port 0x80 outputs
|
||||||
|
<ol type="A">
|
||||||
|
<li>0x90: <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l205">POST_FSP_TEMP_RAM_INIT</a>
|
||||||
|
- Just before calling
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/cache_as_ram.inc;hb=HEAD#l73">TempRamInit</a>
|
||||||
|
</li>
|
||||||
|
<li>Alternating 0xba and 0x01 - The FSP image was not found</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Add the <a target="_blank" href="../fsp1_1.html#FspBinary">FSP binary file</a> to the flash image</li>
|
||||||
|
<li>Set the following Kconfig values:
|
||||||
|
<ul>
|
||||||
|
<li>CONFIG_FSP_LOC to the FSP base address specified in the previous step</li>
|
||||||
|
<li>CONFIG_FSP_IMAGE_ID_STRING</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Debug the result until port 0x80 outputs
|
||||||
|
<ol type="A">
|
||||||
|
<li>0x90: <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l205">POST_FSP_TEMP_RAM_INIT</a>
|
||||||
|
- Just before calling
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/cache_as_ram.inc;hb=HEAD#l73">TempRamInit</a>
|
||||||
|
</li>
|
||||||
|
<li>Alternating 0xbb and 0x02 - TempRamInit executed, no CPU microcode update found</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Calling TempRamInit</h2>
|
||||||
|
<p>
|
||||||
|
Use the following steps to debug the call to TempRamInit:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Add the CPU microcode update file
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add the microcode file with the following command
|
||||||
|
<pre><code>util/cbfstool/cbfstool build/coreboot.rom add -t microcode -n cpu_microcode_blob.bin -b <base address> -f cpu_microcode_blob.bin</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>Set the Kconfig values
|
||||||
|
<ul>
|
||||||
|
<li>CONFIG_CPU_MICROCODE_CBFS_LOC set to the value from the previous step</li>
|
||||||
|
<li>CONFIG_CPU_MICROCODE_CBFS_LEN</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Debug the result until port 0x80 outputs
|
||||||
|
<ol type="A">
|
||||||
|
<li>0x90: <a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l205">POST_FSP_TEMP_RAM_INIT</a>
|
||||||
|
- Just before calling
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/cache_as_ram.inc;hb=HEAD#l73">TempRamInit</a>
|
||||||
|
</li>
|
||||||
|
<li>0x2A - Just before calling
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/cache_as_ram.inc;hb=HEAD#l151">cache_as_ram_main</a>
|
||||||
|
which is the start of the verstage code which may be part of romstage
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="Romstage">Romstage</a></h1>
|
||||||
|
|
||||||
|
<h2><a name="SerialOutput">Serial Output</a></h2>
|
||||||
|
<p>
|
||||||
|
The following steps add the serial output support for romstage:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Create the romstage subdirectory</li>
|
||||||
|
<li>Add romstage/romstage.c
|
||||||
|
<ol type="A">
|
||||||
|
<li>Program the necessary base addresses</li>
|
||||||
|
<li>Disable the TCO</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Add romstage/Makefile.inc
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add romstage.c to romstage</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Add gpio configuration support if necessary</li>
|
||||||
|
<li>Add the necessary .h files to support the build</li>
|
||||||
|
<li>Update Makefile.inc
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add the romstage subdirectory</li>
|
||||||
|
<li>Add the gpio configuration support file to romstage</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Set the necessary Kconfig values to enable serial output:
|
||||||
|
<ul>
|
||||||
|
<li>CONFIG_DRIVERS_UART_<driver>=y</li>
|
||||||
|
<li>CONFIG_CONSOLE_SERIAL=y</li>
|
||||||
|
<li>CONFIG_UART_FOR_CONSOLE=<port></li>
|
||||||
|
<li>CONFIG_CONSOLE_SERIAL_115200=y</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a name="PreviousSleepState">Determine Previous Sleep State</a></h2>
|
||||||
|
<p>
|
||||||
|
The following steps implement the code to get the previous sleep state:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Implement the fill_power_state routine which determines the previous sleep state</li>
|
||||||
|
<li>Debug the result until port 0x80 outputs
|
||||||
|
<ol type="A">
|
||||||
|
<li>0x32:
|
||||||
|
- Just after entering
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/romstage.c;hb=HEAD#l99">romstage_common</a>
|
||||||
|
</li>
|
||||||
|
<li>0x33 - Just after calling
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/romstage.c;hb=HEAD#l113">soc_pre_ram_init</a>
|
||||||
|
</li>
|
||||||
|
<li>0x34:
|
||||||
|
- Just after entering
|
||||||
|
<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/raminit.c;hb=HEAD#l67">raminit</a>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a name="MemoryInit">MemoryInit Support</a></h2>
|
||||||
|
<p>
|
||||||
|
The following steps implement the code to support the FSP MemoryInit call:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Add the chip.h header file to define the UPD values which get passed
|
||||||
|
to MemoryInit. Skip the values containing SPD addresses and DRAM
|
||||||
|
configuration data which is determined by the board.
|
||||||
|
<p>
|
||||||
|
<b>Build Note</b>: The src/mainboard/<Vendor>/<Board>/devicetree.cb
|
||||||
|
file specifies the default values for these parameters. The build
|
||||||
|
process creates the static.c module which contains the config data
|
||||||
|
structure containing these values.
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>Edit romstage/romstage.c
|
||||||
|
<ol type="A">
|
||||||
|
<li>Implement the romstage/romstage.c/soc_memory_init_params routine to
|
||||||
|
copy the values from the config structure into the UPD structure
|
||||||
|
</li>
|
||||||
|
<li>Implement the soc_display_memory_init_params routine to display
|
||||||
|
the updated UPD parameters by calling fsp_display_upd_value
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a name="DisableShadowRom">Disable Shadow ROM</a></h2>
|
||||||
|
<p>
|
||||||
|
A shadow of the SPI flash part is mapped from 0x000e0000 to 0x000fffff.
|
||||||
|
This shadow needs to be disabled to allow RAM to properly respond to
|
||||||
|
this address range.
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Edit romstage/romstage.c and add the soc_after_ram_init routine</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="Ramstage">Ramstage</a></h1>
|
||||||
|
|
||||||
|
<h2><a name="DeviceTree">Start Device Tree Processing</a></h2>
|
||||||
|
<p>
|
||||||
|
The src/mainboard/<Vendor>/<Board>/devicetree.cb file drives the
|
||||||
|
execution during ramstage. This file is processed by the util/sconfig utility
|
||||||
|
to generate build/mainboard/<Vendor>/<Board>/static.c. The various
|
||||||
|
state routines in
|
||||||
|
src/lib/<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/lib/hardwaremain.c;hb=HEAD#l128">hardwaremain.c</a>
|
||||||
|
call dev_* routines which use the tables in static.c to locate operation tables
|
||||||
|
associated with the various chips and devices. After location the operation
|
||||||
|
tables, the state routines call one or more functions depending upon the
|
||||||
|
state of the state machine.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3><a name="ChipOperations">Chip Operations</a></h3>
|
||||||
|
<p>
|
||||||
|
Kick-starting the ramstage state machine requires creating the operation table
|
||||||
|
for the chip listed in devicetree.cb:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Edit src/soc/<SoC Vendor>/<SoC Family>/chip.c:
|
||||||
|
<ol type="A">
|
||||||
|
<li>
|
||||||
|
This chip's operation table has the name
|
||||||
|
soc_<SoC Vendor>_<SoC Family>_ops which is derived from the
|
||||||
|
chip path specified in the devicetree.cb file.
|
||||||
|
</li>
|
||||||
|
<li>Use the CHIP_NAME macro to specify the name for the chip</li>
|
||||||
|
<li>For FSP 1.1, specify a .init routine which calls intel_silicon_init</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Edit src/soc/<SoC Vendor>/<SoC Family>/Makefile.inc and add chip.c to ramstage</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<h3>Domain Operations</h3>
|
||||||
|
<p>
|
||||||
|
coreboot uses the domain operation table to initiate operations on all of the
|
||||||
|
devices in the domain. By default coreboot enables all PCI devices which it
|
||||||
|
finds. Listing a device in devicetree.cb gives the board vendor control over
|
||||||
|
the device state. Non-PCI devices may also be listed under PCI device such as
|
||||||
|
the LPC bus or SMbus devices.
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Edit src/soc/<SoC Vendor>/<SoC Family>/chip.c:
|
||||||
|
<ol type="A">
|
||||||
|
<li>
|
||||||
|
The domain operation table is typically placed in
|
||||||
|
src/soc/<SoC Vendor>/<SoC Family>/chip.c.
|
||||||
|
The table typically looks like the following:
|
||||||
|
<pre><code>static struct device_operations pci_domain_ops = {
|
||||||
|
.read_resources = pci_domain_read_resources,
|
||||||
|
.set_resources = pci_domain_set_resources,
|
||||||
|
.scan_bus = pci_domain_scan_bus,
|
||||||
|
.ops_pci_bus = pci_bus_default_ops,
|
||||||
|
};
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Create a .enable_dev entry in the chip operations table which points to a
|
||||||
|
routine which sets the domain table for the device with the DEVICE_PATH_DOMAIN.
|
||||||
|
<pre><code> if (dev->path.type == DEVICE_PATH_DOMAIN) {
|
||||||
|
dev->ops = &pci_domain_ops;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
During the BS_DEV_ENUMERATE state, ramstage now display the device IDs
|
||||||
|
for the PCI devices on the bus.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Set CONFIG_DEBUG_BOOT_STATE=y in the .config file</li>
|
||||||
|
<li>
|
||||||
|
Debug the result until the PCI vendor and device IDs are displayed
|
||||||
|
during the BS_DEV_ENUMERATE state.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a name="DeviceDrivers">PCI Device Drivers</a></h2>
|
||||||
|
<p>
|
||||||
|
PCI device drivers consist of a ".c" file which contains a "pci_driver" data
|
||||||
|
structure at the end of the file with the attribute tag "__pci_driver". This
|
||||||
|
attribute tag places an entry into a link time table listing the various
|
||||||
|
coreboot device drivers.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Specify the following fields in the table:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>.vendor - PCI vendor ID value of the device</li>
|
||||||
|
<li>.device - PCI device ID value of the device or<br>
|
||||||
|
.devices - Address of a zero terminated array of PCI device IDs
|
||||||
|
</li>
|
||||||
|
<li>.ops - Operations table for the device. This is the address
|
||||||
|
of a "static struct device_operations" data structure specifying
|
||||||
|
the routines to execute during the different states and sub-states
|
||||||
|
of ramstage's processing.
|
||||||
|
</li>
|
||||||
|
<li>Turn on the device in mainboard/<Vendor>/<Board>/devicetree.cb</li>
|
||||||
|
<li>
|
||||||
|
Debug until the device is on and properly configured in coreboot and
|
||||||
|
usable by the payload
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<h3><a name="SubsystemIds">Subsystem IDs</a></h3>
|
||||||
|
<p>
|
||||||
|
PCI subsystem IDs are assigned during the BS_DEV_ENABLE state. The device
|
||||||
|
driver may use the common mechanism to assign subsystem IDs by adding
|
||||||
|
the ".ops_pci" to the pci_driver data structure. This field points to
|
||||||
|
a "struct pci_operations" that specifies a routine to set the subsystem
|
||||||
|
IDs for the device. The routine might look something like this:
|
||||||
|
</p>
|
||||||
|
<pre><code>static void pci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
|
||||||
|
{
|
||||||
|
if (!vendor || !device) {
|
||||||
|
vendor = pci_read_config32(dev, PCI_VENDOR_ID);
|
||||||
|
device = vendor >> 16;
|
||||||
|
}
|
||||||
|
printk(BIOS_SPEW,
|
||||||
|
"PCI: %02x:%02x:%d subsystem vendor: 0x%04x, device: 0x%04x\n",
|
||||||
|
0, PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn),
|
||||||
|
vendor & 0xffff, device);
|
||||||
|
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||||
|
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Set up the <a name="MemoryMap">Memory Map</a></h2>
|
||||||
|
<p>
|
||||||
|
The memory map is built by the various PCI device drivers during the
|
||||||
|
BS_DEV_RESOURCES state of ramstage. The northcluster driver will typically
|
||||||
|
specify the DRAM resources while the other drivers will typically specify
|
||||||
|
the IO resources. These resources are hung off the device_t data structure by
|
||||||
|
src/device/device_util.c/<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/device/device_util.c;hb=HEAD#l448">new_resource</a>.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
During the BS_WRITE_TABLES state, coreboot collects these resources and
|
||||||
|
places them into a data structure identified by LB_MEM_TABLE.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Edit the device driver file:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
Implement a read_resources routine which calls macros defined in
|
||||||
|
src/include/device/<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/device/device.h;hb=HEAD#l237">device.h</a>
|
||||||
|
like:
|
||||||
|
<ul>
|
||||||
|
<li>ram_resource</li>
|
||||||
|
<li>reserved_ram_resource</li>
|
||||||
|
<li>bad_ram_resource</li>
|
||||||
|
<li>uma_resource</li>
|
||||||
|
<li>mmio_resource</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Testing: Verify that the resources are properly displayed by coreboot during the BS_WRITE_TABLES state.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="AcpiTables">ACPI Tables</a></h1>
|
||||||
|
<p>
|
||||||
|
One of the payloads that needs ACPI tables is the EDK2 <a target="_blank" href="quark.html#CorebootPayloadPkg">CorebootPayloadPkg</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>FADT</h2>
|
||||||
|
<p>
|
||||||
|
The EDK2 module
|
||||||
|
CorebootModulePkg/Library/CbParseLib/<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootModulePkg/Library/CbParseLib/CbParseLib.c#l450">CbParseLib.c</a>
|
||||||
|
requires that the FADT contains the values in the table below.
|
||||||
|
These values are placed into a HOB identified by
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootModulePkg/CorebootModulePkg.dec#l36">gUefiAcpiBoardInfoGuid</a>
|
||||||
|
by routine
|
||||||
|
CorebootModulePkg/CbSupportPei/CbSupportPei/<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootModulePkg/CbSupportPei/CbSupportPei.c#l364">CbPeiEntryPoint</a>.
|
||||||
|
</p>
|
||||||
|
<table border="1">
|
||||||
|
<tr bgcolor="#c0ffc0">
|
||||||
|
<td>Coreboot Field</td>
|
||||||
|
<td>EDK2 Field</td>
|
||||||
|
<td>gUefiAcpiBoardInfoGuid</td>
|
||||||
|
<td>Use</li>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf">ACPI Spec.</a>
|
||||||
|
Section
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gpe0_blk<br>gpe0_blk_len</td>
|
||||||
|
<td>Gpe0Blk<br>Gpe0BlkLen</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootModulePkg/Library/CbParseLib/CbParseLib.c#l477">PmGpeEnBase</a>
|
||||||
|
</td>
|
||||||
|
<td><a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c#l129">Shutdown</a></td>
|
||||||
|
<td>4.8.4.1</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pm1a_cnt_blk</td>
|
||||||
|
<td>Pm1aCntBlk</td>
|
||||||
|
<td>PmCtrlRegBase</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c#l139">Shutdown</a><br>
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c#l40">Suspend</a>
|
||||||
|
</td>
|
||||||
|
<td>4.8.3.2.1</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pm1a_evt_blk</td>
|
||||||
|
<td>Pm1aEvtBlk</td>
|
||||||
|
<td>PmEvtBase</td>
|
||||||
|
<td><a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c#l134">Shutdown</a></td>
|
||||||
|
<td>4.8.3.1.1</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pm_tmr_blk</td>
|
||||||
|
<td>PmTmrBlk</td>
|
||||||
|
<td>PmTimerRegBase</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.c#l55">Timer</a>
|
||||||
|
</td>
|
||||||
|
<td>4.8.3.3</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>reset_reg.</td>
|
||||||
|
<td>ResetReg.Address</td>
|
||||||
|
<td>ResetRegAddress</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c#l71">Cold</a>
|
||||||
|
and
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c#l98">Warm</a>
|
||||||
|
resets
|
||||||
|
</td>
|
||||||
|
<td>4.3.3.6</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>reset_value</td>
|
||||||
|
<td>ResetValue</td>
|
||||||
|
<td>ResetValue</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c#l71">Cold</a>
|
||||||
|
and
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c#l98">Warm</a>
|
||||||
|
resets
|
||||||
|
</td>
|
||||||
|
<td>4.8.3.6</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
The EDK2 data structure is defined in
|
||||||
|
MdeModulePkg/Include/IndustryStandard/<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/MdePkg/Include/IndustryStandard/Acpi61.h#l111">Acpi61.h</a>
|
||||||
|
The coreboot data structure is defined in
|
||||||
|
src/arch/x86/include/arch/<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/arch/x86/include/arch/acpi.h;hb=HEAD#l237">acpi.h</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
Select <a target="_blank" href="../Board/board.html#AcpiTables">HAVE_ACPI_TABLES</a>
|
||||||
|
in the board's Kconfig file
|
||||||
|
</li>
|
||||||
|
<li>Create a acpi.c module:
|
||||||
|
<ol type="A">
|
||||||
|
<li>Add the acpi_fill_in_fadt routine and initialize the values above</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="LegacyHardware">Legacy Hardware</a></h1>
|
||||||
|
<p>
|
||||||
|
One of the payloads that needs legacy hardare is the EDK2 <a target="_blank" href="quark.html#CorebootPayloadPkg">CorebootPayloadPkg</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<table border="1">
|
||||||
|
<tr bgcolor="c0ffc0">
|
||||||
|
<th>Peripheral</th>
|
||||||
|
<th>Use</th>
|
||||||
|
<th>8259 Interrupt Vector</th>
|
||||||
|
<th>IDT Base Offset</th>
|
||||||
|
<th>Interrupt Handler</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="http://www.scs.stanford.edu/10wi-cs140/pintos/specs/8254.pdf">8254</a>
|
||||||
|
Programmable Interval Timer
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
EDK2: PcAtChipsetPkg/8254TimerDxe/<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/PcAtChipsetPkg/8254TimerDxe/Timer.c">Timer.c</a>
|
||||||
|
</td>
|
||||||
|
<td>0</td>
|
||||||
|
<td>0x340</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/PcAtChipsetPkg/8254TimerDxe/Timer.c#l71">TimerInterruptHandler</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwibxYKU3ZDLAhVOzWMKHfuqB40QFggcMAA&url=http%3A%2F%2Fbochs.sourceforge.net%2Ftechspec%2Fintel-8259a-pic.pdf.gz&usg=AFQjCNF1NT0OQ6ys1Pn6Iv9sv6cKRzZbGg&sig2=HfBszp9xTVO_fajjPWCsJw">8259</a>
|
||||||
|
Programmable Interrupt Controller
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
EDK2: PcAtChipsetPkg/8259InterruptControllerDxe/<a target="_blank" href="https://github.com/tianocore/edk2/blob/master/PcAtChipsetPkg/8259InterruptControllerDxe/8259.c">8259.c</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
Master interrupts: 0, 2 - 7<br>
|
||||||
|
Slave interrupts: 8 - 15<br>
|
||||||
|
Interrupt vector 1 is never generated, the cascaded input generates interrupts 8 - 15
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
Master: 0x340, 0x350 - 0x378<br>
|
||||||
|
Slave: 0x380 - 0x3b8<br>
|
||||||
|
Interrupt descriptors are 8 bytes each
|
||||||
|
</td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p>Modified: 4 March 2016</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
377
Documentation/Intel/development.html
Normal file
377
Documentation/Intel/development.html
Normal file
@ -0,0 +1,377 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Development</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Intel® x86 coreboot/FSP Development Process</h1>
|
||||||
|
<p>
|
||||||
|
The x86 development process for coreboot is broken into the following components:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>coreboot <a target="_blank" href="SoC/soc.html">SoC</a> development</li>
|
||||||
|
<li>coreboot <a target="_blank" href="Board/board.html">mainboard</a> development</li>
|
||||||
|
<li><a target="_blank" href="fsp1_1.html">FSP 1.1</a> integration</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
The development process has two main phases:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>Minimal coreboot; This phase is single threaded</li>
|
||||||
|
<li>Adding coreboot features</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<h2>Minimal coreboot</h2>
|
||||||
|
<p>
|
||||||
|
The combined steps below describe how to bring up a minimal coreboot for a
|
||||||
|
system-on-a-chip (SoC) and a development board:
|
||||||
|
</p>
|
||||||
|
<table>
|
||||||
|
<tr bgcolor="#ffffc0">
|
||||||
|
<td>The initial coreboot steps are single threaded!
|
||||||
|
The initial minimal FSP development is also single threaded.
|
||||||
|
Progress can speed up by adding more developers after the minimal coreboot/FSP
|
||||||
|
implementation reaches the payload.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<ol>
|
||||||
|
<li>Get the necessary tools:
|
||||||
|
<ul>
|
||||||
|
<li>Linux: Use your package manager to install m4 bison flex and the libcurses development
|
||||||
|
package.
|
||||||
|
<ul>
|
||||||
|
<li>Ubuntu or other Linux distribution that use apt, run:
|
||||||
|
<pre><code>sudo apt-get install m4 bison flex libncurses5-dev
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Build the cross tools for i386:
|
||||||
|
<ul>
|
||||||
|
<li>Linux:
|
||||||
|
<pre><code>make crossgcc-i386</code></pre>
|
||||||
|
To use multiple processors for the toolchain build (which takes a long time), use:
|
||||||
|
<pre><code>make crossgcc-i386 CPUS=N</code></pre>
|
||||||
|
where N is the number of cores to use for the build.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>Get something to build:
|
||||||
|
<ol type="A">
|
||||||
|
<li><a target="_blank" href="fsp1_1.html#RequiredFiles">FSP 1.1</a> required files</li>
|
||||||
|
<li><a target="_blank" href="SoC/soc.html#RequiredFiles">SoC</a> required files</li>
|
||||||
|
<li><a target="_blank" href="Board/board.html#RequiredFiles">Board</a> required files</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Get result to start <a target="_blank" href="SoC/soc.html#Descriptor">booting</a></li>
|
||||||
|
<li><a target="_blank" href="SoC/soc.html#EarlyDebug">Early Debug</a></li>
|
||||||
|
<li>Implement and debug the <a target="_blank" href="SoC/soc.html#Bootblock">bootblock</a> code</li>
|
||||||
|
<li>Implement and debug the call to <a target="_blank" href="SoC/soc.html#TempRamInit">TempRamInit</a></li>
|
||||||
|
<li>Enable the serial port
|
||||||
|
<ol type="A">
|
||||||
|
<li>Power on, enable and configure GPIOs for the
|
||||||
|
<a target="_blank" href="Board/board.html#SerialOutput">debug serial UART</a>
|
||||||
|
</li>
|
||||||
|
<li>Add the <a target="_blank" href="SoC/soc.html#SerialOutput">serial outupt</a>
|
||||||
|
support to romstage
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Enable <a target="_blank" href="fsp1_1.html#corebootFspDebugging">coreboot/FSP</a> debugging</li>
|
||||||
|
<li>Determine the <a target="_blank" href="SoC/soc.html#PreviousSleepState">Previous Sleep State</a></li>
|
||||||
|
<li>Enable DRAM:
|
||||||
|
<ol type="A">
|
||||||
|
<li>Implement the SoC
|
||||||
|
<a target="_blank" href="SoC/soc.html#MemoryInit">MemoryInit</a>
|
||||||
|
Support
|
||||||
|
</li>
|
||||||
|
<li>Implement the board support to read the
|
||||||
|
<a target="_blank" href="Board/board.html#SpdData">Memory Timing Data</a>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Disable the
|
||||||
|
<a target="_blank" href="SoC/soc.html#DisableShadowRom">Shadow ROM</a>
|
||||||
|
</li>
|
||||||
|
<li>Enable CONFIG_DISPLAY_MTRRS to verify the MTRR configuration</li>
|
||||||
|
<li>
|
||||||
|
Implement the .init routine for the
|
||||||
|
<a target="_blank" href="SoC/soc.html#ChipOperations">chip operations</a>
|
||||||
|
structure which calls FSP SiliconInit
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Start ramstage's
|
||||||
|
<a target="_blank" href="SoC/soc.html#DeviceTree">device tree processing</a>
|
||||||
|
to display the PCI vendor and device IDs
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Disable the
|
||||||
|
<a target="_blank" href="Board/board.html#DisablePciDevices">PCI devices</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Implement the
|
||||||
|
<a target="_blank" href="SoC/soc.html#MemoryMap">memory map</a>
|
||||||
|
</li>
|
||||||
|
<li>coreboot should now attempt to load the payload</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Add coreboot Features</h2>
|
||||||
|
<p>
|
||||||
|
Most of the coreboot development gets done in this phase. Implementation tasks in this
|
||||||
|
phase are easily done in parallel.
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Payload and OS Features:
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="SoC/soc.html#AcpiTables">ACPI Tables</a></li>
|
||||||
|
<li><a target="_blank" href="SoC/soc.html#LegacyHardware">Legacy hardware</a> support</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<table border="1">
|
||||||
|
<tr bgcolor="#c0ffc0">
|
||||||
|
<th colspan=3><h1>Features</h1></th>
|
||||||
|
</tr>
|
||||||
|
<tr bgcolor="#c0ffc0">
|
||||||
|
<th>SoC</th>
|
||||||
|
<th>Where</th>
|
||||||
|
<th>Testing</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>8254 Programmable Interval Timer</td>
|
||||||
|
<td><a target="_blank" href="SoC/soc.html#LegacyHardware">Legacy hardware</a> support</td>
|
||||||
|
<td><a target="_blank" href="SoC/quark.html#CorebootPayloadPkg">CorebootPayloadPkg</a> gets to shell prompt</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>8259 Programmable Interrupt Controller</td>
|
||||||
|
<td><a target="_blank" href="SoC/soc.html#LegacyHardware">Legacy hardware</a> support</td>
|
||||||
|
<td><a target="_blank" href="SoC/quark.html#CorebootPayloadPkg">CorebootPayloadPkg</a> gets to shell prompt</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Cache-as-RAM</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="SoC/soc.html#TempRamInit">Find</a>
|
||||||
|
FSP binary:
|
||||||
|
<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/cache_as_ram.inc;hb=HEAD#l38">cache_as_ram.inc</a><br>
|
||||||
|
Enable: FSP 1.1 <a target="_blank" href="SoC/soc.html#TempRamInit">TempRamInit</a>
|
||||||
|
called from
|
||||||
|
<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/cache_as_ram.inc;hb=HEAD#l73">cache_as_ram.inc</a><br>
|
||||||
|
Disable: FSP 1.1 TempRamExit called from
|
||||||
|
<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/after_raminit.S;hb=HEAD#l41">after_raminit.S</a><br>
|
||||||
|
</td>
|
||||||
|
<td>FindFSP: POST code 0x90
|
||||||
|
(<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l205">POST_FSP_TEMP_RAM_INIT</a>)
|
||||||
|
is displayed<br>
|
||||||
|
Enable: POST code
|
||||||
|
<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/cache_as_ram.inc;hb=HEAD#l151">0x2A</a>
|
||||||
|
is displayed<br>
|
||||||
|
Disable: CONFIG_DISPLAY_MTRRS=y, MTRRs displayed after call to TempRamExit
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Memory Map</td>
|
||||||
|
<td>
|
||||||
|
Implement a device driver for the
|
||||||
|
<a target="_blank" href="SoC/soc.html#MemoryMap">north cluster</a>
|
||||||
|
</td>
|
||||||
|
<td>coreboot displays the memory map correctly during the BS_WRITE_TABLES state</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>MTRRs</td>
|
||||||
|
<td>
|
||||||
|
Set values: src/drivers/intel/fsp1_1/stack.c/<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/stack.c;hb=HEAD#l42">setup_stack_and_mtrrs</a><br>
|
||||||
|
Load values: src/drivers/intel/fsp1_1/<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/after_raminit.S;hb=HEAD#l71">after_raminit.S</a>
|
||||||
|
</td>
|
||||||
|
<td>Set: Post code 0x91
|
||||||
|
(<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l213">POST_FSP_TEMP_RAM_EXIT</a>)
|
||||||
|
is displayed by
|
||||||
|
<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/after_raminit.S;hb=HEAD#l41">after_raminit.S</a><br>
|
||||||
|
Load: Post code 0x3C is displayed by
|
||||||
|
<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/after_raminit.S;hb=HEAD#l152">after_raminit.S</a><br>
|
||||||
|
and CONFIG_DISPLAY_MTRRS=y displays the correct memory regions</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>PCI Device Support</td>
|
||||||
|
<td>Implement a PCI <a target="_blank" href="SoC/soc.html#DeviceDrivers">device driver</a></td>
|
||||||
|
<td>The device is detected by coreboot and usable by the payload</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Ramstage state machine</td>
|
||||||
|
<td>
|
||||||
|
Implement the chip and domain operations to start the
|
||||||
|
<a target="_blank" href="SoC/soc.html#DeviceTree">device tree</a>
|
||||||
|
processing
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
During the BS_DEV_ENUMERATE state, ramstage now display the device IDs
|
||||||
|
for the PCI devices on the bus.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ROM Shadow<br>0x000E0000 - 0x000FFFFF</td>
|
||||||
|
<td>
|
||||||
|
Disable: src/soc/<Vendor>/<Chip Family>/romstage/romstage.c/<a target="_blank" href="SoC/soc.html#DisableShadowRom">soc_after_ram_init routine</a>
|
||||||
|
</td>
|
||||||
|
<td>Operates as RAM: Writes followed by a read to the 0x000E0000 - 0x000FFFFF region returns the value written</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr bgcolor="#c0ffc0">
|
||||||
|
<th>Board</th>
|
||||||
|
<th>Where</th>
|
||||||
|
<th>Testing</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Device Tree</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="SoC/soc.html#DeviceTree">List</a> PCI vendor and device IDs by starting
|
||||||
|
the device tree processing<br>
|
||||||
|
<a target="_blank" href="Board/board.html#DisablePciDevices">Disable</a> PCI devices<br>
|
||||||
|
Enable: Implement a PCI <a target="_blank" href="SoC/soc.html#DeviceDrivers">device driver</a>
|
||||||
|
<td>
|
||||||
|
List: BS_DEV_ENUMERATE state displays PCI vendor and device IDs<br>
|
||||||
|
Disable: BS_DEV_ENUMERATE state shows the devices as disabled<br>
|
||||||
|
Enable: BS_DEV_ENUMERATE state shows the device as on and the device works for the payload
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>DRAM</td>
|
||||||
|
<td>
|
||||||
|
Load SPD data: src/soc/mainboard/<Vendor>/<Board>/spd/<a target="_blank" href="Board/board.html#SpdData">spd.c</a><br>
|
||||||
|
UPD Setup:
|
||||||
|
<ul>
|
||||||
|
<li>src/soc<Vendor>//<Chip Family>/romstage/<a target="_blank" href="SoC/soc.html#MemoryInit">romstage.c</a></li>
|
||||||
|
<li>src/mainboard/<Vendor>/<Board>/<a target="_blank" href="Board/board.html#SpdData">romstage.c</a></li>
|
||||||
|
</ul>
|
||||||
|
FSP 1.1 MemoryInit called from src/drivers/intel/fsp1_1/<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/raminit.c;hb=HEAD#l126">raminit.c</a>
|
||||||
|
</td>
|
||||||
|
<td>Select the following Kconfig values
|
||||||
|
<ul>
|
||||||
|
<li>DISPLAY_HOBS</li>
|
||||||
|
<li>DISPLAY_UPD_DATA</li>
|
||||||
|
</ul>
|
||||||
|
Testing successful if:
|
||||||
|
<ul>
|
||||||
|
<li>MemoryInit UPD values are correct</li>
|
||||||
|
<li>MemoryInit returns 0 (success) and</li>
|
||||||
|
<li>The the message "ERROR - coreboot's requirements not met by FSP binary!"
|
||||||
|
is not displayed
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Serial Port</td>
|
||||||
|
<td>
|
||||||
|
SoC <a target="_blank" href="SoC/soc.html#SerialOutput">Support</a><br>
|
||||||
|
Enable: src/soc/mainboard/<Board>/com_init.c/<a target="_blank" href="Board/board.html#SerialOutput">car_mainboard_pre_console_init</a>
|
||||||
|
</td>
|
||||||
|
<td>Debug serial output works</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr bgcolor="#c0ffc0">
|
||||||
|
<th>Payload</th>
|
||||||
|
<th>Where</th>
|
||||||
|
<th>Testing</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ACPI Tables</td>
|
||||||
|
<td>
|
||||||
|
SoC <a target="_blank" href="SoC/soc.html#AcpiTables">Support</a><br>
|
||||||
|
</td>
|
||||||
|
<td>Verified by payload or OS</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr bgcolor="#c0ffc0">
|
||||||
|
<th>FSP</th>
|
||||||
|
<th>Where</th>
|
||||||
|
<th>Testing</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>TempRamInit</td>
|
||||||
|
<td>FSP <a target="_blank" href="SoC/soc.html#TempRamInit">TempRamInit</a></td>
|
||||||
|
<td>FSP binary found: POST code 0x90
|
||||||
|
(<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l205">POST_FSP_TEMP_RAM_INIT</a>)
|
||||||
|
is displayed<br>
|
||||||
|
TempRamInit successful: POST code
|
||||||
|
<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/cache_as_ram.inc;hb=HEAD#l151">0x2A</a>
|
||||||
|
is displayed<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>MemoryInit</td>
|
||||||
|
<td><a target="_blank" href="SoC/soc.html#MemoryInit">SoC</a> support<br>
|
||||||
|
<a target="_blank" href="Board/board.html#SpdData">Board</a> support<br>
|
||||||
|
</td>
|
||||||
|
<td>Select the following Kconfig values
|
||||||
|
<ul>
|
||||||
|
<li>DISPLAY_HOBS</li>
|
||||||
|
<li>DISPLAY_UPD_DATA</li>
|
||||||
|
</ul>
|
||||||
|
Testing successful if:
|
||||||
|
<ul>
|
||||||
|
<li>MemoryInit UPD values are correct</li>
|
||||||
|
<li>MemoryInit returns 0 (success) and</li>
|
||||||
|
<li>The the message "ERROR - coreboot's requirements not met by FSP binary!"
|
||||||
|
is not displayed
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>TempRamExit</td>
|
||||||
|
<td>src/drivers/intel/fsp1_1/<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/after_raminit.S;hb=HEAD#l51">after_raminit.S</a></td>
|
||||||
|
<td>Post code 0x91
|
||||||
|
(<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/include/console/post_codes.h;hb=HEAD#l212">POST_FSP_TEMP_RAM_EXIT</a>)
|
||||||
|
is displayed before calling TempRamExit by
|
||||||
|
<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/after_raminit.S;hb=HEAD#l141">after_raminit.S</a>,
|
||||||
|
CONFIG_DISPLAY_MTRRS=y displays the correct memory regions and
|
||||||
|
Post code 0x39 is displayed by
|
||||||
|
<a target="_blank" href="https://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/after_raminit.S;hb=HEAD#l141">after_raminit.S</a><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>SiliconInit</td>
|
||||||
|
<td>
|
||||||
|
Implement the .init routine for the
|
||||||
|
<a target="_blank" href="SoC/soc.html#ChipOperations">chip operations</a> structure
|
||||||
|
</td>
|
||||||
|
<td>During BS_DEV_INIT_CHIPS state, SiliconInit gets called and returns 0x00000000</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>FspNotify</td>
|
||||||
|
<td>
|
||||||
|
The code which calls FspNotify is located in
|
||||||
|
src/drivers/intel/fsp1_1/<a target="_blank" href="http://review.coreboot.org/gitweb?p=coreboot.git;a=blob;f=src/drivers/intel/fsp1_1/fsp_util.c;hb=HEAD#l182">fsp_util.c</a>.
|
||||||
|
The fsp_notify_boot_state_callback routine is called three times as specified
|
||||||
|
by the BOOT_STATE_INIT_ENTRY macros below the routine.
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
The FspNotify routines are called during:
|
||||||
|
<ul>
|
||||||
|
<li>BS_DEV_RESOURCES - on exit</li>
|
||||||
|
<li>BS_PAYLOAD_LOAD - on exit</li>
|
||||||
|
<li>BS_OS_RESUME - on entry (S3 resume)</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p>Modified: 4 March 2016</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
77
Documentation/Intel/fsp1_1.html
Normal file
77
Documentation/Intel/fsp1_1.html
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>FSP 1.1</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>x86 FSP 1.1 Integration</h1>
|
||||||
|
<p>
|
||||||
|
Firmware Support Package (FSP) integration requires System-on-a-Chip (SoC)
|
||||||
|
and board support. The combined steps are listed
|
||||||
|
<a target="_blank" href="development.html">here</a>.
|
||||||
|
The development steps for FSP are listed below:
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li><a href="#RequiredFiles">Required Files</a></li>
|
||||||
|
<li>Add the <a href="#FspBinary">FSP Binary File</a> to the coreboot File System</li>
|
||||||
|
<li>Enable <a href="#corebootFspDebugging">coreboot/FSP Debugging</a></li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
FSP Documentation:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Intel® Firmware Support Package External Architecture Specification <a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/fsp-architecture-spec-v1-1.pdf">V1.1</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="RequiredFiles">Required Files</a></h1>
|
||||||
|
<h2><a name="corebootRequiredFiles">coreboot Required Files</a></h2>
|
||||||
|
<ol>
|
||||||
|
<li>Create the following directories if they do not already exist:
|
||||||
|
<ul>
|
||||||
|
<li>src/vendorcode/intel/fsp/fsp1_1/<Chip Family></li>
|
||||||
|
<li>3rdparty/blobs/mainboard/<Board Vendor>/<Board Name></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
The following files may need to be copied from the FSP build or release into the
|
||||||
|
directories above if they are not present or are out of date:
|
||||||
|
<ul>
|
||||||
|
<li>FspUpdVpd.h: src/vendorcode/intel/fsp/fsp1_1/<Chip Family>/FspUpdVpd.h</li>
|
||||||
|
<li>FSP.bin: 3rdparty/blobs/mainboard/<Board Vendor>/<Board Name>/fsp.bin</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="FspBinary">Add the FSP Binary File to coreboot File System</a></h1>
|
||||||
|
<p>
|
||||||
|
Add the FSP binary to the coreboot flash image using the following command:
|
||||||
|
</p>
|
||||||
|
<pre><code>util/cbfstool/cbfstool build/coreboot.rom add -t fsp -n fsp.bin -b <base address> -f fsp.bin</code></pre>
|
||||||
|
<p>
|
||||||
|
This command relocates the FSP binary to the 4K byte aligned location in CBFS so that the
|
||||||
|
FSP code for TempRamInit may be executed in place.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="corebootFspDebugging">Enable coreboot/FSP Debugging</a></h1>
|
||||||
|
<p>
|
||||||
|
Set the following Kconfig values:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>CONFIG_DISPLAY_FSP_ENTRY_POINTS - Display the FSP entry points in romstage</li>
|
||||||
|
<li>CONFIG_DISPLAY_HOBS - Display and verify the hand-off-blocks (HOBs) returned by MemoryInit</li>
|
||||||
|
<li>CONFIG_DISPLAY_VBT - Display Video BIOS Table (VBT) used for GOP</li>
|
||||||
|
<li>CONFIG_DISPLAY_UPD_DATA - Display the user specified product data passed to MemoryInit and SiliconInit</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p>Modified: 17 May 2016</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
128
Documentation/Intel/index.html
Normal file
128
Documentation/Intel/index.html
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Intel® x86</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Intel® x86 Boards</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="Board/galileo.html">Galileo</a></li>
|
||||||
|
<li><a target="_blank" href="http://wiki.minnowboard.org/Coreboot">MinnowBoard MAX</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1>Intel® x86 SoCs</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="SoC/quark.html">Quark™</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1>x86 coreboot Development</h1>
|
||||||
|
<ul>
|
||||||
|
<li>Get the <a target="_blank" href="https://www.coreboot.org/Git">coreboot source</li>
|
||||||
|
<li><a target="_blank" href="development.html">Overall</a> development</li>
|
||||||
|
<li><a target="_blank" href="fsp1_1.html">FSP 1.1</a> integration
|
||||||
|
</li>
|
||||||
|
<li><a target="_blank" href="SoC/soc.html">SoC</a> support</li>
|
||||||
|
<li><a target="_blank" href="Board/board.html">Board</a> support</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1>Payload Development</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="SoC/quark.html#CorebootPayloadPkg">CorebootPayloadPkg</a>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process">EDK II Development Process</a></li>
|
||||||
|
<li>EDK II <a target="_blank" href="https://github.com/tianocore/tianocore.github.io/wiki/EDK%20II%20White%20papers">White Papers</a></li>
|
||||||
|
<li><a target="_blank" href="https://github.com/tianocore/tianocore.github.io/wiki/SourceForge-to-Github-Quick-Start">SourceForge to Github Quick Start</a></li>
|
||||||
|
<li>UEFI <a target="_blank" href="http://www.uefi.org/sites/default/files/resources/UEFI%20Spec%202_5_Errata_A.PDF">2.5 Errata A</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1><a name="Documentation">Documentation</a></h1>
|
||||||
|
<ul>
|
||||||
|
<li>Intel® 64 and IA-32 Architectures <a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Software Developer Manual</a></li>
|
||||||
|
<li><a target="_blank" href="http://www.uefi.org/specifications">UEFI Specifications</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2><a name="Edk2Documentation">EDK-II Documentation</a></h2>
|
||||||
|
<ul>
|
||||||
|
<li>Build <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/Build_Spec_1_26.pdf">V1.26</a></li>
|
||||||
|
<li>Coding Standards <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/CCS_2_1_Draft.pdf">V2.1</a></li>
|
||||||
|
<li>DEC <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/DEC_Spec_1_25.pdf">V1.25</a></li>
|
||||||
|
<li>DSC <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/DSC_Spec_1_26.pdf">V1.26</a></li>
|
||||||
|
<li><a target="_blank" href="https://github.com/tianocore/tianocore.github.io/wiki/UEFI-Driver-Writer's-Guide">Driver Writer's Guide</a></li>
|
||||||
|
<li>Expression Syntax <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/ExpressionSyntax_1.1.pdf">V1.1</a></li>
|
||||||
|
<li>FDF <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/FDF_Spec_1_26.pdf">V1.26</a></li>
|
||||||
|
<li>INF <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/INF_Spec_1_25.pdf">V1.25</a></li>
|
||||||
|
<li>PCD <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/PCD_Infrastructure.pdf">PCD</a>V0.55</li>
|
||||||
|
<li>UNI <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/UNI_File_Spec_v1_2_Errata_A.pdf">V1.2 Errata A</a></li>
|
||||||
|
<li>VRF <a target="_blank" href="https://github.com/tianocore-docs/Docs/raw/master/Specifications/VFR_1_9.pdf">V1.9</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2><a name="FspDocumentation">FSP Documentation</a></h2>
|
||||||
|
<ul>
|
||||||
|
<li>Intel® Firmware Support Package External Architecture Specification <a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/fsp-architecture-spec-v2.pdf">V2.0</a></li>
|
||||||
|
<li>Intel® Firmware Support Package External Architecture Specification <a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/fsp-architecture-spec-v1-1.pdf">V1.1</a></li>
|
||||||
|
<li>Intel® Firmware Support Package External Architecture Specification <a target="_blank" href="http://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/fsp-architecture-spec.pdf">V1.0</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2><a name="FeatureDocumentation">Feature Documentation</a></h2>
|
||||||
|
<table border="1">
|
||||||
|
<tr bgcolor="#c0ffc0"><th>Feature/Specification</th><th>Linux View/Test</th><th>EDK-II View/Test</th></tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="https://en.wikipedia.org/wiki/E820">e820</a></td>
|
||||||
|
<td><a target="_blank" href="http://manpages.ubuntu.com/manpages/trusty/man1/dmesg.1.html">dmesg</a></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="http://www.uefi.org/specifications">ACPI</a></td>
|
||||||
|
<td><a target="_blank" href="http://manpages.ubuntu.com/manpages/precise/man1/acpidump.1.html">acpidump</a></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="https://en.wikipedia.org/wiki/Extended_Display_Identification_Data">EDID</a></td>
|
||||||
|
<td><a target="_blank" href="http://manpages.ubuntu.com/manpages/trusty/man1/get-edid.1.html">get-edid | parse-edid</a></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="http://www.nxp.com/documents/user_manual/UM10204.pdf">I2C</a></td>
|
||||||
|
<td><a target="_blank" href="http://manpages.ubuntu.com/manpages/trusty/man1/get-edid.1.html">i2cdetect</a></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="http://www.intel.com/design/archives/processors/pro/docs/242016.htm">Multiprocessor</a></td>
|
||||||
|
<td><a target="_blank" href="http://manpages.ubuntu.com/manpages/trusty/man1/lscpu.1.html">lscpu</a></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="https://pcisig.com/specifications">PCI</a></td>
|
||||||
|
<td><a target="_blank" href="http://manpages.ubuntu.com/manpages/trusty/man8/lspci.8.html">lspci</a></td>
|
||||||
|
<td><a target="_blank" href="http://www.uefi.org/sites/default/files/resources/UEFI_Shell_Spec_2_0.pdf">pci</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.0.0.pdf">SMBIOS</a></td>
|
||||||
|
<td><a target="_blank" href="http://manpages.ubuntu.com/manpages/trusty/man8/dmidecode.8.html">dmidecode</a></td>
|
||||||
|
<td><a target="_blank" href="http://www.uefi.org/sites/default/files/resources/UEFI_Shell_Spec_2_0.pdf">smbiosview</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="http://www.usb.org/developers/docs/">USB</a></td>
|
||||||
|
<td><a target="_blank" href="http://manpages.ubuntu.com/manpages/xenial/man8/lsusb.8.html">lsusb</a></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p>Modified: 18 June 2016</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -13,7 +13,7 @@ Most Kconfig files set variables, which can be set as part of the Kconfig dialog
|
|||||||
|
|
||||||
For variables set by the user, see src/console/Kconfig.
|
For variables set by the user, see src/console/Kconfig.
|
||||||
|
|
||||||
For variables not set by the user, see src/mainboard/amd/serengeti\_cheetah/Kconfig. Users should never set such variables as the cache as ram base. These are highly mainboard dependent.
|
For variables not set by the user, see src/mainboard/amd/serengeti\_cheetah/Kconfig. Users should never set such variables as the cache as RAM base. These are highly mainboard dependent.
|
||||||
|
|
||||||
Kconfig files use the source command to include subdirectories. In most cases, save for limited cases described below, subdirectories have Kconfig files. They are always sourced unconditionally.
|
Kconfig files use the source command to include subdirectories. In most cases, save for limited cases described below, subdirectories have Kconfig files. They are always sourced unconditionally.
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ We define the common rules for which variation to use below.
|
|||||||
\subsection{object file specification}
|
\subsection{object file specification}
|
||||||
There are several different types of objects specified in the tree. They are:
|
There are several different types of objects specified in the tree. They are:
|
||||||
\begin{description}
|
\begin{description}
|
||||||
\item[obj]objects for the ram part of the code
|
\item[obj]objects for the RAM part of the code
|
||||||
\item[driver]drivers for the ram part. Drivers are not represented in the device tree but do have a driver struct attached in the driver section.
|
\item[driver]drivers for the RAM part. Drivers are not represented in the device tree but do have a driver struct attached in the driver section.
|
||||||
\item[initobj]seperately-compiled code for the ROM section of coreboot
|
\item[initobj]seperately-compiled code for the ROM section of coreboot
|
||||||
\end{description}
|
\end{description}
|
||||||
These items are specified via the -y syntax as well. Conditional object inclusion is done via the -\$(CONFIG\_VARIABLE) syntax.
|
These items are specified via the -y syntax as well. Conditional object inclusion is done via the -\$(CONFIG\_VARIABLE) syntax.
|
||||||
|
@ -172,7 +172,7 @@ A sample file:
|
|||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
target x
|
target x
|
||||||
|
|
||||||
# over-ride the default rom size in the mainboard file
|
# over-ride the default ROM size in the mainboard file
|
||||||
option CONFIG_ROM_SIZE=1024*1024
|
option CONFIG_ROM_SIZE=1024*1024
|
||||||
mainboard amd/solo
|
mainboard amd/solo
|
||||||
end
|
end
|
||||||
|
86
Documentation/build_system.md
Normal file
86
Documentation/build_system.md
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
# The coreboot build system
|
||||||
|
(this document is still incomplete and will be filled in over time)
|
||||||
|
|
||||||
|
## General operation
|
||||||
|
The coreboot build system is based on GNU make but extends it significantly
|
||||||
|
to the point of providing its own custom language.
|
||||||
|
The overhead of learning this new syntax is (hopefully) offset by its lower
|
||||||
|
complexity.
|
||||||
|
|
||||||
|
The build system is defined in the toplevel `Makefile` and `toolchain.inc`
|
||||||
|
and is supposed to be generic (and is in fact used with a number of other
|
||||||
|
projects). Project specific configuration should reside in files called
|
||||||
|
`Makefile.inc`.
|
||||||
|
|
||||||
|
In general, the build system provides a number of "classes" that describe
|
||||||
|
various parts of the build. These cover the various build targets in coreboot
|
||||||
|
such as the stages, subdirectories with more source code, and the general
|
||||||
|
addition of files.
|
||||||
|
|
||||||
|
Each class has a name (eg. `romstage`, `subdirs`, `cbfs-files`) and is used
|
||||||
|
by filling in a variable of that name followed by `-y` (eg. `romstage-y`,
|
||||||
|
`subdirs-y`, `cbfs-files-y`).
|
||||||
|
The `-y` suffix allows a simple interaction with our Kconfig build
|
||||||
|
configuration system: Kconfig options are available as variables starting
|
||||||
|
with a `CONFIG_` prefix and boolean options contain `y`, `n` or are empty.
|
||||||
|
|
||||||
|
This allows `class-$(CONFIG_FOO) += bar` to conditionally add `bar` to
|
||||||
|
`class` depending on the choice for `FOO`.
|
||||||
|
|
||||||
|
## classes
|
||||||
|
Classes can be defined as required. `subdirs` is handled internally since
|
||||||
|
it's parsed per subdirectory to add further directories to the rule set.
|
||||||
|
|
||||||
|
TODO: explain how to create new classes and how to evaluate them.
|
||||||
|
|
||||||
|
### subdirs
|
||||||
|
`subdirs` contains subdirectories (relative to the current directory) that
|
||||||
|
should also be handled by the build system. The build system expects these
|
||||||
|
directories to contain a file called `Makefile.inc`.
|
||||||
|
|
||||||
|
Subdirectories are not read at the point where the `subdirs` statement
|
||||||
|
resides but later, after the current directory is handled (and potentially
|
||||||
|
others, too).
|
||||||
|
|
||||||
|
### cbfs-files
|
||||||
|
This class is used to add files to the final CBFS image. Since several more
|
||||||
|
options need to be maintained than can comfortably fit in that single
|
||||||
|
variable, additional variables are used.
|
||||||
|
|
||||||
|
`cbfs-files-y` contains the file name used in the CBFS image (called `foo`
|
||||||
|
here). Additional options are added in `foo-$(option)` variables. The
|
||||||
|
supported options are:
|
||||||
|
|
||||||
|
* `file`: The on-disk file to add as `foo` (required)
|
||||||
|
* `type`: The file type. Can be `raw`, `stage`, `payload`, and `flat-binary`
|
||||||
|
(required)
|
||||||
|
* `compression`: Can be `none` or `lzma` (default: none)
|
||||||
|
* `position`: An absolute position constraint for the placement of the file
|
||||||
|
(default: none)
|
||||||
|
* `align`: Minimum alignment for the file (default: none)
|
||||||
|
* `options`: Additional cbfstool options (default: none)
|
||||||
|
|
||||||
|
`position` and `align` are mutually exclusive.
|
||||||
|
|
||||||
|
#### FMAP region support
|
||||||
|
With the addition of FMAP flash partitioning support to coreboot, there was a
|
||||||
|
need to extend the specification of files to provide more precise control
|
||||||
|
which regions should contain which files, and even change some flags based on
|
||||||
|
the region.
|
||||||
|
|
||||||
|
Since FMAP policies depend on features using FMAP, that's kept separate from
|
||||||
|
the cbfs-files class.
|
||||||
|
|
||||||
|
The `position` and `align` options for file `foo` can be overwritten for a
|
||||||
|
region `REGION` using `foo-REGION-position` and `foo-REGION-align`.
|
||||||
|
|
||||||
|
The regions that each file should end in can be defined by overriding a
|
||||||
|
function called `regions-for-file` that's called as
|
||||||
|
`$(call regions-for-file,$(filename))` and should return a comma-separated
|
||||||
|
list of regions, such as `REGION1,REGION2,REGION3`.
|
||||||
|
|
||||||
|
The default implementation just returns `COREBOOT` (the default region) for
|
||||||
|
all files.
|
||||||
|
|
||||||
|
vboot provides its own implementation of `regions-for-file` that can be used
|
||||||
|
as reference in `src/vboot/Makefile.inc`.
|
277
Documentation/gerrit_guidelines.md
Normal file
277
Documentation/gerrit_guidelines.md
Normal file
@ -0,0 +1,277 @@
|
|||||||
|
coreboot Gerrit Etiquette and Guidelines
|
||||||
|
========================================
|
||||||
|
|
||||||
|
The following rules are the requirements for behavior in the coreboot
|
||||||
|
codebase in gerrit. These have mainly been unwritten rules up to this
|
||||||
|
point, and should be familiar to most users who have been active in
|
||||||
|
coreboot for a period of time. Following these rules will help reduce
|
||||||
|
friction in the community.
|
||||||
|
|
||||||
|
Note that as with many rules, there are exceptions. Some have been noted
|
||||||
|
in the 'More Detail' section. If you feel there is an exception not listed
|
||||||
|
here, please discuss it in the mailing list to get this document updated.
|
||||||
|
Don't just assume that it's okay, even if someone on IRC says it is.
|
||||||
|
|
||||||
|
|
||||||
|
Summary:
|
||||||
|
--------
|
||||||
|
These are the expectations for committing, reviewing, and submitting code
|
||||||
|
into coreboot git and gerrit. While breaking individual rules may not have
|
||||||
|
immediate consequences, the coreboot leadership may act on repeated or
|
||||||
|
flagrant violations with or without notice.
|
||||||
|
|
||||||
|
* Don't violate the licenses.
|
||||||
|
* Let non-trivial patches sit in a review state for at least 24 hours
|
||||||
|
before submission.
|
||||||
|
* Try to coordinate with platform maintainers when making changes to
|
||||||
|
platforms.
|
||||||
|
* If you give a patch a -2, you are responsible for giving concrete
|
||||||
|
recommendations for what could be changed to resolve the issue the patch
|
||||||
|
addresses.
|
||||||
|
* Don't modify other people's patches without their consent.
|
||||||
|
* Be respectful to others when commenting.
|
||||||
|
* Don’t submit patches that you know will break other platforms.
|
||||||
|
|
||||||
|
|
||||||
|
More detail:
|
||||||
|
------------
|
||||||
|
* Don't violate the licenses. If you're submitting code that you didn't
|
||||||
|
write yourself, make sure the license is compatible with the license of the
|
||||||
|
project you're submitting the changes to. If you’re submitting code that
|
||||||
|
you wrote that might be owned by your employer, make sure that your
|
||||||
|
employer is aware and you are authorized to submit the code. For
|
||||||
|
clarification, see the Developer's Certificate of Origin in the coreboot
|
||||||
|
[Signed-off-by policy](http://www.coreboot.org/Development_Guidelines#Sign-off_Procedure).
|
||||||
|
|
||||||
|
* Let non-trivial patches sit in a review state for at least 24 hours
|
||||||
|
before submission. Remember that there are coreboot developers in timezones
|
||||||
|
all over the world, and everyone should have a chance to contribute.
|
||||||
|
Trivial patches would be things like whitespace changes or spelling fixes.
|
||||||
|
In general, small changes that don’t impact the final binary output. The
|
||||||
|
24-hour period would start at submission, and would be restarted at any
|
||||||
|
update which significantly changes any part of the patch. Patches can be
|
||||||
|
'Fast-tracked' and submitted in under this 24 hour with the agreement of at
|
||||||
|
least 3 +2 votes.
|
||||||
|
|
||||||
|
* Do not +2 patches that you authored or own, even for something as trivial
|
||||||
|
as whitespace fixes. When working on your own patches, it’s easy to
|
||||||
|
overlook something like accidentally updating file permissions or git
|
||||||
|
submodule commit IDs. Let someone else review the patch. An exception to
|
||||||
|
this would be if two people worked in the patch together. If both +2 the
|
||||||
|
patch, that is acceptable, as each is giving a +2 to the other's work.
|
||||||
|
|
||||||
|
* Try to coordinate with platform maintainers and other significant
|
||||||
|
contributors to the code when making changes to platforms. The platform
|
||||||
|
maintainers are the users who initially pushed the code for that platform,
|
||||||
|
as well as users who have made significant changes to a platform. To find
|
||||||
|
out who maintains a piece of code, please use util/scripts/maintainers.go
|
||||||
|
or refer to the original author of the code in git log.
|
||||||
|
|
||||||
|
* If you give a patch a -2, you are responsible for giving concrete
|
||||||
|
recommendations for what could be changed to resolve the issue the patch
|
||||||
|
addresses. If you feel strongly that a patch should NEVER be merged, you
|
||||||
|
are responsible for defending your position and listening to other points
|
||||||
|
of view. Giving a -2 and walking away is not acceptable, and may cause your
|
||||||
|
-2 to be removed by the coreboot leadership after no less than a week. A
|
||||||
|
notification that the -2 will be removed unless there is a response will
|
||||||
|
be sent out at least 2 days before it is removed.
|
||||||
|
|
||||||
|
* Don't modify other people's patches unless you have coordinated this with
|
||||||
|
the owner of that patch. Not only is this considered rude, but your changes
|
||||||
|
could be unintentionally lost. An exception to this would be for patches
|
||||||
|
that have not been updated for more than 90 days. In that case, the patch
|
||||||
|
can be taken over if the original author does not respond to requests for
|
||||||
|
updates. Alternatively, a new patch can be pushed with the original
|
||||||
|
content, and both patches should be updated to reference the other.
|
||||||
|
|
||||||
|
* Be respectful to others when commenting on patches. Comments should
|
||||||
|
be kept to the code, and should be kept in a polite tone. We are a
|
||||||
|
worldwide community and English is a difficult language. Assume your
|
||||||
|
colleagues are intelligent and do not intend disrespect. Resist the urge to
|
||||||
|
retaliate against perceived verbal misconduct, such behavior is not
|
||||||
|
conducive to getting patches merged.
|
||||||
|
|
||||||
|
* Don’t submit code that you know will break other platforms. If your patch
|
||||||
|
affects code that is used by other platforms, it should be compatible with
|
||||||
|
those platforms. While it would be nice to update any other platforms, you
|
||||||
|
must at least provide a path that will allow other platforms to continue
|
||||||
|
working.
|
||||||
|
|
||||||
|
|
||||||
|
Recommendations for gerrit activity:
|
||||||
|
------------------------------------
|
||||||
|
These guidelines are less strict than the ones listed above. These are more
|
||||||
|
of the “good idea” variety. You are requested to follow the below
|
||||||
|
guidelines, but there will probably be no actual consequences if they’re
|
||||||
|
not followed. That said, following the recommendations below will speed up
|
||||||
|
review of your patches, and make the members of the community do less work.
|
||||||
|
|
||||||
|
* Each patch should be kept to one logical change, which should be
|
||||||
|
described in the title of the patch. Unrelated changes should be split out
|
||||||
|
into separate patches. Fixing whitespace on a line you’re editing is
|
||||||
|
reasonable. Fixing whitespace around the code you’re working on should be a
|
||||||
|
separate ‘cleanup’ patch. Larger patches that touch several areas are fine,
|
||||||
|
so long as they are one logical change. Adding new chips and doing code
|
||||||
|
cleanup over wide areas are two examples of this.
|
||||||
|
|
||||||
|
* Test your patches before submitting them to gerrit. It's also appreciated
|
||||||
|
if you add a line to the commit message describing how the patch was
|
||||||
|
tested. This prevents people from having to ask whether and how the patch
|
||||||
|
was tested. Examples of this sort of comment would be ‘TEST=Built
|
||||||
|
platform’ or ‘Tested by building and booting platform’. Stating that the
|
||||||
|
patch was not tested is also fine, although you might be asked to do some
|
||||||
|
testing in cases where that would be reasonable.
|
||||||
|
|
||||||
|
* Take advantage of the lint tools to make sure your patches don’t contain
|
||||||
|
trivial mistakes. By running ‘make gitconfig’, the lint-stable tools are
|
||||||
|
automatically put in place and will test your patches before they are
|
||||||
|
committed. As a violation of these tools will cause the jenkins build test
|
||||||
|
to fail, it’s to your advantage to test this before pushing to gerrit.
|
||||||
|
|
||||||
|
* Don't submit patch trains longer than around 20 patches unless you
|
||||||
|
understand how to manage long patch trains. Long patch trains can become
|
||||||
|
difficult to handle and tie up the build servers for long periods of time
|
||||||
|
if not managed well. Rebasing a patch train over and over as you fix
|
||||||
|
earlier patches in the train can hide comments, and make people review the
|
||||||
|
code multiple times to see if anything has changed between revisions. When
|
||||||
|
pushing long patch trains, it is recommended to only push the full patch
|
||||||
|
train once - the initial time, and only to rebase three or four patches at
|
||||||
|
a time.
|
||||||
|
|
||||||
|
* Run 'make what-jenkins-does' locally on patch trains before submitting.
|
||||||
|
This helps verify that the patch train won’t tie up the jenkins builders
|
||||||
|
for no reason if there are failing patches in the train. For running
|
||||||
|
parallel builds, you can specify the number of cores to use by setting the
|
||||||
|
the CPUS environment variable. Example:
|
||||||
|
make what-jenkins-does CPUS=8
|
||||||
|
|
||||||
|
* Use a topic when pushing a train of patches. This groups the commits
|
||||||
|
together so people can easily see the connection at the top level of
|
||||||
|
gerrit. Topics can be set for individual patches in gerrit by going into
|
||||||
|
the patch and clicking on the icon next to the topic line. Topics can also
|
||||||
|
be set when you push the patches into gerrit. For example, to push a set of
|
||||||
|
commits with the the i915-kernel-x60 set, use the command:
|
||||||
|
git push origin HEAD:refs/for/master/i915-kernel-x60
|
||||||
|
|
||||||
|
* If one of your patches isn't ready to be merged, make sure it's obvious
|
||||||
|
that you don't feel it's ready for merge yet. The preferred way to show
|
||||||
|
this is by marking in the commit message that it’s not ready until X. The
|
||||||
|
commit message can be updated easily when it’s ready to be pushed.
|
||||||
|
Examples of this are "WIP: title" or "[NEEDS_TEST]: title". Another way to
|
||||||
|
mark the patch as not ready would be to give it a -1 or -2 review, but
|
||||||
|
isn't as obvious as the commit message. These patches can also be pushed as
|
||||||
|
drafts as shown in the next guideline.
|
||||||
|
|
||||||
|
* When pushing patches that are not for submission, these should be marked
|
||||||
|
as such. This can be done in the title ‘[DONOTSUBMIT]’, or can be pushed as
|
||||||
|
draft commits, so that only explicitly added reviewers will see them. These
|
||||||
|
sorts of patches are frequently posted as ideas or RFCs for the community
|
||||||
|
to look at. To push a draft, use the command:
|
||||||
|
git push origin HEAD:refs/drafts/master
|
||||||
|
|
||||||
|
* Respond to anyone who has taken the time to review your patches, even if
|
||||||
|
it's just to say that you disagree. While it may seem annoying to address a
|
||||||
|
request to fix spelling or 'trivial' issues, it’s generally easy to handle
|
||||||
|
in gerrit’s built-in editor. If you do use the built-in editor, remember to
|
||||||
|
get that change to your local copy before re-pushing. It's also acceptable
|
||||||
|
to add fixes for these sorts of comments to another patch, but it's
|
||||||
|
recommended that that patch be pushed to gerrit before the initial patch
|
||||||
|
gets submitted.
|
||||||
|
|
||||||
|
* Consider breaking up large individual patches into smaller patches
|
||||||
|
grouped by areas. This makes the patches easier to review, but increases
|
||||||
|
the number of patches. The way you want to handle this is a personal
|
||||||
|
decision, as long as each patch is still one logical change.
|
||||||
|
|
||||||
|
* If you have an interest in a particular area or mainboard, set yourself
|
||||||
|
up as a ‘maintainer’ of that area by adding yourself to the MAINTAINERS
|
||||||
|
file in the coreboot root directory. Eventually, this should automatically
|
||||||
|
add you as a reviewer when an area that you’re listed as a maintainer is
|
||||||
|
changed.
|
||||||
|
|
||||||
|
* Submit mainboards that you’re working on to the board-status repo. This
|
||||||
|
helps others and shows that these mainboards are currently being
|
||||||
|
maintained. At some point, boards that are not up to date in the
|
||||||
|
board-status repo will probably end up getting removed from the coreboot
|
||||||
|
master branch.
|
||||||
|
|
||||||
|
* Abandon patches that are no longer useful, or that you don’t intend to
|
||||||
|
keep working on to get submitted.
|
||||||
|
|
||||||
|
* Bring attention to patches that you would like reviewed. Add reviewers,
|
||||||
|
ask for reviewers on IRC or even just rebase it against the current
|
||||||
|
codebase to bring it to the top of the gerrit list. If you’re not sure who
|
||||||
|
would be a good reviewer, look in the MAINTAINERS file or git history of
|
||||||
|
the files that you’ve changed, and add those people.
|
||||||
|
|
||||||
|
* Familiarize yourself with the coreboot [commit message
|
||||||
|
guidelines](http://www.coreboot.org/Git#Commit_messages), before pushing
|
||||||
|
patches. This will help to keep annoying requests to fix your commit
|
||||||
|
message to a minimum.
|
||||||
|
|
||||||
|
* If there have been comments or discussion on a patch, verify that the
|
||||||
|
comments have been addressed before giving a +2. If you feel that a comment
|
||||||
|
is invalid, please respond to that comment instead of just ignoring it.
|
||||||
|
|
||||||
|
* Be conscientious when reviewing patches. As a reviewer who approves (+2)
|
||||||
|
a patch, you are responsible for the patch and the effect it has on the
|
||||||
|
codebase. In the event that the patch breaks things, you are expected to
|
||||||
|
be actively involved in the cleanup effort. This means you shouldn’t +2 a
|
||||||
|
patch just because you trust the author of a patch - Make sure you
|
||||||
|
understand what the implications of a patch might be, or leave the review
|
||||||
|
to others. Partial reviews, reviewing code style, for example, can be given
|
||||||
|
a +1 instead of a +2. This also applies if you think the patch looks good,
|
||||||
|
but may not have the experience to know if there may be unintended
|
||||||
|
consequences.
|
||||||
|
|
||||||
|
* If there is still ongoing discussion to a patch, try to wait for a
|
||||||
|
conclusion to the discussion before submitting it to the tree. If you feel
|
||||||
|
that someone is just bikeshedding, maybe just state that and give a time
|
||||||
|
that the patch will be submitted if no new objections are raised.
|
||||||
|
|
||||||
|
* When working with patch trains, for minor requests it’s acceptable to
|
||||||
|
create a fix addressing a comment in another patch at the end of the patch
|
||||||
|
train. This minimizes rebases of the patch train while still addressing the
|
||||||
|
request. For major problems where the change doesn’t work as intended or
|
||||||
|
breaks other platforms, the change really needs to go into the original
|
||||||
|
patch.
|
||||||
|
|
||||||
|
* When bringing in a patch from another git repo, update the original
|
||||||
|
git/gerrit tags by prepending the lines with 'Original-'. Marking
|
||||||
|
the original text this way makes it much easier to tell what changes
|
||||||
|
happened in which repository. This applies to these lines, not the actual
|
||||||
|
commit message itself:
|
||||||
|
Commit-Id:
|
||||||
|
Change-Id:
|
||||||
|
Signed-off-by:
|
||||||
|
Reviewed-on:
|
||||||
|
Tested-by:
|
||||||
|
Reviewed-by:
|
||||||
|
The script 'util/gitconfig/rebase.sh' can be used to help automate this.
|
||||||
|
Other tags such as 'Commit-Queue' can simply be removed.
|
||||||
|
|
||||||
|
|
||||||
|
Expectations contributors should have:
|
||||||
|
--------------------------------------
|
||||||
|
* Don't expect that people will review your patch unless you ask them to.
|
||||||
|
Adding other people as reviewers is the easiest way. Asking for reviews for
|
||||||
|
individual patches in the IRC channel, or by sending a direct request to an
|
||||||
|
individual through your favorite messenger is usually the best way to get a
|
||||||
|
patch reviewed quickly.
|
||||||
|
|
||||||
|
* Don't expect that your patch will be submitted immediately after getting
|
||||||
|
a +2. As stated previously, non-trivial patches should wait at least 24
|
||||||
|
hours before being submitted. That said, if you feel that your patch or
|
||||||
|
series of patches has been sitting longer than needed, you can ask for it
|
||||||
|
to be submitted on IRC, or comment that it's ready for submission in the
|
||||||
|
patch. This will move it to the top of the list where it's more likely to
|
||||||
|
be noticed and acted upon.
|
||||||
|
|
||||||
|
* Reviews are about the code. It's easy to take it personally when someone
|
||||||
|
is criticising your code, but the whole idea is to get better code into our
|
||||||
|
codebase. Again, this also applies in the other direction: review code,
|
||||||
|
criticize code, but don’t make it personal.
|
||||||
|
|
||||||
|
|
||||||
|
Requests for clarification and suggestions for updates to these guidelines
|
||||||
|
should be sent to the coreboot mailing list at <coreboot@coreboot.org>.
|
26
Documentation/index.html
Normal file
26
Documentation/index.html
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>coreboot Documentation</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>coreboot Documentation</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="https://www.coreboot.org/Lesson1">Lesson 1</a></li>
|
||||||
|
<li><a href="gerrit_guidelines.md">Gerrit Guidelines</a></li>
|
||||||
|
<li><a href="timestamp.md">Timestamp</a></li>
|
||||||
|
<li>Documentation directory<a target="_blank" href=:https://review.coreboot.org/cgit/coreboot.git/tree/Documentation">listing</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h1>Chipset Documentation</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a target="_blank" href="Intel/index.html">Intel</a></li>
|
||||||
|
<li><a target="_blank" href="AMD-S3.txt">AMD S3</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p>Modified: 17 June 2016</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -12,10 +12,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
200
Documentation/timestamp.md
Normal file
200
Documentation/timestamp.md
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
Table of Contents
|
||||||
|
=================
|
||||||
|
Introduction
|
||||||
|
Transition from cache to cbmem
|
||||||
|
|
||||||
|
Data structures used
|
||||||
|
cache_state
|
||||||
|
table
|
||||||
|
entries
|
||||||
|
|
||||||
|
Function APIs
|
||||||
|
timestamp_init
|
||||||
|
timestamp_add
|
||||||
|
timestamp_add_now
|
||||||
|
timestamp_sync
|
||||||
|
|
||||||
|
Use / Test Cases
|
||||||
|
Case 1: Timestamp Region Exists
|
||||||
|
Case 2: No timestamp region, fresh boot, cbmem_initialize called after
|
||||||
|
timestamp_init
|
||||||
|
Case 3: No timestamp region, fresh boot, cbmem_initialize called before
|
||||||
|
timestamp_init
|
||||||
|
Case 4: No timestamp region, resume, cbmem_initialize called after
|
||||||
|
timestamp_init
|
||||||
|
Case 5: No timestamp region, resume, cbmem_initialize called before
|
||||||
|
timestamp_init
|
||||||
|
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
============
|
||||||
|
The aim of the timestamp library is to make it easier for different boards
|
||||||
|
to save timestamps in cbmem / stash (until cbmem is brought up) by
|
||||||
|
providing a simple API to initialize, add and sync timestamps. In order
|
||||||
|
to make the timestamps persistent and accessible from the kernel, we
|
||||||
|
need to ensure that all the saved timestamps end up in cbmem under
|
||||||
|
the CBMEM_ID_TIMESTAMP tag. However, until the cbmem area is available,
|
||||||
|
the timestamps can be saved to a SoC-defined \_timestamp region or in a
|
||||||
|
local stage-specific stash. The work of identifying the right location for
|
||||||
|
storing timestamps is done by the library and is not exposed to the user.
|
||||||
|
|
||||||
|
Working of timestamp library from a user perspective can be outlined in
|
||||||
|
the following steps:
|
||||||
|
1. Initialize the base time and reset cbmem timestamp area
|
||||||
|
2. Start adding timestamps
|
||||||
|
|
||||||
|
Behind the scenes, the timestamp library takes care of:
|
||||||
|
1. Identifying the correct location for storing timestamps (cbmem or timestamp
|
||||||
|
region or local stash).
|
||||||
|
2. Once cbmem is up, ensure that all timestamps are synced from timestamp
|
||||||
|
region or local stash into the cbmem area.
|
||||||
|
3. Add a new cbmem timestamp area based on whether a reset of the cbmem
|
||||||
|
timestamp region is required or not.
|
||||||
|
|
||||||
|
Transition from cache to cbmem
|
||||||
|
------------------------------
|
||||||
|
To move timestamps from the cache to cbmem (and initialize the cbmem area in
|
||||||
|
the first place), we use the CBMEM_INIT_HOOK infrastructure of coreboot.
|
||||||
|
|
||||||
|
When cbmem is initialized, the hook is called, which creates the area,
|
||||||
|
copies all timestamps to cbmem and disables the cache.
|
||||||
|
|
||||||
|
After such a transition, timestamp_init() must not be run again.
|
||||||
|
|
||||||
|
|
||||||
|
Data structures used
|
||||||
|
====================
|
||||||
|
The main structure that maintains information about the timestamp cache is:
|
||||||
|
struct __attribute__((__packed__)) timestamp_cache {
|
||||||
|
uint16_t cache_state;
|
||||||
|
struct timestamp_table table;
|
||||||
|
struct timestamp_entry entries[MAX_TIMESTAMP_CACHE];
|
||||||
|
};
|
||||||
|
|
||||||
|
cache_state
|
||||||
|
-----------
|
||||||
|
The state of the cache is maintained by cache_state attribute which can
|
||||||
|
be any one of the following:
|
||||||
|
|
||||||
|
enum {
|
||||||
|
TIMESTAMP_CACHE_UNINITIALIZED = 0,
|
||||||
|
TIMESTAMP_CACHE_INITIALIZED,
|
||||||
|
TIMESTAMP_CACHE_NOT_NEEDED,
|
||||||
|
};
|
||||||
|
|
||||||
|
By default, if the cache is stored in local stash (bss area), then
|
||||||
|
it will be reset to uninitialized state. However, if the cache is
|
||||||
|
stored in timestamp region, then it might have garbage in any of the
|
||||||
|
attributes. Thus, if the timestamp region is being used by any board, it is
|
||||||
|
initialized to default values by the library.
|
||||||
|
|
||||||
|
Once the cache is initialized, its state is set to
|
||||||
|
CACHE_INITIALIZED. Henceforth, the calls to cache i.e. timestamp_add
|
||||||
|
know that the state reflected is valid and timestamps can be directly
|
||||||
|
saved in the cache.
|
||||||
|
|
||||||
|
Once the cbmem area is up (i.e. call to timestamp_sync_cache_to_cbmem),
|
||||||
|
we do not need to store the timestamps in local stash / timestamp area
|
||||||
|
anymore. Thus, the cache state is set to CACHE_NOT_NEEDED, which allows
|
||||||
|
timestamp_add to store all timestamps directly into the cbmem area.
|
||||||
|
|
||||||
|
|
||||||
|
table
|
||||||
|
-----
|
||||||
|
This field is represented by a structure which provides overall
|
||||||
|
information about the entries in the timestamp area:
|
||||||
|
|
||||||
|
struct timestamp_table {
|
||||||
|
uint64_t base_time;
|
||||||
|
uint32_t max_entries;
|
||||||
|
uint32_t num_entries;
|
||||||
|
struct timestamp_entry entries[0]; /* Variable number of entries */
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
It indicates the base time for all timestamp entries, maximum number
|
||||||
|
of entries that can be stored, total number of entries that currently
|
||||||
|
exist and an entry structure to hold variable number of entries.
|
||||||
|
|
||||||
|
|
||||||
|
entries
|
||||||
|
-------
|
||||||
|
This field holds the details of each timestamp entry, upto a maximum
|
||||||
|
of MAX_TIMESTAMP_CACHE which is defined as 16 entries. Each entry is
|
||||||
|
defined by:
|
||||||
|
|
||||||
|
struct timestamp_entry {
|
||||||
|
uint32_t entry_id;
|
||||||
|
uint64_t entry_stamp;
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
entry_id holds the timestamp id corresponding to this entry and
|
||||||
|
entry_stamp holds the actual timestamp.
|
||||||
|
|
||||||
|
|
||||||
|
For timestamps stored in the cbmem area, a timestamp_table is allocated
|
||||||
|
with space for MAX_TIMESTAMPS equal to 30. Thus, the cbmem area holds
|
||||||
|
base_time, max_entries (which is 30), current number of entries and the
|
||||||
|
actual entries represented by timestamp_entry.
|
||||||
|
|
||||||
|
|
||||||
|
Function APIs
|
||||||
|
=============
|
||||||
|
|
||||||
|
timestamp_init
|
||||||
|
--------------
|
||||||
|
This function initializes the timestamp cache and should be run as early
|
||||||
|
as possible. On platforms with SRAM, this might mean in bootblock, on
|
||||||
|
x86 with its CAR backed memory in romstage, this means romstage before
|
||||||
|
memory init.
|
||||||
|
|
||||||
|
timestamp_add
|
||||||
|
-------------
|
||||||
|
This function accepts from user a timestamp id and time to record in the
|
||||||
|
timestamp table. It stores the entry in the appropriate table in cbmem
|
||||||
|
or _timestamp region or local stash.
|
||||||
|
|
||||||
|
|
||||||
|
timestamp_add_now
|
||||||
|
-----------------
|
||||||
|
This function calls timestamp_add with user-provided id and current time.
|
||||||
|
|
||||||
|
|
||||||
|
Use / Test Cases
|
||||||
|
================
|
||||||
|
|
||||||
|
The following cases have been considered while designing the timestamp
|
||||||
|
library. It is important to ensure that any changes made to this library satisfy
|
||||||
|
each of the following use cases:
|
||||||
|
|
||||||
|
Case 1: Timestamp Region Exists (Fresh Boot / Resume)
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
In this case, the library needs to call timestamp_init as early as possible to
|
||||||
|
enable the timestamp cache. Once cbmem is available, the values will be
|
||||||
|
transferred automatically.
|
||||||
|
|
||||||
|
All regions are automatically reset on initialization.
|
||||||
|
|
||||||
|
Case 2: No timestamp region, fresh boot, cbmem_initialize called after timestamp_init
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
timestamp_init will set up a local cache. cbmem must be initialized before that
|
||||||
|
cache vanishes - as happens when jumping to the next stage.
|
||||||
|
|
||||||
|
Case 3: No timestamp region, fresh boot, cbmem_initialize called before timestamp_init
|
||||||
|
--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
This case is not supported right now, just don't call timestamp_init after
|
||||||
|
cbmem_initialize. (Patches to make this more robust are welcome.)
|
||||||
|
|
||||||
|
Case 4: No timestamp region, resume, cbmem_initialize called after timestamp_init
|
||||||
|
---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
We always reset the cbmem region before using it, so pre-suspend timestamps
|
||||||
|
will be gone.
|
||||||
|
|
||||||
|
Case 5: No timestamp region, resume, cbmem_initialize called before timestamp_init
|
||||||
|
----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
We always reset the cbmem region before using it, so pre-suspend timestamps
|
||||||
|
will be gone.
|
353
MAINTAINERS
353
MAINTAINERS
@ -64,7 +64,7 @@ trivial patch so apply some common sense.
|
|||||||
|
|
||||||
Descriptions of section entries:
|
Descriptions of section entries:
|
||||||
|
|
||||||
M: Mail patches to: FullName <address@domain>
|
M: Maintainer: FullName <address@domain>
|
||||||
R: Designated reviewer: FullName <address@domain>
|
R: Designated reviewer: FullName <address@domain>
|
||||||
These reviewers should be CCed on patches.
|
These reviewers should be CCed on patches.
|
||||||
L: Mailing list that is relevant to this area
|
L: Mailing list that is relevant to this area
|
||||||
@ -121,31 +121,370 @@ Maintainers List (try to look for most precise areas first)
|
|||||||
|
|
||||||
RISC-V ARCHITECTURE
|
RISC-V ARCHITECTURE
|
||||||
M: Ronald Minnich <rminnich@gmail.com>
|
M: Ronald Minnich <rminnich@gmail.com>
|
||||||
|
M: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: src/arch/riscv
|
F: src/arch/riscv/
|
||||||
F: src/mainboard/emulation/qemu-riscv
|
F: src/soc/ucb/
|
||||||
|
F: src/mainboard/emulation/*-riscv/
|
||||||
|
|
||||||
|
POWER8 ARCHITECTURE
|
||||||
|
M: Ronald Minnich <rminnich@gmail.com>
|
||||||
|
M: Timothy Pearson <tpearson@raptorengineeringinc.com>
|
||||||
|
S: Maintained
|
||||||
|
F: src/arch/power8/
|
||||||
|
F: src/cpu/qemu-power8/
|
||||||
|
F: src/mainboard/emulation/qemu-power8/
|
||||||
|
|
||||||
|
LENOVO EC
|
||||||
|
M: Alexander Couzens <lynxis@fe80.eu>
|
||||||
|
S: Maintained
|
||||||
|
F: src/ec/lenovo/
|
||||||
|
|
||||||
|
LENOVO MAINBOARDS
|
||||||
|
M: Alexander Couzens <lynxis@fe80.eu>
|
||||||
|
M: Patrick Rudolph <siro@das-labor.org>
|
||||||
|
S: Maintained
|
||||||
|
F: src/mainboard/lenovo/
|
||||||
|
|
||||||
|
INTEL PINEVIEW CHIPSET
|
||||||
|
M: Damien Zammit <damien@zamaudio.com>
|
||||||
|
S: Maintained
|
||||||
|
F: src/northbridge/intel/pineview/
|
||||||
|
|
||||||
|
INTEL D510MO MAINBOARD
|
||||||
|
M: Damien Zammit <damien@zamaudio.com>
|
||||||
|
S: Maintained
|
||||||
|
F: src/mainboard/intel/d510mo
|
||||||
|
|
||||||
|
INTEL X4X CHIPSET
|
||||||
|
M: Damien Zammit <damien@zamaudio.com>
|
||||||
|
S: Maintained
|
||||||
|
F: src/northbridge/intel/x4x/
|
||||||
|
|
||||||
|
GIGABYTE GA-G41M-ES2L MAINBOARD
|
||||||
|
M: Damien Zammit <damien@zamaudio.com>
|
||||||
|
S: Maintained
|
||||||
|
F: src/mainboard/gigabyte/ga-g41m-es2l
|
||||||
|
|
||||||
GOOGLE PANTHER MAINBOARD
|
GOOGLE PANTHER MAINBOARD
|
||||||
M: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
M: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
||||||
S: Supported
|
S: Supported
|
||||||
F: src/mainboard/google/panther
|
F: src/mainboard/google/panther/
|
||||||
|
|
||||||
|
INTEL MINNOWBOARD MAX MAINBOARD
|
||||||
|
M: Huang Jin <huang.jin@intel.com>
|
||||||
|
M: York Yang <york.yang@intel.com>
|
||||||
|
M: Martin Roth <gaumless@gmail.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/mainboard/intel/minnowmax/
|
||||||
|
|
||||||
|
INTEL FSP BAYTRAIL CHIP & CRBs
|
||||||
|
M: Huang Jin <huang.jin@intel.com>
|
||||||
|
M: York Yang <york.yang@intel.com>
|
||||||
|
M: Martin Roth <gaumless@gmail.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/soc/intel/fsp_baytrail/
|
||||||
|
F: src/vendorcode/intel/fsp1_0/baytrail/
|
||||||
|
F: src/mainboard/intel/bakersport_fsp/
|
||||||
|
F: src/mainboard/intel/bayleybay_fsp/
|
||||||
|
|
||||||
|
INTEL FSP BROADWELL-DE SOC & CRB
|
||||||
|
M: York Yang <york.yang@intel.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/soc/intel/fsp_broadwell_de/
|
||||||
|
F: src/vendorcode/intel/fsp1_0/broadwell_de/
|
||||||
|
F: src/mainboard/intel/camelbackmountain_fsp/
|
||||||
|
|
||||||
|
INTEL FSP IVYBRIDGE/PANTHERPOINT/CAVECREEK & CRBs
|
||||||
|
M: York Yang <york.yang@intel.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/cpu/intel/fsp_model_206ax/
|
||||||
|
F: src/northbridge/intel/fsp_sandybridge/
|
||||||
|
F: src/southbridge/intel/fsp_bd82x6x/
|
||||||
|
F: src/southbridge/intel/fsp_i89xx/
|
||||||
|
F: src/vendorcode/intel/fsp1_0/ivybridge_bd82x6x
|
||||||
|
F: src/vendorcode/intel/fsp1_0/ivybridge_i89xx
|
||||||
|
F: src/mainboard/intel/cougar_canyon2/
|
||||||
|
F: src/mainboard/intel/stargo2/
|
||||||
|
|
||||||
|
FSP 1.0 RANGELEY & CRB
|
||||||
|
M: David Guckian <david.guckian@intel.com>
|
||||||
|
M: Fei Wang <fei.z.wang@intel.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/cpu/intel/fsp_model_406dx/
|
||||||
|
F: src/northbridge/intel/fsp_rangeley/
|
||||||
|
F: src/southbridge/intel/fsp_rangeley/
|
||||||
|
F: src/vendorcode/intel/fsp1_0/rangeley/
|
||||||
|
F: src/mainboard/intel/mohonpeak/
|
||||||
|
|
||||||
|
INTEL LITTLE PLAINS MAINBOARD
|
||||||
|
M: Marcin Wojciechowski <marcin.wojciechowski@intel.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/mainboard/intel/littleplains/
|
||||||
|
|
||||||
|
INTEL FSP 1.0
|
||||||
|
M: Huang Jin <huang.jin@intel.com>
|
||||||
|
M: York Yang <york.yang@intel.com>
|
||||||
|
M: Martin Roth <gaumless@gmail.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/drivers/intel/fsp1_0/
|
||||||
|
|
||||||
|
INTEL FSP 1.1
|
||||||
|
M: Lee Leahy <leroy.p.leahy@intel.com>
|
||||||
|
M: Andrey Petrov <andrey.petrov@intel.com>
|
||||||
|
M: Huang Jin <huang.jin@intel.com>
|
||||||
|
M: York Yang <york.yang@intel.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/drivers/intel/fsp1_1/
|
||||||
|
|
||||||
|
INTEL FSP 2.0
|
||||||
|
M: Andrey Petrov <andrey.petrov@intel.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/drivers/intel/fsp2_0/
|
||||||
|
|
||||||
|
INTEL STRAGO MAINBOARD
|
||||||
|
M: Hannah Williams <hannah.williams@intel.com>
|
||||||
|
S: Supported
|
||||||
|
F: /src/mainboard/intel/strago/
|
||||||
|
|
||||||
|
INTEL BRASWELL SOC
|
||||||
|
M: Hannah Williams <hannah.williams@intel.com>
|
||||||
|
S: Supported
|
||||||
|
F: /src/soc/intel/braswell
|
||||||
|
F: /src/vendorcode/intel/fsp/fsp1_1/braswell
|
||||||
|
|
||||||
|
INTEL APOLLOLAKE_SOC
|
||||||
|
M: Andrey Petrov <andrey.petrov@intel.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/soc/intel/apollolake/
|
||||||
|
|
||||||
|
ASUS KFSN4-DRE & KFSN4-DRE_K8 MAINBOARDS
|
||||||
|
M: Timothy Pearson <tpearson@raptorengineeringinc.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/mainboard/asus/kfsn4-dre/
|
||||||
|
F: src/mainboard/asus/kfsn4-dre_k8/
|
||||||
|
|
||||||
|
ASUS KCMA-D8 MAINBOARD
|
||||||
|
M: Timothy Pearson <tpearson@raptorengineeringinc.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/mainboard/asus/kcma-d8/
|
||||||
|
|
||||||
|
ASUS KGPE-D16 MAINBOARD
|
||||||
|
M: Timothy Pearson <tpearson@raptorengineeringinc.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/mainboard/asus/kgpe-d16/
|
||||||
|
|
||||||
|
AMD FAMILY10H & FAMILY15H (NON-AGESA) CPUS & NORTHBRIDGE
|
||||||
|
M: Timothy Pearson <tpearson@raptorengineeringinc.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/cpu/amd/family_10h-family_15h/
|
||||||
|
F: src/northbridge/amd/amdfam10/
|
||||||
|
F: src/northbridge/amd/amdmct/
|
||||||
|
F: src/northbridge/amd/amdht/
|
||||||
|
|
||||||
|
AMD SB700 (NON-CIMX) SOUTHBRIDGE
|
||||||
|
M: Timothy Pearson <tpearson@raptorengineeringinc.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/southbridge/amd/sb700/
|
||||||
|
|
||||||
|
AMD SR5650 SOUTHBRIDGE
|
||||||
|
M: Timothy Pearson <tpearson@raptorengineeringinc.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/southbridge/amd/sr5650/
|
||||||
|
|
||||||
|
ASPEED AST2050 DRIVER & COMMON CODE
|
||||||
|
M: Timothy Pearson <tpearson@raptorengineeringinc.com>
|
||||||
|
S: Supported
|
||||||
|
F: src/drivers/aspeed/common/
|
||||||
|
F: src/drivers/aspeed/ast2050/
|
||||||
|
|
||||||
ATI MACH64 Driver
|
ATI MACH64 Driver
|
||||||
S: Orphan
|
S: Orphan
|
||||||
F: drivers/ati/mach64
|
F: src/drivers/ati/mach64/
|
||||||
|
|
||||||
|
ABUILD
|
||||||
|
M: Patrick Georgi <patrick@georgi-clan.de>
|
||||||
|
S: Supported
|
||||||
|
F: util/abuild/
|
||||||
|
|
||||||
|
ACPI
|
||||||
|
F: src/acpi/
|
||||||
|
F: src/arch/x86/acpi/
|
||||||
|
F: util/acpi/
|
||||||
|
|
||||||
|
ARM ARCHITECTURE
|
||||||
|
F: src/arch/arm/
|
||||||
|
F: src/arch/arm64
|
||||||
|
F: src/cpu/allwinner/
|
||||||
|
F: src/cpu/armltd/
|
||||||
|
F: src/cpu/samsung/
|
||||||
|
F: src/cpu/ti/
|
||||||
|
F: src/soc/broadcom/
|
||||||
|
F: src/soc/marvell/
|
||||||
|
F: src/soc/nvidia/
|
||||||
|
F: src/soc/qualcomm/
|
||||||
|
F: src/soc/rockchip/
|
||||||
|
F: src/soc/samsung/
|
||||||
|
F: util/arm_boot_tools/
|
||||||
|
F: util/broadcom/
|
||||||
|
F: util/exynos/
|
||||||
|
F: util/ipqheader/
|
||||||
|
F: util/nvidia/
|
||||||
|
F: util/rockchip/
|
||||||
|
|
||||||
|
MIPS ARCHITECTURE
|
||||||
|
F: src/arch/mips/
|
||||||
|
F: src/cpu/mips/
|
||||||
|
F: src/soc/imgtec/
|
||||||
|
F: util/bimgtool/
|
||||||
|
|
||||||
|
X86 ARCHITECTURE
|
||||||
|
F: src/arch/x86/
|
||||||
|
F: src/cpu/x86/
|
||||||
|
F: src/drivers/pc80/
|
||||||
|
F: src/include/pc80/
|
||||||
|
F: src/include/cpu/x86/
|
||||||
|
|
||||||
|
INTEL SUPPORT
|
||||||
|
M: Patrick Rudolph <siro@das-labor.org>
|
||||||
|
S: Maintained
|
||||||
|
F: src/vendorcode/intel/
|
||||||
|
F: src/cpu/intel/
|
||||||
|
F: src/northbridge/intel/
|
||||||
|
F: src/southbridge/intel/
|
||||||
|
F: src/soc/intel/
|
||||||
|
F: src/drivers/intel/
|
||||||
|
F: src/include/cpu/intel/
|
||||||
|
|
||||||
|
AMD SUPPORT
|
||||||
|
F: src/vendorcode/amd/
|
||||||
|
F: src/cpu/amd/
|
||||||
|
F: src/northbridge/amd/
|
||||||
|
F: src/southbridge/amd/
|
||||||
|
F: src/include/cpu/amd/
|
||||||
|
|
||||||
|
VIA SUPPORT
|
||||||
|
F: src/cpu/via/
|
||||||
|
F: src/northbridge/via/
|
||||||
|
F: src/southbridge/via/
|
||||||
|
|
||||||
LINT SCRIPTS
|
LINT SCRIPTS
|
||||||
M: Patrick Georgi <patrick@georgi-clan.de>
|
M: Patrick Georgi <patrick@georgi-clan.de>
|
||||||
|
M: Martin Roth <gaumless@gmail.com>
|
||||||
S: Supported
|
S: Supported
|
||||||
F: util/lint/
|
F: util/lint/
|
||||||
|
|
||||||
|
INTELTOOL
|
||||||
|
M: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
||||||
|
F: util/inteltool/
|
||||||
|
|
||||||
|
INTELMETOOL
|
||||||
|
M: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
|
||||||
|
F: util/intelmetool/
|
||||||
|
|
||||||
|
IFDTOOL
|
||||||
|
M: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
||||||
|
F: util/ifdtool/
|
||||||
|
F: util/ifdfake/
|
||||||
|
|
||||||
BUILD SYSTEM
|
BUILD SYSTEM
|
||||||
M: Patrick Georgi <patrick@georgi-clan.de>
|
M: Patrick Georgi <patrick@georgi-clan.de>
|
||||||
|
M: Martin Roth <gaumless@gmail.com>
|
||||||
S: Supported
|
S: Supported
|
||||||
F: Makefile
|
F: Makefile
|
||||||
F: *.inc
|
F: *.inc
|
||||||
F: util/kconfig
|
F: src/include/kconfig.h
|
||||||
F: util/sconfig
|
F: util/kconfig/
|
||||||
|
F: util/sconfig/
|
||||||
|
|
||||||
|
BOARD STATUS
|
||||||
|
M: Martin Roth <gaumless@gmail.com>
|
||||||
|
S: Supported
|
||||||
|
F: util/board_status/
|
||||||
|
|
||||||
|
BINARY OBJECTS
|
||||||
|
F: 3rdparty/blobs/
|
||||||
|
|
||||||
|
VERIFIED BOOT
|
||||||
|
F: 3rdparty/vboot/
|
||||||
|
F: src/vendorcode/google/chromeos/
|
||||||
|
F: src/include/tpm.h
|
||||||
|
F: src/include/tpm_lite/
|
||||||
|
|
||||||
|
RESOURCE ALLOCATOR
|
||||||
|
F: src/device/*
|
||||||
|
F: src/include/device/
|
||||||
|
F: src/include/cpu/cpu.h
|
||||||
|
|
||||||
|
OPTION ROM EXECUTION & X86EMU
|
||||||
|
F: src/device/oprom/
|
||||||
|
|
||||||
|
CBFS
|
||||||
|
F: src/include/cbfs.h
|
||||||
|
F: src/include/cbfs_serialized.h
|
||||||
|
F: util/cbfstool/
|
||||||
|
|
||||||
|
CBMEM
|
||||||
|
F: src/include/cbmem.h
|
||||||
|
F: src/include/cbmem_id.h
|
||||||
|
F: util/cbmem/
|
||||||
|
|
||||||
|
CONSOLE
|
||||||
|
F: src/console/
|
||||||
|
F: src/include/console/
|
||||||
|
F: src/drivers/uart/
|
||||||
|
|
||||||
|
NVRAM
|
||||||
|
F: util/nvramtool/
|
||||||
|
F: util/optionlist/
|
||||||
|
F: payloads/nvramcui/
|
||||||
|
|
||||||
|
LIBPAYLOAD
|
||||||
|
F: payloads/libpayload/
|
||||||
|
|
||||||
|
BAYOU PAYLOAD
|
||||||
|
F: payloads/bayou/
|
||||||
|
|
||||||
|
COREINFO PAYLOAD
|
||||||
|
F: payloads/coreinfo/
|
||||||
|
|
||||||
|
EXTERNAL PAYLOADS INTEGRATION
|
||||||
|
M: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
||||||
|
M: Martin Roth <gaumless@gmail.com>
|
||||||
|
F: payloads/external
|
||||||
|
|
||||||
|
VERIFIED BOOT 2
|
||||||
|
M: Aaron Durbin <adurbin@chromium.org>
|
||||||
|
F: src/vendorcode/google/chromeos/vboot2/
|
||||||
|
|
||||||
|
TPM SUPPORT
|
||||||
|
M: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
|
||||||
|
F: src/drivers/*/tpm/
|
||||||
|
F: src/security/tpm12/
|
||||||
|
F: src/security/tpm20/
|
||||||
|
F: util/tss-generator/
|
||||||
|
|
||||||
|
MISSING: TIMERS / DELAYS
|
||||||
|
|
||||||
|
MISSING: TIMESTAMPS
|
||||||
|
|
||||||
|
MISSING: MEMLAYOUT
|
||||||
|
|
||||||
|
MISSING: FMAP
|
||||||
|
|
||||||
|
MISSING: GPIO
|
||||||
|
|
||||||
|
MISSING: SMP
|
||||||
|
|
||||||
|
MISSING: SUPERIOS
|
||||||
|
|
||||||
|
MISSING: DMP / QEMU-X86
|
||||||
|
|
||||||
|
MISSING: ELOG
|
||||||
|
|
||||||
|
MISSING: GENERIC DRAM (should drop)
|
||||||
|
|
||||||
|
MISSING: SPI
|
||||||
|
|
||||||
THE REST
|
THE REST
|
||||||
M: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
M: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
||||||
|
163
Makefile
163
Makefile
@ -32,11 +32,13 @@
|
|||||||
|
|
||||||
# in addition to the dependency below, create the file if it doesn't exist
|
# in addition to the dependency below, create the file if it doesn't exist
|
||||||
# to silence stupid warnings about a file that would be generated anyway.
|
# to silence stupid warnings about a file that would be generated anyway.
|
||||||
$(if $(wildcard .xcompile),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile)))
|
$(if $(wildcard .xcompile),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile || rm -f .xcompile)))
|
||||||
|
|
||||||
.xcompile: util/xcompile/xcompile
|
.xcompile: util/xcompile/xcompile
|
||||||
|
rm -f $@
|
||||||
$< $(XGCCPATH) > $@.tmp
|
$< $(XGCCPATH) > $@.tmp
|
||||||
\mv -f $@.tmp $@ 2> /dev/null
|
\mv -f $@.tmp $@ 2> /dev/null
|
||||||
|
rm -f $@.tmp
|
||||||
|
|
||||||
export top := $(CURDIR)
|
export top := $(CURDIR)
|
||||||
export src := src
|
export src := src
|
||||||
@ -55,6 +57,7 @@ export KCONFIG_DEPENDENCIES := $(obj)/auto.conf.cmd
|
|||||||
export KCONFIG_SPLITCONFIG := $(obj)/config
|
export KCONFIG_SPLITCONFIG := $(obj)/config
|
||||||
export KCONFIG_TRISTATE := $(obj)/tristate.conf
|
export KCONFIG_TRISTATE := $(obj)/tristate.conf
|
||||||
export KCONFIG_NEGATIVES := 1
|
export KCONFIG_NEGATIVES := 1
|
||||||
|
export KCONFIG_STRICT := 1
|
||||||
|
|
||||||
# directory containing the toplevel Makefile.inc
|
# directory containing the toplevel Makefile.inc
|
||||||
TOPLEVEL := .
|
TOPLEVEL := .
|
||||||
@ -62,7 +65,7 @@ TOPLEVEL := .
|
|||||||
CONFIG_SHELL := sh
|
CONFIG_SHELL := sh
|
||||||
KBUILD_DEFCONFIG := configs/defconfig
|
KBUILD_DEFCONFIG := configs/defconfig
|
||||||
UNAME_RELEASE := $(shell uname -r)
|
UNAME_RELEASE := $(shell uname -r)
|
||||||
DOTCONFIG ?= .config
|
DOTCONFIG ?= $(top)/.config
|
||||||
KCONFIG_CONFIG = $(DOTCONFIG)
|
KCONFIG_CONFIG = $(DOTCONFIG)
|
||||||
export KCONFIG_CONFIG
|
export KCONFIG_CONFIG
|
||||||
HAVE_DOTCONFIG := $(wildcard $(DOTCONFIG))
|
HAVE_DOTCONFIG := $(wildcard $(DOTCONFIG))
|
||||||
@ -79,7 +82,7 @@ endif
|
|||||||
# Disable implicit/built-in rules to make Makefile errors fail fast.
|
# Disable implicit/built-in rules to make Makefile errors fail fast.
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
||||||
HOSTCC := gcc
|
HOSTCC := $(if $(shell type gcc 2>/dev/null),gcc,cc)
|
||||||
HOSTCXX = g++
|
HOSTCXX = g++
|
||||||
HOSTCFLAGS := -g
|
HOSTCFLAGS := -g
|
||||||
HOSTCXXFLAGS := -g
|
HOSTCXXFLAGS := -g
|
||||||
@ -91,6 +94,21 @@ DOXYGEN_OUTPUT_DIR := doxygen
|
|||||||
|
|
||||||
all: real-all
|
all: real-all
|
||||||
|
|
||||||
|
help_coreboot help::
|
||||||
|
@echo '*** coreboot platform targets ***'
|
||||||
|
@echo ' Use "make [target] V=1" for extra build debug information'
|
||||||
|
@echo ' all - Build coreboot'
|
||||||
|
@echo ' clean - Remove coreboot build artifacts'
|
||||||
|
@echo ' distclean - Remove build artifacts and config files'
|
||||||
|
@echo ' doxygen - Build doxygen documentation for coreboot'
|
||||||
|
@echo ' what-jenkins-does - Run platform build tests (Use CPUS=# for more cores)'
|
||||||
|
@echo ' printall - print makefile info for debugging'
|
||||||
|
@echo ' lint / lint-stable - run coreboot lint tools (all / minimal)'
|
||||||
|
@echo ' gitconfig - set up git to submit patches to coreboot'
|
||||||
|
@echo ' ctags / ctags-project - make ctags file for all of coreboot or current board'
|
||||||
|
@echo ' cscope / cscope-project - make cscope.out file for coreboot or current board'
|
||||||
|
@echo
|
||||||
|
|
||||||
# This include must come _before_ the pattern rules below!
|
# This include must come _before_ the pattern rules below!
|
||||||
# Order _does_ matter for pattern rules.
|
# Order _does_ matter for pattern rules.
|
||||||
include $(srck)/Makefile
|
include $(srck)/Makefile
|
||||||
@ -104,7 +122,7 @@ ifeq ($(strip $(HAVE_DOTCONFIG)),)
|
|||||||
NOCOMPILE:=1
|
NOCOMPILE:=1
|
||||||
endif
|
endif
|
||||||
ifneq ($(MAKECMDGOALS),)
|
ifneq ($(MAKECMDGOALS),)
|
||||||
ifneq ($(filter %config %clean cross% lint% what-jenkins-does,$(MAKECMDGOALS)),)
|
ifneq ($(filter %config %clean cross% clang iasl gnumake lint% help% what-jenkins-does,$(MAKECMDGOALS)),)
|
||||||
NOCOMPILE:=1
|
NOCOMPILE:=1
|
||||||
endif
|
endif
|
||||||
ifeq ($(MAKECMDGOALS), %clean)
|
ifeq ($(MAKECMDGOALS), %clean)
|
||||||
@ -114,13 +132,20 @@ endif
|
|||||||
|
|
||||||
ifeq ($(NOCOMPILE),1)
|
ifeq ($(NOCOMPILE),1)
|
||||||
include $(TOPLEVEL)/Makefile.inc
|
include $(TOPLEVEL)/Makefile.inc
|
||||||
|
include $(TOPLEVEL)/payloads/Makefile.inc
|
||||||
real-all: config
|
real-all: config
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
include $(HAVE_DOTCONFIG)
|
include $(DOTCONFIG)
|
||||||
|
|
||||||
include .xcompile
|
-include .xcompile
|
||||||
|
|
||||||
|
ifneq ($(XCOMPILE_COMPLETE),1)
|
||||||
|
$(shell rm -f .xcompile)
|
||||||
|
$(error .xcompile deleted because it's invalid. \
|
||||||
|
Restarting the build should fix that, or explain the problem)
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_MMX),y)
|
ifneq ($(CONFIG_MMX),y)
|
||||||
CFLAGS_x86_32 += -mno-mmx
|
CFLAGS_x86_32 += -mno-mmx
|
||||||
@ -128,7 +153,8 @@ endif
|
|||||||
|
|
||||||
include toolchain.inc
|
include toolchain.inc
|
||||||
|
|
||||||
strip_quotes = $(subst ",,$(subst \",,$(1)))
|
strip_quotes = $(strip $(subst ",,$(subst \",,$(1))))
|
||||||
|
# fix makefile syntax highlighting after strip macro \" "))
|
||||||
|
|
||||||
# The primary target needs to be here before we include the
|
# The primary target needs to be here before we include the
|
||||||
# other files
|
# other files
|
||||||
@ -138,7 +164,7 @@ real-all: real-target
|
|||||||
# must come rather early
|
# must come rather early
|
||||||
.SECONDEXPANSION:
|
.SECONDEXPANSION:
|
||||||
|
|
||||||
$(obj)/config.h:
|
$(KCONFIG_AUTOHEADER): $(KCONFIG_CONFIG)
|
||||||
$(MAKE) oldconfig
|
$(MAKE) oldconfig
|
||||||
|
|
||||||
# Add a new class of source/object files to the build system
|
# Add a new class of source/object files to the build system
|
||||||
@ -156,6 +182,34 @@ add-special-class= \
|
|||||||
$(eval $(1):=) \
|
$(eval $(1):=) \
|
||||||
$(eval special-classes+=$(1))
|
$(eval special-classes+=$(1))
|
||||||
|
|
||||||
|
# Converts one or more source file paths to their corresponding build/ paths.
|
||||||
|
# Only .ads, adb, .c and .S get converted to .o, other files (like .ld) keep
|
||||||
|
# their name.
|
||||||
|
# $1 stage name
|
||||||
|
# $2 file path (list)
|
||||||
|
src-to-obj=\
|
||||||
|
$(patsubst $(obj)/%,$(obj)/$(1)/%,\
|
||||||
|
$(patsubst $(obj)/$(1)/%,$(obj)/%,\
|
||||||
|
$(patsubst src/%,$(obj)/%,\
|
||||||
|
$(patsubst %.ads,%.o,\
|
||||||
|
$(patsubst %.adb,%.o,\
|
||||||
|
$(patsubst %.c,%.o,\
|
||||||
|
$(patsubst %.S,%.o,\
|
||||||
|
$(subst .$(1),,$(2)))))))))
|
||||||
|
|
||||||
|
# Converts one or more source file paths to the corresponding build/ paths
|
||||||
|
# of their Ada library information (.ali) files.
|
||||||
|
# $1 stage name
|
||||||
|
# $2 file path (list)
|
||||||
|
src-to-ali=\
|
||||||
|
$(patsubst $(obj)/%,$(obj)/$(1)/%,\
|
||||||
|
$(patsubst $(obj)/$(1)/%,$(obj)/%,\
|
||||||
|
$(patsubst src/%,$(obj)/%,\
|
||||||
|
$(patsubst %.ads,%.ali,\
|
||||||
|
$(patsubst %.adb,%.ali,\
|
||||||
|
$(subst .$(1),,\
|
||||||
|
$(filter %.ads %.adb,$(2))))))))
|
||||||
|
|
||||||
# Clean -y variables, include Makefile.inc
|
# Clean -y variables, include Makefile.inc
|
||||||
# Add paths to files in X-y to X-srcs
|
# Add paths to files in X-y to X-srcs
|
||||||
# Add subdirs-y to subdirs
|
# Add subdirs-y to subdirs
|
||||||
@ -191,13 +245,22 @@ endif
|
|||||||
# Eliminate duplicate mentions of source files in a class
|
# Eliminate duplicate mentions of source files in a class
|
||||||
$(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs))))
|
$(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs))))
|
||||||
|
|
||||||
# Converts one or more source file paths to their corresponding build/ paths.
|
# To track dependencies, we need all Ada specification (.ads) files in
|
||||||
# Only .c and .S get converted to .o, other files (like .ld) keep their name.
|
# *-srcs. Extract / filter all specification files that have a matching
|
||||||
# $1 stage name
|
# body (.adb) file here (specifications without a body are valid sources
|
||||||
# $2 file path (list)
|
# in Ada).
|
||||||
src-to-obj=$(foreach file,$(2),$(subst .$(1),,$(basename $(patsubst src/%,$(obj)/%,$(file)))).$(1)$(patsubst %.c,%.o,$(patsubst %.S,%.o,$(suffix $(file)))))
|
$(foreach class,$(classes),$(eval $(class)-extra-specs := \
|
||||||
|
$(filter \
|
||||||
|
$(addprefix %/,$(patsubst %.adb,%.ads,$(notdir $(filter %.adb,$($(class)-srcs))))), \
|
||||||
|
$(filter %.ads,$($(class)-srcs)))))
|
||||||
|
$(foreach class,$(classes),$(eval $(class)-srcs := \
|
||||||
|
$(filter-out $($(class)-extra-specs),$($(class)-srcs))))
|
||||||
|
|
||||||
$(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class),$($(class)-srcs))))
|
$(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class),$($(class)-srcs))))
|
||||||
|
$(foreach class,$(classes),$(eval $(class)-alis:=$(call src-to-ali,$(class),$($(class)-srcs))))
|
||||||
|
|
||||||
|
# For Ada includes
|
||||||
|
$(foreach class,$(classes),$(eval $(class)-ada-dirs:=$(sort $(dir $(filter %.ads %.adb,$($(class)-srcs)) $($(class)-extra-specs)))))
|
||||||
|
|
||||||
# Save all objs before processing them (for dependency inclusion)
|
# Save all objs before processing them (for dependency inclusion)
|
||||||
originalobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))
|
originalobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))
|
||||||
@ -210,6 +273,17 @@ allsrcs:=$(foreach var, $(addsuffix -srcs,$(classes)), $($(var)))
|
|||||||
allobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))
|
allobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))
|
||||||
alldirs:=$(sort $(abspath $(dir $(allobjs))))
|
alldirs:=$(sort $(abspath $(dir $(allobjs))))
|
||||||
|
|
||||||
|
# Reads dependencies from an Ada library information (.ali) file
|
||||||
|
# Only basenames (with suffix) are preserved so we have to look the
|
||||||
|
# paths up in $($(stage)-srcs).
|
||||||
|
# $1 stage name
|
||||||
|
# $2 ali file
|
||||||
|
create_ada_deps=$$(if $(2),\
|
||||||
|
gnat.adc \
|
||||||
|
$$(filter \
|
||||||
|
$$(addprefix %/,$$(shell sed -ne's/^D \([^\t]\+\).*$$$$/\1/p' $(2) 2>/dev/null)), \
|
||||||
|
$$($(1)-srcs) $$($(1)-extra-specs)))
|
||||||
|
|
||||||
# macro to define template macros that are used by use_template macro
|
# macro to define template macros that are used by use_template macro
|
||||||
define create_cc_template
|
define create_cc_template
|
||||||
# $1 obj class
|
# $1 obj class
|
||||||
@ -218,9 +292,13 @@ define create_cc_template
|
|||||||
# $4 additional dependencies
|
# $4 additional dependencies
|
||||||
ifn$(EMPTY)def $(1)-objs_$(2)_template
|
ifn$(EMPTY)def $(1)-objs_$(2)_template
|
||||||
de$(EMPTY)fine $(1)-objs_$(2)_template
|
de$(EMPTY)fine $(1)-objs_$(2)_template
|
||||||
$$(call src-to-obj,$1,$$(1).$2): $$(1).$2 $(obj)/config.h $(4)
|
$$(call src-to-obj,$1,$$(1).$2): $$(1).$2 $$(call create_ada_deps,$1,$$(call src-to-ali,$1,$$(1).$2)) $(KCONFIG_AUTOHEADER) $(4)
|
||||||
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
|
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
|
||||||
$(CC_$(1)) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -MT $$$$(@) $(3) -c -o $$$$@ $$$$<
|
$(CC_$(1)) \
|
||||||
|
$$(if $$(filter-out ads adb,$(2)), \
|
||||||
|
-MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -MT $$$$(@), \
|
||||||
|
$$$$(ADAFLAGS_$(1)) $$$$(addprefix -I,$$$$($(1)-ada-dirs))) \
|
||||||
|
$(3) -c -o $$$$@ $$$$<
|
||||||
en$(EMPTY)def
|
en$(EMPTY)def
|
||||||
end$(EMPTY)if
|
end$(EMPTY)if
|
||||||
endef
|
endef
|
||||||
@ -235,22 +313,59 @@ $(foreach class,$(classes), \
|
|||||||
foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(basename $(file)))))
|
foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(basename $(file)))))
|
||||||
$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))
|
$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))
|
||||||
|
|
||||||
|
# To supported complex package initializations, we need to call the
|
||||||
|
# emitted code explicitly. gnatbind gathers all the calls for us
|
||||||
|
# and exports them as a procedure $(stage)_adainit(). Every stage that
|
||||||
|
# uses Ada code has to call it!
|
||||||
|
define gnatbind_template
|
||||||
|
# $1 class
|
||||||
|
$$(obj)/$(1)/b__$(1).adb: $$$$(filter-out $$(obj)/$(1)/b__$(1).ali,$$$$($(1)-alis))
|
||||||
|
@printf " BIND $$(subst $$(obj)/,,$$@)\n"
|
||||||
|
# We have to give gnatbind a simple filename (without leading
|
||||||
|
# path components) so just cd there.
|
||||||
|
cd $$(dir $$@) && \
|
||||||
|
$$(GNATBIND_$(1)) -a -n \
|
||||||
|
--RTS=$$(absobj)/libgnat-$$(ARCH-$(1)-y)/ \
|
||||||
|
-L$(1)_ada -o $$(notdir $$@) \
|
||||||
|
$$(subst $$(dir $$@),,$$^)
|
||||||
|
$$(obj)/$(1)/b__$(1).o: $$(obj)/$(1)/b__$(1).adb
|
||||||
|
@printf " CC $$(subst $$(obj)/,,$$@)\n"
|
||||||
|
$(CC_$(1)) $$(ADAFLAGS_$(1)) -c -o $$@ $$<
|
||||||
|
$(1)-objs += $$(obj)/$(1)/b__$(1).o
|
||||||
|
$($(1)-alis): %.ali: %.o ;
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(foreach class,$(filter-out libgnat-%,$(classes)), \
|
||||||
|
$(if $($(class)-alis),$(call gnatbind_template,$(class)))))
|
||||||
|
|
||||||
DEPENDENCIES += $(addsuffix .d,$(basename $(allobjs)))
|
DEPENDENCIES += $(addsuffix .d,$(basename $(allobjs)))
|
||||||
-include $(DEPENDENCIES)
|
-include $(DEPENDENCIES)
|
||||||
|
|
||||||
printall:
|
printall:
|
||||||
@$(foreach class,$(classes),echo $(class)-objs:=$($(class)-objs); )
|
@$(foreach class,$(classes), echo $(class)-objs: $($(class)-objs) | tr ' ' '\n'; echo; )
|
||||||
@echo alldirs:=$(alldirs)
|
@echo alldirs: $(alldirs) | tr ' ' '\n'; echo
|
||||||
@echo allsrcs=$(allsrcs)
|
@echo allsrcs: $(allsrcs) | tr ' ' '\n'; echo
|
||||||
@echo DEPENDENCIES=$(DEPENDENCIES)
|
@echo DEPENDENCIES: $(DEPENDENCIES) | tr ' ' '\n'; echo
|
||||||
@$(foreach class,$(special-classes),echo $(class):='$($(class))'; )
|
@$(foreach class,$(special-classes),echo $(class):'$($(class))' | tr ' ' '\n'; echo; )
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef NOMKDIR
|
ifndef NOMKDIR
|
||||||
$(shell mkdir -p $(KCONFIG_SPLITCONFIG) $(objk)/lxdialog $(additional-dirs) $(alldirs))
|
$(shell mkdir -p $(KCONFIG_SPLITCONFIG) $(objk)/lxdialog $(additional-dirs) $(alldirs))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
$(obj)/project_filelist.txt: all
|
||||||
|
find $(obj) -name "*.d" -exec cat {} \; | \
|
||||||
|
sed 's/[:\\]/ /g' | sed 's/ /\n/g' | sort | uniq | \
|
||||||
|
grep -v '\.o$$' > $(obj)/project_filelist.txt
|
||||||
|
|
||||||
|
#works with either exuberant ctags or ctags.emacs
|
||||||
|
ctags-project: clean-ctags $(obj)/project_filelist.txt
|
||||||
|
cat $(obj)/project_filelist.txt | \
|
||||||
|
xargs ctags -o tags
|
||||||
|
|
||||||
|
cscope-project: clean-cscope $(obj)/project_filelist.txt
|
||||||
|
cat $(obj)/project_filelist.txt | xargs cscope -b
|
||||||
|
|
||||||
cscope:
|
cscope:
|
||||||
cscope -bR
|
cscope -bR
|
||||||
|
|
||||||
@ -274,7 +389,11 @@ clean: clean-for-update clean-target
|
|||||||
clean-cscope:
|
clean-cscope:
|
||||||
rm -f cscope.out
|
rm -f cscope.out
|
||||||
|
|
||||||
distclean: clean
|
clean-ctags:
|
||||||
|
rm -f tags
|
||||||
|
|
||||||
|
distclean: clean clean-ctags clean-cscope distclean-payloads
|
||||||
rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile
|
rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile
|
||||||
|
|
||||||
.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean doxygen doxy doxygen_simple
|
.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean doxygen doxy doxygen_simple
|
||||||
|
.PHONY: ctags-project cscope-project clean-ctags
|
||||||
|
835
Makefile.inc
835
Makefile.inc
File diff suppressed because it is too large
Load Diff
14
README
14
README
@ -41,15 +41,22 @@ For details please consult:
|
|||||||
Build Requirements
|
Build Requirements
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
* gcc / g++
|
|
||||||
* make
|
* make
|
||||||
|
* gcc / g++
|
||||||
|
Because Linux distribution compilers tend to use lots of patches. coreboot
|
||||||
|
does lots of "unusual" things in its build system, some of which break due
|
||||||
|
to those patches, sometimes by gcc aborting, sometimes - and that's worse -
|
||||||
|
by generating broken object code.
|
||||||
|
Two options: use our toolchain (eg. make crosstools-i386) or enable the
|
||||||
|
ANY_TOOLCHAIN Kconfig option if you're feeling lucky (no support in this
|
||||||
|
case).
|
||||||
|
* iasl (for targets with ACPI support)
|
||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
|
|
||||||
* doxygen (for generating/viewing documentation)
|
* doxygen (for generating/viewing documentation)
|
||||||
* iasl (for targets with ACPI support)
|
|
||||||
* gdb (for better debugging facilities on some targets)
|
* gdb (for better debugging facilities on some targets)
|
||||||
* ncurses (for 'make menuconfig')
|
* ncurses (for 'make menuconfig' and 'make nconfig')
|
||||||
* flex and bison (for regenerating parsers)
|
* flex and bison (for regenerating parsers)
|
||||||
|
|
||||||
|
|
||||||
@ -95,4 +102,3 @@ were derived from other projects, other (GPL-compatible) licenses may apply.
|
|||||||
Please check the individual source files for details.
|
Please check the individual source files for details.
|
||||||
|
|
||||||
This makes the resulting coreboot images licensed under the GPL, version 2.
|
This makes the resulting coreboot images licensed under the GPL, version 2.
|
||||||
|
|
||||||
|
40
gnat.adc
Normal file
40
gnat.adc
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
--
|
||||||
|
-- This file is part of the coreboot project.
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; version 2 of the License.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
|
||||||
|
pragma Restrictions (No_Access_Subprograms);
|
||||||
|
pragma Restrictions (No_Allocators);
|
||||||
|
pragma Restrictions (No_Calendar);
|
||||||
|
pragma Restrictions (No_Dispatch);
|
||||||
|
pragma Restrictions (No_Exception_Handlers);
|
||||||
|
pragma Restrictions (No_Fixed_Point);
|
||||||
|
pragma Restrictions (No_Floating_Point);
|
||||||
|
pragma Restrictions (No_Implicit_Dynamic_Code);
|
||||||
|
pragma Restrictions (No_Implicit_Heap_Allocations);
|
||||||
|
pragma Restrictions (No_Implicit_Loops);
|
||||||
|
pragma Restrictions (No_Initialize_Scalars);
|
||||||
|
pragma Restrictions (No_IO);
|
||||||
|
pragma Restrictions (No_Local_Allocators);
|
||||||
|
pragma Restrictions (No_Recursion);
|
||||||
|
pragma Restrictions (No_Secondary_Stack);
|
||||||
|
pragma Restrictions (No_Streams);
|
||||||
|
pragma Restrictions (No_Tasking);
|
||||||
|
pragma Restrictions (No_Unchecked_Access);
|
||||||
|
pragma Restrictions (No_Unchecked_Deallocation);
|
||||||
|
pragma Restrictions (No_Wide_Characters);
|
||||||
|
pragma Restrictions (Static_Storage_Size);
|
||||||
|
pragma Assertion_Policy
|
||||||
|
(Statement_Assertions => Disable,
|
||||||
|
Pre => Disable,
|
||||||
|
Post => Disable);
|
||||||
|
pragma Overflow_Mode (General => Strict, Assertions => Eliminated);
|
||||||
|
pragma SPARK_Mode (On);
|
126
payloads/Kconfig
Normal file
126
payloads/Kconfig
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
menu "Payload"
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Add a payload"
|
||||||
|
default PAYLOAD_NONE if !ARCH_X86
|
||||||
|
default PAYLOAD_SEABIOS if ARCH_X86
|
||||||
|
|
||||||
|
config PAYLOAD_NONE
|
||||||
|
bool "None"
|
||||||
|
help
|
||||||
|
Select this option if you want to create an "empty" coreboot
|
||||||
|
ROM image for a certain mainboard, i.e. a coreboot ROM image
|
||||||
|
which does not yet contain a payload.
|
||||||
|
|
||||||
|
For such an image to be useful, you have to use 'cbfstool'
|
||||||
|
to add a payload to the ROM image later.
|
||||||
|
|
||||||
|
config PAYLOAD_ELF
|
||||||
|
bool "An ELF executable payload"
|
||||||
|
help
|
||||||
|
Select this option if you have a payload image (an ELF file)
|
||||||
|
which coreboot should run as soon as the basic hardware
|
||||||
|
initialization is completed.
|
||||||
|
|
||||||
|
You will be able to specify the location and file name of the
|
||||||
|
payload image later.
|
||||||
|
|
||||||
|
config PAYLOAD_BAYOU
|
||||||
|
bool "Bayou"
|
||||||
|
help
|
||||||
|
Select this option if you want to set bayou as your primary
|
||||||
|
payload.
|
||||||
|
|
||||||
|
source "payloads/external/*/Kconfig.name"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
source "payloads/external/*/Kconfig"
|
||||||
|
|
||||||
|
source "payloads/bayou/Kconfig"
|
||||||
|
|
||||||
|
config PAYLOAD_FILE
|
||||||
|
string "Payload path and filename"
|
||||||
|
depends on PAYLOAD_ELF
|
||||||
|
default "payload.elf"
|
||||||
|
help
|
||||||
|
The path and filename of the ELF executable file to use as payload.
|
||||||
|
|
||||||
|
# TODO: Defined if no payload? Breaks build?
|
||||||
|
config COMPRESSED_PAYLOAD_LZMA
|
||||||
|
bool "Use LZMA compression for payloads"
|
||||||
|
default y
|
||||||
|
depends on !PAYLOAD_NONE && !PAYLOAD_LINUX
|
||||||
|
help
|
||||||
|
In order to reduce the size payloads take up in the ROM chip
|
||||||
|
coreboot can compress them using the LZMA algorithm.
|
||||||
|
|
||||||
|
config PAYLOAD_OPTIONS
|
||||||
|
string
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Additional cbfstool options for the payload
|
||||||
|
|
||||||
|
config PAYLOAD_IS_FLAT_BINARY
|
||||||
|
def_bool n
|
||||||
|
help
|
||||||
|
Add the payload to cbfs as a flat binary type instead of as an
|
||||||
|
elf payload
|
||||||
|
|
||||||
|
menu "Secondary Payloads"
|
||||||
|
|
||||||
|
config COREINFO_SECONDARY_PAYLOAD
|
||||||
|
bool "Load coreinfo as a secondary payload"
|
||||||
|
default n
|
||||||
|
depends on ARCH_X86
|
||||||
|
help
|
||||||
|
coreinfo can be loaded as a secondary payload under SeaBIOS, GRUB,
|
||||||
|
or any other payload that can load additional payloads.
|
||||||
|
|
||||||
|
config MEMTEST_SECONDARY_PAYLOAD
|
||||||
|
bool "Load Memtest86+ as a secondary payload"
|
||||||
|
default n
|
||||||
|
depends on ARCH_X86
|
||||||
|
help
|
||||||
|
Memtest86+ can be loaded as a secondary payload under SeaBIOS, GRUB,
|
||||||
|
or any other payload that can load additional payloads.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Memtest86+ version"
|
||||||
|
default MEMTEST_STABLE
|
||||||
|
depends on MEMTEST_SECONDARY_PAYLOAD
|
||||||
|
|
||||||
|
config MEMTEST_STABLE
|
||||||
|
bool "Stable"
|
||||||
|
help
|
||||||
|
Stable Memtest86+ version.
|
||||||
|
|
||||||
|
For reproducible builds, this option must be selected.
|
||||||
|
config MEMTEST_MASTER
|
||||||
|
bool "Master"
|
||||||
|
help
|
||||||
|
Newest Memtest86+ version.
|
||||||
|
|
||||||
|
This option will fetch the newest version of the Memtest86+ code,
|
||||||
|
updating as new changes are committed. This makes the build
|
||||||
|
non-reproducible, as it can fetch different code each time.
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config NVRAMCUI_SECONDARY_PAYLOAD
|
||||||
|
bool "Load nvramcui as a secondary payload"
|
||||||
|
default n
|
||||||
|
depends on ARCH_X86
|
||||||
|
help
|
||||||
|
nvramcui can be loaded as a secondary payload under SeaBIOS, GRUB,
|
||||||
|
or any other payload that can load additional payloads.
|
||||||
|
|
||||||
|
config TINT_SECONDARY_PAYLOAD
|
||||||
|
bool "Load tint as a secondary payload"
|
||||||
|
default n
|
||||||
|
depends on ARCH_X86
|
||||||
|
help
|
||||||
|
tint can be loaded as a secondary payload under SeaBIOS, GRUB,
|
||||||
|
or any other payload that can load additional payloads.
|
||||||
|
|
||||||
|
endmenu # "Secondary Payloads"
|
||||||
|
endmenu
|
50
payloads/Makefile.inc
Normal file
50
payloads/Makefile.inc
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
##
|
||||||
|
## This file is part of the coreboot project.
|
||||||
|
##
|
||||||
|
## Copyright (C) 2016 Google Inc.
|
||||||
|
##
|
||||||
|
## This program is free software; you can redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation; version 2 of the License.
|
||||||
|
##
|
||||||
|
## This program is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
|
||||||
|
cbfs-files-$(CONFIG_COREINFO_SECONDARY_PAYLOAD) += img/coreinfo
|
||||||
|
img/coreinfo-file := payloads/coreinfo/build/coreinfo.elf
|
||||||
|
img/coreinfo-type := payload
|
||||||
|
|
||||||
|
cbfs-files-$(CONFIG_NVRAMCUI_SECONDARY_PAYLOAD) += img/nvramcui
|
||||||
|
img/nvramcui-file := payloads/nvramcui/nvramcui.elf
|
||||||
|
img/nvramcui-type := payload
|
||||||
|
|
||||||
|
PAYLOADS_LIST=\
|
||||||
|
payloads/coreinfo \
|
||||||
|
payloads/nvramcui \
|
||||||
|
payloads/libpayload \
|
||||||
|
payloads/external/depthcharge \
|
||||||
|
payloads/external/SeaBIOS \
|
||||||
|
payloads/external/U-Boot \
|
||||||
|
payloads/external/Memtest86Plus \
|
||||||
|
payloads/external/iPXE \
|
||||||
|
payloads/external/tint
|
||||||
|
|
||||||
|
payloads/coreinfo/build/coreinfo.elf coreinfo:
|
||||||
|
$(MAKE) -C payloads/coreinfo defaultbuild
|
||||||
|
|
||||||
|
payloads/nvramcui/nvramcui.elf nvramcui:
|
||||||
|
$(MAKE) -C payloads/nvramcui
|
||||||
|
|
||||||
|
clean-payloads:
|
||||||
|
$(foreach payload, $(PAYLOADS_LIST), $(MAKE) -C $(payload) clean; )
|
||||||
|
|
||||||
|
distclean-payloads:
|
||||||
|
$(foreach payload, $(PAYLOADS_LIST), $(MAKE) -C $(payload) distclean; )
|
||||||
|
|
||||||
|
print-repo-info-payloads:
|
||||||
|
-$(foreach payload, $(PAYLOADS_LIST), $(MAKE) -C $(payload) print-repo-info 2>/dev/null; )
|
||||||
|
|
||||||
|
.PHONY: clean-payloads distclean-payloads print-repo-info-payloads nvramcui coreinfo
|
@ -12,10 +12,6 @@
|
|||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
## GNU General Public License for more details.
|
## GNU General Public License for more details.
|
||||||
##
|
##
|
||||||
## You should have received a copy of the GNU General Public License
|
|
||||||
## along with this program; if not, write to the Free Software
|
|
||||||
## Foundation, Inc.
|
|
||||||
##
|
|
||||||
|
|
||||||
CONFIG_LZMA=y
|
CONFIG_LZMA=y
|
||||||
CONFIG_NRV2B=y
|
CONFIG_NRV2B=y
|
||||||
@ -24,7 +20,7 @@ CONFIG_BUILTIN_LAR=y
|
|||||||
PBUILDER_CONFIG=bayou.xml
|
PBUILDER_CONFIG=bayou.xml
|
||||||
BUILTIN_LAR=builtin.lar
|
BUILTIN_LAR=builtin.lar
|
||||||
|
|
||||||
export src := $(shell pwd)
|
export src := $(CURDIR)
|
||||||
export obj := $(src)/build
|
export obj := $(src)/build
|
||||||
|
|
||||||
LIBPAYLOAD_DIR := $(obj)/libpayload
|
LIBPAYLOAD_DIR := $(obj)/libpayload
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BAYOU_H_
|
#ifndef BAYOU_H_
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
## GNU General Public License for more details.
|
## GNU General Public License for more details.
|
||||||
##
|
|
||||||
## You should have received a copy of the GNU General Public License
|
|
||||||
## along with this program; if not, write to the Free Software
|
|
||||||
## Foundation, Inc.
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Sample Bayou config file. Adapt as needed, then rename to bayou.xml. -->
|
<!-- Sample Bayou config file. Adapt as needed, then rename to bayou.xml. -->
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bayou.h"
|
#include "bayou.h"
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bayou.h"
|
#include "bayou.h"
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <libpayload.h>
|
#include <libpayload.h>
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bayou.h"
|
#include "bayou.h"
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bayou.h"
|
#include "bayou.h"
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SELF_H_
|
#ifndef SELF_H_
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
##
|
|
||||||
## This file is part of the bayou project.
|
|
||||||
##
|
|
||||||
## Copyright (C) 2008 Advanced Micro Devices, Inc.
|
|
||||||
##
|
|
||||||
## This program is free software; you can redistribute it and/or modify
|
|
||||||
## it under the terms of the GNU General Public License version 2 as
|
|
||||||
## published by the Free Software Foundation.
|
|
||||||
##
|
|
||||||
## This program is distributed in the hope that it will be useful,
|
|
||||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
## GNU General Public License for more details.
|
|
||||||
##
|
|
||||||
## You should have received a copy of the GNU General Public License
|
|
||||||
## along with this program; if not, write to the Free Software
|
|
||||||
## Foundation, Inc.
|
|
||||||
##
|
|
||||||
|
|
||||||
PBUILDOBJS := config.o create.o show.o main.o
|
|
||||||
INCLUDES := -Iliblar/
|
|
||||||
HOSTCXX=g++
|
|
||||||
HOSTCC=gcc
|
|
||||||
HOSTCFLAGS=-Wall -Werror -g
|
|
||||||
|
|
||||||
all: pbuilder
|
|
||||||
|
|
||||||
LZMA_OBJ := lzma/LZMAEncoder.o lzma/LZInWindow.o lzma/RangeCoderBit.o
|
|
||||||
LZMA_OBJ += lzma/StreamUtils.o lzma/OutBuffer.o lzma/Alloc.o lzma/CRC.o
|
|
||||||
LZMA_OBJ += lzma/lzma-compress.o
|
|
||||||
|
|
||||||
lzma/lzma-compress.o: lzma/minilzma.cc
|
|
||||||
$(HOSTCXX) -o $@ -c -DCOMPACT $<
|
|
||||||
|
|
||||||
lzma/%.o: lzma/C/7zip/Compress/LZMA/%.cpp
|
|
||||||
$(HOSTCXX) -o $@ -c $<
|
|
||||||
|
|
||||||
lzma/%.o: lzma/C/7zip/Compress/LZ/%.cpp
|
|
||||||
$(HOSTCXX) -o $@ -c $<
|
|
||||||
|
|
||||||
lzma/%.o: lzma/C/7zip/Compress/RangeCoder/%.cpp
|
|
||||||
$(HOSTCXX) -o $@ -c $<
|
|
||||||
|
|
||||||
lzma/%.o: lzma/C/7zip/Decompress/%.cpp
|
|
||||||
$(HOSTCXX) -o $@ -c $<
|
|
||||||
|
|
||||||
lzma/%.o: lzma/C/7zip/Common/%.cpp
|
|
||||||
$(HOSTCXX) -o $@ -c $<
|
|
||||||
|
|
||||||
lzma/%.o: lzma/C/Common/%.cpp
|
|
||||||
$(HOSTCXX) -o $@ -c $<
|
|
||||||
|
|
||||||
lzma/%.o: lzma/%.cc
|
|
||||||
$(HOSTCXX) -o $@ -c $<
|
|
||||||
|
|
||||||
pbuilder: $(PBUILDOBJS) $(LZMA_OBJ) liblar/liblar.a
|
|
||||||
$(HOSTCXX) -o $@ $(PBUILDOBJS) $(LZMA_OBJ) liblar/liblar.a -lexpat
|
|
||||||
|
|
||||||
liblar/liblar.a:
|
|
||||||
$(MAKE) -C liblar
|
|
||||||
|
|
||||||
%.o: %.c
|
|
||||||
$(HOSTCC) -c $(HOSTCFLAGS) $(INCLUDES) -o $@ $<
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f pbuilder *.o lzma/*.o
|
|
||||||
$(MAKE) -C liblar clean
|
|
@ -1,279 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the bayou project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <expat.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include "pbuilder.h"
|
|
||||||
|
|
||||||
#define STATE_NONE 0x00
|
|
||||||
#define STATE_BAYOUCONFIG 0x01
|
|
||||||
#define STATE_GLOBAL 0x02
|
|
||||||
#define STATE_GLOBAL_TIMEOUT 0x03
|
|
||||||
#define STATE_PAYLOADS 0x04
|
|
||||||
#define STATE_PAYLOAD 0x05
|
|
||||||
#define STATE_PAYLOAD_TITLE 0x06
|
|
||||||
#define STATE_PAYLOAD_FILE 0x07
|
|
||||||
#define STATE_PAYLOAD_LARNAME 0x08
|
|
||||||
#define STATE_PAYLOAD_CHAIN 0x09
|
|
||||||
#define STATE_PAYLOAD_CHAIN_FILE 0x0A
|
|
||||||
#define STATE_PAYLOAD_CHAIN_LARNAME 0x0B
|
|
||||||
|
|
||||||
static struct userdata {
|
|
||||||
struct config *config;
|
|
||||||
struct pentry *payload;
|
|
||||||
struct pentry *chain;
|
|
||||||
int state;
|
|
||||||
} userdata;
|
|
||||||
|
|
||||||
static char buffer[8192];
|
|
||||||
|
|
||||||
static struct {
|
|
||||||
char *element;
|
|
||||||
int pstate;
|
|
||||||
int state;
|
|
||||||
} states[] = {
|
|
||||||
{"BayouConfig", STATE_NONE, STATE_BAYOUCONFIG},
|
|
||||||
{"global", STATE_BAYOUCONFIG, STATE_GLOBAL},
|
|
||||||
{"timeout", STATE_GLOBAL, STATE_GLOBAL_TIMEOUT},
|
|
||||||
{"payloads", STATE_BAYOUCONFIG, STATE_PAYLOADS},
|
|
||||||
{"payload", STATE_PAYLOADS, STATE_PAYLOAD},
|
|
||||||
{"title", STATE_PAYLOAD, STATE_PAYLOAD_TITLE},
|
|
||||||
{"lar", STATE_PAYLOAD, STATE_PAYLOAD_LARNAME},
|
|
||||||
{"file", STATE_PAYLOAD, STATE_PAYLOAD_FILE},
|
|
||||||
{"chain", STATE_PAYLOAD, STATE_PAYLOAD_CHAIN},
|
|
||||||
{"file", STATE_PAYLOAD_CHAIN, STATE_PAYLOAD_CHAIN_FILE},
|
|
||||||
{"lar", STATE_PAYLOAD_CHAIN, STATE_PAYLOAD_CHAIN_LARNAME},
|
|
||||||
{NULL},
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifndef __LINUX__
|
|
||||||
static char *strndup (const char *s, size_t n)
|
|
||||||
{
|
|
||||||
size_t len = strlen (s);
|
|
||||||
len = (len<n)?len:n;
|
|
||||||
char *cpy = malloc (len + 1);
|
|
||||||
if (cpy == NULL)
|
|
||||||
return NULL;
|
|
||||||
cpy[len] = '\0';
|
|
||||||
memcpy (cpy, s, len);
|
|
||||||
return cpy;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct pentry *newPayload(struct config *config)
|
|
||||||
{
|
|
||||||
struct pentry **tmp, *ret;
|
|
||||||
|
|
||||||
tmp = realloc(config->entries,
|
|
||||||
(config->n_entries + 1) * sizeof(struct pentry *));
|
|
||||||
|
|
||||||
if (tmp == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
config->entries = tmp;
|
|
||||||
|
|
||||||
ret = config->entries[config->n_entries] = calloc(sizeof(*ret), 1);
|
|
||||||
|
|
||||||
if (ret == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
/* Yes, I want this to be ++config->n_entries (the index is 1 based). */
|
|
||||||
ret->index = ++config->n_entries;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void parseFlags(struct pentry *entry, const char *flags)
|
|
||||||
{
|
|
||||||
char *p = (char *)flags;
|
|
||||||
char *n;
|
|
||||||
|
|
||||||
while (*p) {
|
|
||||||
n = strchr(p, ',');
|
|
||||||
|
|
||||||
if (n)
|
|
||||||
*(n++) = 0;
|
|
||||||
|
|
||||||
if (!strcmp(p, "default"))
|
|
||||||
entry->flags |= BPT_FLAG_DEFAULT;
|
|
||||||
else if (!strcmp(p, "nolist"))
|
|
||||||
entry->flags |= BPT_FLAG_NOSHOW;
|
|
||||||
else
|
|
||||||
warn("W: Unknown payload flag %s\n", p);
|
|
||||||
|
|
||||||
if (!n)
|
|
||||||
break;
|
|
||||||
|
|
||||||
for (p = n; *p && isspace(*p); p++) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct pentry *addPayload(struct config *config, const char **attr)
|
|
||||||
{
|
|
||||||
struct pentry *ret = newPayload(config);
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
if (ret == NULL)
|
|
||||||
die("E: Could not allocate memory for a new payload\n");
|
|
||||||
|
|
||||||
while (attr[i] != NULL) {
|
|
||||||
if (!strcmp(attr[i], "type")) {
|
|
||||||
if (!strcmp(attr[i + 1], "chain"))
|
|
||||||
ret->type = BPT_TYPE_CHAIN;
|
|
||||||
else if (!strcmp(attr[i + 1], "chooser"))
|
|
||||||
ret->type = BPT_TYPE_CHOOSER;
|
|
||||||
else
|
|
||||||
die("E: Invalid payload type %s\n",
|
|
||||||
attr[i + 1]);
|
|
||||||
} else if (!strcmp(attr[i], "flags"))
|
|
||||||
parseFlags(ret, attr[i + 1]);
|
|
||||||
|
|
||||||
i += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct pentry *addChain(struct config *config, struct pentry *parent)
|
|
||||||
{
|
|
||||||
struct pentry *ret = newPayload(config);
|
|
||||||
|
|
||||||
if (ret == NULL)
|
|
||||||
die("E: Could not allocate memory for a new payload\n");
|
|
||||||
|
|
||||||
ret->parent = parent->index;
|
|
||||||
ret->type = BPT_TYPE_SUBCHAIN;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void start(void *data, const char *el, const char **attr)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
struct userdata *d = (struct userdata *)data;
|
|
||||||
|
|
||||||
for (i = 0; states[i].element != NULL; i++) {
|
|
||||||
if (d->state != states[i].pstate)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!strcmp(el, states[i].element)) {
|
|
||||||
d->state = states[i].state;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (states[i].element == NULL)
|
|
||||||
die("E: Unknown element %s\n", el);
|
|
||||||
|
|
||||||
if (d->state == STATE_PAYLOAD)
|
|
||||||
d->payload = addPayload(d->config, attr);
|
|
||||||
|
|
||||||
if (d->state == STATE_PAYLOAD_CHAIN)
|
|
||||||
d->chain = addChain(d->config, d->payload);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void data(void *data, const char *val, int len)
|
|
||||||
{
|
|
||||||
struct userdata *d = (struct userdata *)data;
|
|
||||||
int l;
|
|
||||||
|
|
||||||
switch (d->state) {
|
|
||||||
case STATE_GLOBAL_TIMEOUT:
|
|
||||||
d->config->timeout = atoi(val);
|
|
||||||
break;
|
|
||||||
case STATE_PAYLOAD_TITLE:
|
|
||||||
l = sizeof(d->payload->title) - 1 > len ?
|
|
||||||
len : sizeof(d->payload->title) - 1;
|
|
||||||
|
|
||||||
strncpy((char *)d->payload->title, (char *)val, l);
|
|
||||||
d->payload->title[l] = '\0';
|
|
||||||
break;
|
|
||||||
case STATE_PAYLOAD_FILE:
|
|
||||||
d->payload->file = strndup(val, len);
|
|
||||||
break;
|
|
||||||
case STATE_PAYLOAD_LARNAME:
|
|
||||||
d->payload->larname = strndup(val, len);
|
|
||||||
break;
|
|
||||||
case STATE_PAYLOAD_CHAIN_FILE:
|
|
||||||
d->chain->file = strndup(val, len);
|
|
||||||
break;
|
|
||||||
case STATE_PAYLOAD_CHAIN_LARNAME:
|
|
||||||
d->chain->larname = strndup(val, len);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void end(void *data, const char *el)
|
|
||||||
{
|
|
||||||
struct userdata *d = (struct userdata *)data;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (d->state == STATE_PAYLOAD_CHAIN)
|
|
||||||
d->chain = NULL;
|
|
||||||
|
|
||||||
if (d->state == STATE_PAYLOAD)
|
|
||||||
d->payload = NULL;
|
|
||||||
|
|
||||||
for (i = 0; states[i].element != NULL; i++) {
|
|
||||||
if (d->state != states[i].state)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!strcmp(el, states[i].element)) {
|
|
||||||
d->state = states[i].pstate;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (states[i].element == NULL)
|
|
||||||
die("E: Unable to find the reverse state for %s\n", el);
|
|
||||||
}
|
|
||||||
|
|
||||||
void parseconfig(FILE *stream, struct config *config)
|
|
||||||
{
|
|
||||||
XML_Parser p = XML_ParserCreate(NULL);
|
|
||||||
int eof = 0;
|
|
||||||
|
|
||||||
if (p == NULL)
|
|
||||||
die("E: Could not create the parser\n");
|
|
||||||
|
|
||||||
XML_SetElementHandler(p, start, end);
|
|
||||||
XML_SetCharacterDataHandler(p, data);
|
|
||||||
|
|
||||||
userdata.config = config;
|
|
||||||
|
|
||||||
XML_SetUserData(p, &userdata);
|
|
||||||
|
|
||||||
while (!eof) {
|
|
||||||
int len = fread(buffer, 1, 8192, stream);
|
|
||||||
|
|
||||||
eof = feof(stream);
|
|
||||||
|
|
||||||
if (ferror(stream))
|
|
||||||
die("E: Error reading the stream\n");
|
|
||||||
|
|
||||||
if (!XML_Parse(p, buffer, len, eof))
|
|
||||||
die("E: Error parsing the XML data\n");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,200 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the bayou project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <libgen.h>
|
|
||||||
#include "liblar.h"
|
|
||||||
#include "pbuilder.h"
|
|
||||||
|
|
||||||
void do_lzma_compress(char *in, int in_len, char *out, int *out_len);
|
|
||||||
|
|
||||||
int add_bpt_to_lar(struct LAR *lar, struct config *config)
|
|
||||||
{
|
|
||||||
char *buffer;
|
|
||||||
int ret, i, len = sizeof(struct bpt_config);
|
|
||||||
struct bpt_config *cfg;
|
|
||||||
struct LARAttr attr;
|
|
||||||
char *ptr;
|
|
||||||
|
|
||||||
for (i = 0; i < config->n_entries; i++) {
|
|
||||||
len += sizeof(struct bpt_pentry);
|
|
||||||
|
|
||||||
if (config->entries[i]->type != BPT_TYPE_CHAIN)
|
|
||||||
len += ((strlen(config->entries[i]->larname)
|
|
||||||
+ 15) & ~0x0F);
|
|
||||||
}
|
|
||||||
|
|
||||||
buffer = calloc(len, 1);
|
|
||||||
|
|
||||||
if (buffer == NULL)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
cfg = (struct bpt_config *)buffer;
|
|
||||||
|
|
||||||
cfg->id = BPT_ID;
|
|
||||||
cfg->timeout = config->timeout;
|
|
||||||
cfg->entries = config->n_entries;
|
|
||||||
|
|
||||||
ptr = buffer + sizeof(struct bpt_config);
|
|
||||||
|
|
||||||
for (i = 0; i < config->n_entries; i++) {
|
|
||||||
int nlen = 0;
|
|
||||||
struct bpt_pentry *pentry = (struct bpt_pentry *)ptr;
|
|
||||||
|
|
||||||
pentry->index = config->entries[i]->index;
|
|
||||||
pentry->parent = config->entries[i]->parent;
|
|
||||||
pentry->type = config->entries[i]->type;
|
|
||||||
pentry->flags = config->entries[i]->flags;
|
|
||||||
|
|
||||||
strncpy((char *)pentry->title,
|
|
||||||
(char *)config->entries[i]->title,
|
|
||||||
sizeof(pentry->title));
|
|
||||||
|
|
||||||
if (config->entries[i]->type != BPT_TYPE_CHAIN) {
|
|
||||||
nlen = strlen(config->entries[i]->larname);
|
|
||||||
nlen = (nlen + 15) & ~0x0F;
|
|
||||||
|
|
||||||
strcpy((char *)(ptr + sizeof(struct bpt_pentry)),
|
|
||||||
config->entries[i]->larname);
|
|
||||||
|
|
||||||
pentry->nlen = nlen;
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr += sizeof(struct bpt_pentry);
|
|
||||||
|
|
||||||
if (config->entries[i]->type != BPT_TYPE_CHAIN)
|
|
||||||
ptr += nlen;
|
|
||||||
}
|
|
||||||
|
|
||||||
LAR_SetAttrs(&attr, "bayou_payload_table", ALGO_NONE);
|
|
||||||
|
|
||||||
ret = LAR_AppendBuffer(lar, (unsigned char *)buffer, len, &attr);
|
|
||||||
free(buffer);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct lfile {
|
|
||||||
char *file;
|
|
||||||
char *larname;
|
|
||||||
};
|
|
||||||
|
|
||||||
int n_lfiles;
|
|
||||||
|
|
||||||
int create_lar_from_config(const char *input, const char *output)
|
|
||||||
{
|
|
||||||
struct config config;
|
|
||||||
FILE *stream;
|
|
||||||
struct LAR *lar;
|
|
||||||
struct LARAttr attr;
|
|
||||||
int i, j, ret = -1;
|
|
||||||
struct lfile *lfiles;
|
|
||||||
|
|
||||||
stream = fopen(input, "r");
|
|
||||||
|
|
||||||
if (stream == NULL) {
|
|
||||||
warn("E: Couldn't open %s for reading\n", input);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&config, 0, sizeof(config));
|
|
||||||
|
|
||||||
parseconfig(stream, &config);
|
|
||||||
fclose(stream);
|
|
||||||
|
|
||||||
lar = LAR_Create(output);
|
|
||||||
|
|
||||||
if (lar == NULL) {
|
|
||||||
warn("E: Couldn't create a new lar file\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
LAR_SetCompressionFuncs(lar, ALGO_LZMA, do_lzma_compress, NULL);
|
|
||||||
|
|
||||||
lfiles = calloc(sizeof(struct lfile), config.n_entries);
|
|
||||||
|
|
||||||
if (lfiles == NULL) {
|
|
||||||
warn("E: Couldn't allocate memory: %m\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < config.n_entries; i++) {
|
|
||||||
/* Master chain entries don't have files associated with them. */
|
|
||||||
if (config.entries[i]->type == BPT_TYPE_CHAIN)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (access(config.entries[i]->file, R_OK)) {
|
|
||||||
warn("E: Could not find file %s\n",
|
|
||||||
config.entries[i]->file);
|
|
||||||
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.entries[i]->larname == NULL) {
|
|
||||||
config.entries[i]->larname =
|
|
||||||
strdup(basename(config.entries[i]->file));
|
|
||||||
|
|
||||||
if (config.entries[i]->larname == NULL) {
|
|
||||||
warn("E: Could not allocate memory for the default name\n");
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add the file to the list of files to add to the LAR - skip
|
|
||||||
* any duplicates, but be on the lookout for the same LAR name
|
|
||||||
* attached to a different file.
|
|
||||||
*/
|
|
||||||
for (j = 0; j < n_lfiles; j++) {
|
|
||||||
if (!strcmp(lfiles[j].larname,
|
|
||||||
config.entries[i]->larname)) {
|
|
||||||
if (strcmp(lfiles[j].file,
|
|
||||||
config.entries[i]->file)) {
|
|
||||||
warn("E: LAR name '%s' has already been used\n", config.entries[i]->larname);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (j == n_lfiles) {
|
|
||||||
lfiles[n_lfiles].file = config.entries[i]->file;
|
|
||||||
lfiles[n_lfiles++].larname = config.entries[i]->larname;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add all the files to the LAR. */
|
|
||||||
for (i = 0; i < n_lfiles; i++) {
|
|
||||||
LAR_SetAttrs(&attr, lfiles[i].larname, ALGO_LZMA);
|
|
||||||
|
|
||||||
if (LAR_AppendFile(lar, lfiles[i].file, &attr)) {
|
|
||||||
warn("E: Could not add %s to the LAR\n",
|
|
||||||
lfiles[i].file);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = add_bpt_to_lar(lar, &config);
|
|
||||||
|
|
||||||
err:
|
|
||||||
LAR_Close(lar);
|
|
||||||
return ret;
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
##
|
|
||||||
## This file is part of the bayou project.
|
|
||||||
##
|
|
||||||
## Copyright (C) 2008 Advanced Micro Devices, Inc.
|
|
||||||
##
|
|
||||||
## This program is free software; you can redistribute it and/or modify
|
|
||||||
## it under the terms of the GNU General Public License version 2 as
|
|
||||||
## published by the Free Software Foundation.
|
|
||||||
##
|
|
||||||
## This program is distributed in the hope that it will be useful,
|
|
||||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
## GNU General Public License for more details.
|
|
||||||
##
|
|
||||||
## You should have received a copy of the GNU General Public License
|
|
||||||
## along with this program; if not, write to the Free Software
|
|
||||||
## Foundation, Inc.
|
|
||||||
##
|
|
||||||
|
|
||||||
HOSTCC = gcc
|
|
||||||
AR?=ar
|
|
||||||
LAROBJS = self.o lib.o
|
|
||||||
CFLAGS = -g -Wall
|
|
||||||
|
|
||||||
liblar.a: $(LAROBJS)
|
|
||||||
$(AR) rc $@ $(LAROBJS)
|
|
||||||
|
|
||||||
%.o: %.c
|
|
||||||
$(HOSTCC) -c $(CFLAGS) -o $@ $<
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f liblar.a *.o
|
|
File diff suppressed because it is too large
Load Diff
@ -1,95 +0,0 @@
|
|||||||
/*
|
|
||||||
* lar - lightweight archiver
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 coresystems GmbH
|
|
||||||
* (Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH)
|
|
||||||
* Copyright (C) 2007 Patrick Georgi <patrick@georgi-clan.de>
|
|
||||||
*
|
|
||||||
* This file is dual-licensed. You can choose between:
|
|
||||||
* - The GNU GPL, version 2, as published by the Free Software Foundation
|
|
||||||
* - The revised BSD license (without advertising clause)
|
|
||||||
*
|
|
||||||
* ---------------------------------------------------------------------------
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
* ---------------------------------------------------------------------------
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* 3. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
* SUCH DAMAGE.
|
|
||||||
* ---------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#define MAGIC "LARCHIVE"
|
|
||||||
#define MAX_PATHLEN 1024
|
|
||||||
#define BOOTBLOCK_SIZE 20480
|
|
||||||
|
|
||||||
#define BOOTBLOCK_NAME "bootblock"
|
|
||||||
#define BOOTBLOCK_NAME_LEN 16
|
|
||||||
|
|
||||||
typedef uint64_t u64;
|
|
||||||
typedef int64_t s64;
|
|
||||||
typedef uint32_t u32;
|
|
||||||
typedef int32_t s32;
|
|
||||||
typedef uint8_t u8;
|
|
||||||
|
|
||||||
/* NOTE -- This and the coreboot lar.h may NOT be in sync. Be careful. */
|
|
||||||
struct lar_header {
|
|
||||||
char magic[8];
|
|
||||||
u32 len;
|
|
||||||
u32 reallen;
|
|
||||||
u32 checksum;
|
|
||||||
u32 compchecksum;
|
|
||||||
/* Filenames are limited to 2^31-1-sizeof(lar_header)-1 bytes.
|
|
||||||
* "Nobody will ever need more than 640k" */
|
|
||||||
u32 offset;
|
|
||||||
/* Compression:
|
|
||||||
* 0 = no compression
|
|
||||||
* 1 = lzma
|
|
||||||
* 2 = nrv2b
|
|
||||||
* 3 = zeroes
|
|
||||||
*/
|
|
||||||
u32 compression;
|
|
||||||
u64 entry;
|
|
||||||
u64 loadaddress;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum compalgo {
|
|
||||||
ALGO_NONE = 0,
|
|
||||||
ALGO_LZMA = 1,
|
|
||||||
ALGO_NRV2B = 2,
|
|
||||||
ALGO_ZEROES = 3,
|
|
||||||
/* invalid should always be the last entry. */
|
|
||||||
ALGO_INVALID
|
|
||||||
};
|
|
@ -1,461 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the bayou project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
|
|
||||||
#include "liblar.h"
|
|
||||||
#include "self.h"
|
|
||||||
|
|
||||||
static int lar_compress(struct LAR *lar, int algo, char *src, char *dst,
|
|
||||||
int len)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!lar->cfuncs[algo])
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
lar->cfuncs[algo] (src, len, dst, &ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int lar_decompress(struct LAR *lar, int algo, char *src, char *dst,
|
|
||||||
int slen, int dlen)
|
|
||||||
{
|
|
||||||
if (!lar->dfuncs[algo])
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
lar->dfuncs[algo] (src, slen, dst, dlen);
|
|
||||||
return dlen;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct LARHeader *lar_get_header(struct LAR *lar, const char *filename)
|
|
||||||
{
|
|
||||||
char *buffer;
|
|
||||||
int offset = 0;
|
|
||||||
struct LARHeader *lheader = NULL;
|
|
||||||
struct lar_header *header;
|
|
||||||
|
|
||||||
printf("Getting %s\n", filename);
|
|
||||||
|
|
||||||
buffer = malloc(sizeof(struct lar_header) + MAX_PATHLEN);
|
|
||||||
|
|
||||||
if (buffer == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (lseek(lar->fd, offset, SEEK_SET) == -1)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
ret = read(lar->fd, buffer, sizeof(struct lar_header));
|
|
||||||
|
|
||||||
if (ret <= 0)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
header = (struct lar_header *)buffer;
|
|
||||||
|
|
||||||
if (strncmp(header->magic, MAGIC, sizeof(MAGIC)))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
ret = read(lar->fd, buffer + sizeof(struct lar_header),
|
|
||||||
ntohl(header->offset) - sizeof(struct lar_header));
|
|
||||||
|
|
||||||
if (ret <= 0)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
if (!strcmp(buffer + sizeof(struct lar_header), filename))
|
|
||||||
break;
|
|
||||||
|
|
||||||
offset += ntohl(header->offset) +
|
|
||||||
((ntohl(header->len) + 15) & ~0xF);
|
|
||||||
}
|
|
||||||
|
|
||||||
lheader = calloc(sizeof(struct LARHeader), 1);
|
|
||||||
|
|
||||||
if (lheader == NULL)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
lheader->hoffset = offset;
|
|
||||||
lheader->offset = offset + ntohl(header->offset);
|
|
||||||
|
|
||||||
lheader->reallen = ntohl(header->reallen);
|
|
||||||
lheader->len = ntohl(header->len);
|
|
||||||
|
|
||||||
lheader->loadaddress = ntohl(header->loadaddress);
|
|
||||||
lheader->compression = ntohl(header->compression);
|
|
||||||
lheader->entry = ntohl(header->entry);
|
|
||||||
lheader->checksum = ntohl(header->checksum);
|
|
||||||
|
|
||||||
err:
|
|
||||||
free(buffer);
|
|
||||||
return lheader;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int LAR_AppendBlob(struct LAR *lar, unsigned char *buffer,
|
|
||||||
int len, int rlen, struct LARAttr *attr)
|
|
||||||
{
|
|
||||||
int nlen, nsize, lsize, i;
|
|
||||||
struct lar_header *header;
|
|
||||||
u8 *lptr;
|
|
||||||
u32 csum = 0;
|
|
||||||
|
|
||||||
if (attr == NULL)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
nlen = strlen(attr->name) + 1;
|
|
||||||
|
|
||||||
if (nlen > MAX_PATHLEN - 1)
|
|
||||||
nlen = MAX_PATHLEN - 1;
|
|
||||||
|
|
||||||
nsize = (nlen + 15) & ~0xF;
|
|
||||||
|
|
||||||
lsize = sizeof(struct lar_header) + nsize + len;
|
|
||||||
lptr = calloc(lsize + 1, 1);
|
|
||||||
|
|
||||||
if (lptr == NULL)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
header = (struct lar_header *)lptr;
|
|
||||||
|
|
||||||
memcpy(header->magic, MAGIC, 8);
|
|
||||||
header->reallen = htonl(rlen);
|
|
||||||
header->len = htonl(len);
|
|
||||||
header->offset = htonl(lsize - len);
|
|
||||||
header->loadaddress = htonl(attr->loadaddr);
|
|
||||||
header->compression = htonl(attr->compression);
|
|
||||||
header->entry = htonl(attr->entry);
|
|
||||||
|
|
||||||
strncpy(((char *)header) + sizeof(struct lar_header), attr->name, nlen);
|
|
||||||
|
|
||||||
for (i = 0; i < sizeof(struct lar_header) + nsize; i += 4)
|
|
||||||
csum += *((u32 *) (lptr + i));
|
|
||||||
|
|
||||||
for (i = 0; i < len; i += 4) {
|
|
||||||
/*
|
|
||||||
* The checksum needs to include the 16 byte padding at
|
|
||||||
* the end of the data before the next lar header. The
|
|
||||||
* problem is that the padding isn't going to be in the
|
|
||||||
* buffer, and if we try to read off the end of the buffer,
|
|
||||||
* we are just asking for trouble. So account for the
|
|
||||||
* situation where the datalen is not a multiple of four
|
|
||||||
* and get a safe value to add into the checksum.
|
|
||||||
* The rest of the padding will be zero, and can be safely
|
|
||||||
* ignored here.
|
|
||||||
*/
|
|
||||||
if ((len - i) < 4) {
|
|
||||||
u32 val = 0;
|
|
||||||
int t;
|
|
||||||
|
|
||||||
for (t = 0; t < (len - i); t++)
|
|
||||||
val |= *((u8 *) buffer + (i + t)) << (t * 8);
|
|
||||||
csum += val;
|
|
||||||
} else
|
|
||||||
csum += *((u32 *) (buffer + i));
|
|
||||||
}
|
|
||||||
|
|
||||||
header->checksum = (u32) (~0 - csum);
|
|
||||||
|
|
||||||
lseek(lar->fd, 0, SEEK_END);
|
|
||||||
|
|
||||||
/* FIXME: Error check here. */
|
|
||||||
|
|
||||||
write(lar->fd, header, sizeof(struct lar_header) + nsize);
|
|
||||||
write(lar->fd, buffer, len);
|
|
||||||
|
|
||||||
/* Add in padding to the next 16 byte boundary. */
|
|
||||||
if (lsize & 0xF) {
|
|
||||||
int i;
|
|
||||||
char null = '\0';
|
|
||||||
|
|
||||||
for (i = lsize & 0xF; i < 0x10; i++)
|
|
||||||
write(lar->fd, &null, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int LAR_AppendBuffer(struct LAR *lar, unsigned char *buffer, int len,
|
|
||||||
struct LARAttr *attr)
|
|
||||||
{
|
|
||||||
unsigned char *tbuf;
|
|
||||||
int rlen, ret = -1;
|
|
||||||
|
|
||||||
if (attr->compression == ALGO_NONE)
|
|
||||||
return LAR_AppendBlob(lar, buffer, len, len, attr);
|
|
||||||
|
|
||||||
tbuf = malloc(len);
|
|
||||||
|
|
||||||
if (tbuf == NULL)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
rlen = lar_compress(lar, attr->compression, (char *)buffer,
|
|
||||||
(char *)tbuf, len);
|
|
||||||
|
|
||||||
if (rlen > 0)
|
|
||||||
ret = LAR_AppendBlob(lar, tbuf, rlen, len, attr);
|
|
||||||
|
|
||||||
free(tbuf);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int LAR_AppendSelf(struct LAR *lar, const char *filename, struct LARAttr *attr)
|
|
||||||
{
|
|
||||||
unsigned char *buffer;
|
|
||||||
int len = elf_to_self(filename, &buffer,
|
|
||||||
lar->cfuncs[attr->compression]);
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (len == -1)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
ret = LAR_AppendBlob(lar, buffer, len, len, attr);
|
|
||||||
free(buffer);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int LAR_AppendFile(struct LAR *lar, const char *filename, struct LARAttr *attr)
|
|
||||||
{
|
|
||||||
int fd;
|
|
||||||
struct stat s;
|
|
||||||
char *filep;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (iself((char *)filename))
|
|
||||||
return LAR_AppendSelf(lar, filename, attr);
|
|
||||||
|
|
||||||
fd = open(filename, O_RDONLY);
|
|
||||||
|
|
||||||
if (fd == -1)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (fstat(fd, &s))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
filep = (char *)mmap(0, s.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
|
||||||
|
|
||||||
if (filep == MAP_FAILED)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
ret = LAR_AppendBuffer(lar, (unsigned char *)filep, s.st_size, attr);
|
|
||||||
|
|
||||||
munmap(filep, s.st_size);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int LAR_DeleteFile(struct LAR *lar, const char *filename)
|
|
||||||
{
|
|
||||||
struct LARHeader *header = lar_get_header(lar, filename);
|
|
||||||
int len, ret = -1;
|
|
||||||
char *filep, *buffer;
|
|
||||||
|
|
||||||
if (header == NULL)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
buffer = malloc(4096);
|
|
||||||
if (buffer == NULL)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
len = header->offset + header->len;
|
|
||||||
|
|
||||||
/* First, map the space and zero it out. */
|
|
||||||
|
|
||||||
filep = (char *)mmap(0, len, PROT_READ, MAP_SHARED, lar->fd,
|
|
||||||
header->hoffset);
|
|
||||||
|
|
||||||
if (filep == MAP_FAILED)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
memset(filep, 0, len);
|
|
||||||
munmap(filep, len);
|
|
||||||
|
|
||||||
/* Now move the rest of the LAR into place. */
|
|
||||||
/* FIXME: This does not account for the bootblock! */
|
|
||||||
|
|
||||||
int dst = header->hoffset;
|
|
||||||
int src = header->hoffset + len;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
int l, w;
|
|
||||||
|
|
||||||
if (lseek(lar->fd, src, SEEK_SET))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
l = read(lar->fd, buffer, 8192);
|
|
||||||
|
|
||||||
if (l == -1)
|
|
||||||
goto err;
|
|
||||||
if (l == 0)
|
|
||||||
goto err;
|
|
||||||
if (lseek(lar->fd, dst, SEEK_SET))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
w = write(lar->fd, buffer, l);
|
|
||||||
|
|
||||||
if (w <= 0)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
dst += w;
|
|
||||||
src += w;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
|
|
||||||
err:
|
|
||||||
free(buffer);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LAR_CloseFile(struct LARFile *file)
|
|
||||||
{
|
|
||||||
if (file != NULL) {
|
|
||||||
if (file->buffer != NULL)
|
|
||||||
free(file->buffer);
|
|
||||||
free(file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct LARFile *LAR_MapFile(struct LAR *lar, const char *filename)
|
|
||||||
{
|
|
||||||
struct LARFile *file;
|
|
||||||
struct LARHeader *header = lar_get_header(lar, filename);
|
|
||||||
char *filep;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (header == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
file = calloc(sizeof(struct LARFile), 1);
|
|
||||||
|
|
||||||
if (file == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
file->len = header->reallen;
|
|
||||||
file->buffer = calloc(header->reallen, 1);
|
|
||||||
|
|
||||||
if (file->buffer == NULL)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The offset needs to be a multiple of PAGE_SIZE, so just mmap
|
|
||||||
* from offset 0, its easier then doing the math.
|
|
||||||
*/
|
|
||||||
|
|
||||||
filep = mmap(0, header->offset + header->len,
|
|
||||||
PROT_READ, MAP_SHARED, lar->fd, 0);
|
|
||||||
|
|
||||||
if (filep == MAP_FAILED) {
|
|
||||||
printf("Map failed: %m\n");
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (header->compression != ALGO_NONE) {
|
|
||||||
ret = lar_decompress(lar, header->compression,
|
|
||||||
filep + header->offset, file->buffer,
|
|
||||||
header->len, header->reallen);
|
|
||||||
} else {
|
|
||||||
memcpy(file->buffer, filep + header->offset, header->len);
|
|
||||||
ret = header->len;
|
|
||||||
}
|
|
||||||
|
|
||||||
munmap(filep, header->offset + header->len);
|
|
||||||
|
|
||||||
if (ret == header->reallen)
|
|
||||||
return file;
|
|
||||||
|
|
||||||
err:
|
|
||||||
if (file->buffer)
|
|
||||||
free(file->buffer);
|
|
||||||
|
|
||||||
free(file);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int LAR_SetCompressionFuncs(struct LAR *lar, int algo,
|
|
||||||
LAR_CompFunc cfunc, LAR_DecompFunc dfunc)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (algo >= ALGO_INVALID)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
lar->cfuncs[algo] = cfunc;
|
|
||||||
lar->dfuncs[algo] = dfunc;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LAR_Close(struct LAR *lar)
|
|
||||||
{
|
|
||||||
if (lar != NULL) {
|
|
||||||
if (lar->fd)
|
|
||||||
close(lar->fd);
|
|
||||||
|
|
||||||
free(lar);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct LAR *LAR_Open(const char *filename)
|
|
||||||
{
|
|
||||||
struct LAR *lar = calloc(sizeof(struct LAR), 1);
|
|
||||||
|
|
||||||
if (lar == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
lar->fd = open(filename, O_RDWR);
|
|
||||||
|
|
||||||
if (lar->fd > 0)
|
|
||||||
return lar;
|
|
||||||
|
|
||||||
free(lar);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct LAR *LAR_Create(const char *filename)
|
|
||||||
{
|
|
||||||
struct LAR *lar = calloc(sizeof(struct LAR), 1);
|
|
||||||
|
|
||||||
if (lar == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
lar->fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
|
|
||||||
|
|
||||||
if (lar->fd > 0)
|
|
||||||
return lar;
|
|
||||||
|
|
||||||
free(lar);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LAR_SetAttrs(struct LARAttr *attrs, char *name, int algo)
|
|
||||||
{
|
|
||||||
if (attrs == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
memset(attrs, 0, sizeof(*attrs));
|
|
||||||
snprintf(attrs->name, sizeof(attrs->name) - 1, name);
|
|
||||||
attrs->compression = algo;
|
|
||||||
}
|
|
@ -1,75 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the bayou project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _LIBLAR_H_
|
|
||||||
#define _LIBLAR_H_
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "lar.h"
|
|
||||||
|
|
||||||
typedef void (*LAR_CompFunc) (char *, int, char *, int *);
|
|
||||||
typedef void (*LAR_DecompFunc) (char *, int, char *, int);
|
|
||||||
|
|
||||||
struct LAR {
|
|
||||||
int fd;
|
|
||||||
LAR_CompFunc cfuncs[ALGO_INVALID];
|
|
||||||
LAR_DecompFunc dfuncs[ALGO_INVALID];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct LARHeader {
|
|
||||||
u32 len;
|
|
||||||
u32 reallen;
|
|
||||||
u32 checksum;
|
|
||||||
u32 compression;
|
|
||||||
u64 loadaddress;
|
|
||||||
u64 entry;
|
|
||||||
/* These are the offsets within the file. */
|
|
||||||
unsigned int offset;
|
|
||||||
unsigned int hoffset;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct LARAttr {
|
|
||||||
char name[MAX_PATHLEN];
|
|
||||||
u64 loadaddr;
|
|
||||||
int compression;
|
|
||||||
u64 entry;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct LARFile {
|
|
||||||
int len;
|
|
||||||
char *buffer;
|
|
||||||
};
|
|
||||||
|
|
||||||
int LAR_AppendBuffer(struct LAR *lar, unsigned char *buffer, int len,
|
|
||||||
struct LARAttr *attr);
|
|
||||||
int LAR_AppendSelf(struct LAR *lar, const char *filename, struct LARAttr *attr);
|
|
||||||
int LAR_AppendFile(struct LAR *lar, const char *filename, struct LARAttr *attr);
|
|
||||||
int LAR_DeleteFile(struct LAR *lar, const char *filename);
|
|
||||||
void LAR_CloseFile(struct LARFile *file);
|
|
||||||
struct LARFile *LAR_MapFile(struct LAR *lar, const char *filename);
|
|
||||||
int LAR_SetCompressionFuncs(struct LAR *lar, int algo,
|
|
||||||
LAR_CompFunc cfunc, LAR_DecompFunc dfunc);
|
|
||||||
void LAR_Close(struct LAR *lar);
|
|
||||||
struct LAR *LAR_Open(const char *filename);
|
|
||||||
struct LAR *LAR_Create(const char *filename);
|
|
||||||
void LAR_SetAttrs(struct LARAttr *attrs, char *name, int algo);
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,206 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the bayou project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* Includes code from util/lar from coreboot-v3
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2007 coresystems GmbH
|
|
||||||
* Copyright (C) 2007 Patrick Georgi <patrick@georgi-clan.de>
|
|
||||||
* Copyright (C) 2007 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include "elf.h"
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef uint64_t u64;
|
|
||||||
typedef int64_t s64;
|
|
||||||
typedef uint32_t u32;
|
|
||||||
typedef int32_t s32;
|
|
||||||
typedef uint8_t u8;
|
|
||||||
|
|
||||||
#include "self.h"
|
|
||||||
|
|
||||||
int elf_to_self(const char *filename, unsigned char **buffer,
|
|
||||||
void (*compress) (char *, int, char *, int *))
|
|
||||||
{
|
|
||||||
struct stat s;
|
|
||||||
Elf32_Phdr *phdr;
|
|
||||||
Elf32_Ehdr *ehdr;
|
|
||||||
Elf32_Shdr *shdr;
|
|
||||||
void *filep;
|
|
||||||
char *header, *strtab;
|
|
||||||
unsigned char *sptr;
|
|
||||||
int headers, segments = 1, isize = 0, osize = 0, doffset = 0, fd, i;
|
|
||||||
struct self_segment *segs;
|
|
||||||
|
|
||||||
if (stat(filename, &s)) {
|
|
||||||
printf("Unable to stat %s: %m\n", filename);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fd = open(filename, O_RDONLY);
|
|
||||||
|
|
||||||
if (fd == -1) {
|
|
||||||
printf("Unable to open %s: %m\n", filename);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Map the file so that we can easily parse it. */
|
|
||||||
filep = (void *)
|
|
||||||
mmap(0, s.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
|
||||||
|
|
||||||
if (filep == MAP_FAILED) {
|
|
||||||
close(fd);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ehdr = (Elf32_Ehdr *) filep;
|
|
||||||
headers = ehdr->e_phnum;
|
|
||||||
header = (char *)ehdr;
|
|
||||||
|
|
||||||
phdr = (Elf32_Phdr *) & (header[ehdr->e_phoff]);
|
|
||||||
shdr = (Elf32_Shdr *) & (header[ehdr->e_shoff]);
|
|
||||||
|
|
||||||
strtab = &header[shdr[ehdr->e_shstrndx].sh_offset];
|
|
||||||
|
|
||||||
/* Count number of headers - look for the .notes.pinfo section. */
|
|
||||||
for (i = 0; i < ehdr->e_shnum; i++) {
|
|
||||||
char *name;
|
|
||||||
|
|
||||||
if (i == ehdr->e_shstrndx)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (shdr[i].sh_size == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
name = (char *)(strtab + shdr[i].sh_name);
|
|
||||||
|
|
||||||
if (!strcmp(name, ".note.pinfo"))
|
|
||||||
segments++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Now, regular headers - we only care about PT_LOAD headers,
|
|
||||||
* because thats what we're actually going to load.
|
|
||||||
*/
|
|
||||||
for (i = 0; i < headers; i++) {
|
|
||||||
if (phdr[i].p_type != PT_LOAD)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* Empty segments are never interesting. */
|
|
||||||
if (phdr[i].p_memsz == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
isize += phdr[i].p_filesz;
|
|
||||||
segments++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Allocate a block of memory to store the SELF in. */
|
|
||||||
sptr = calloc((segments * sizeof(struct self_segment)) + isize, 1);
|
|
||||||
doffset = (segments * sizeof(struct self_segment));
|
|
||||||
|
|
||||||
if (sptr == NULL)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
segs = (struct self_segment *)sptr;
|
|
||||||
segments = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < ehdr->e_shnum; i++) {
|
|
||||||
char *name;
|
|
||||||
|
|
||||||
if (i == ehdr->e_shstrndx)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (shdr[i].sh_size == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
name = (char *)(strtab + shdr[i].sh_name);
|
|
||||||
|
|
||||||
if (!strcmp(name, ".note.pinfo")) {
|
|
||||||
segs[segments].type = SELF_TYPE_PARAMS;
|
|
||||||
segs[segments].load_addr = 0;
|
|
||||||
segs[segments].len = (u32) shdr[i].sh_size;
|
|
||||||
segs[segments].offset = doffset;
|
|
||||||
|
|
||||||
memcpy((unsigned long *)(sptr + doffset),
|
|
||||||
&header[shdr[i].sh_offset], shdr[i].sh_size);
|
|
||||||
|
|
||||||
doffset += segs[segments].len;
|
|
||||||
osize += segs[segments].len;
|
|
||||||
|
|
||||||
segments++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < headers; i++) {
|
|
||||||
if (phdr[i].p_type != PT_LOAD)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (phdr[i].p_memsz == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
segs[segments].type = SELF_TYPE_DATA;
|
|
||||||
segs[segments].load_addr = (u64) phdr[i].p_paddr;
|
|
||||||
segs[segments].mem_len = (u32) phdr[i].p_memsz;
|
|
||||||
segs[segments].offset = doffset;
|
|
||||||
|
|
||||||
compress((char *)&header[phdr[i].p_offset],
|
|
||||||
phdr[i].p_filesz,
|
|
||||||
(char *)(sptr + doffset), (int *)&segs[segments].len);
|
|
||||||
|
|
||||||
doffset += segs[segments].len;
|
|
||||||
osize += segs[segments].len;
|
|
||||||
|
|
||||||
segments++;
|
|
||||||
}
|
|
||||||
|
|
||||||
segs[segments].type = SELF_TYPE_ENTRY;
|
|
||||||
segs[segments++].load_addr = (unsigned long long)ehdr->e_entry;
|
|
||||||
|
|
||||||
*buffer = sptr;
|
|
||||||
|
|
||||||
munmap(filep, s.st_size);
|
|
||||||
close(fd);
|
|
||||||
|
|
||||||
return (segments * sizeof(struct self_segment)) + osize;
|
|
||||||
|
|
||||||
err:
|
|
||||||
munmap(filep, s.st_size);
|
|
||||||
close(fd);
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int iself(char *filename)
|
|
||||||
{
|
|
||||||
Elf32_Ehdr ehdr;
|
|
||||||
int fd = open(filename, O_RDONLY);
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (fd == -1)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (read(fd, &ehdr, sizeof(ehdr)) == sizeof(ehdr))
|
|
||||||
ret = !memcmp(ehdr.e_ident, ELFMAG, 4);
|
|
||||||
|
|
||||||
close(fd);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the bayou project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SELF_H_
|
|
||||||
#define SELF_H_
|
|
||||||
|
|
||||||
struct self_segment {
|
|
||||||
u32 type;
|
|
||||||
u32 offset;
|
|
||||||
u64 load_addr;
|
|
||||||
u32 len;
|
|
||||||
u32 mem_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define SELF_TYPE_CODE 0x45444F43
|
|
||||||
#define SELF_TYPE_DATA 0x41544144
|
|
||||||
#define SELF_TYPE_BSS 0x20535342
|
|
||||||
#define SELF_TYPE_PARAMS 0x41524150
|
|
||||||
#define SELF_TYPE_ENTRY 0x52544E45
|
|
||||||
|
|
||||||
int elf_to_self(const char *filename, unsigned char **buffer,
|
|
||||||
void (*compress) (char *, int, char *, int *));
|
|
||||||
|
|
||||||
int iself(char *filename);
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,76 +0,0 @@
|
|||||||
// InBuffer.h
|
|
||||||
|
|
||||||
#ifndef __INBUFFER_H
|
|
||||||
#define __INBUFFER_H
|
|
||||||
|
|
||||||
#include "../IStream.h"
|
|
||||||
#include "../../Common/MyCom.h"
|
|
||||||
|
|
||||||
#ifndef _NO_EXCEPTIONS
|
|
||||||
class CInBufferException
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
HRESULT ErrorCode;
|
|
||||||
CInBufferException(HRESULT errorCode): ErrorCode(errorCode) {}
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class CInBuffer
|
|
||||||
{
|
|
||||||
Byte *_buffer;
|
|
||||||
Byte *_bufferLimit;
|
|
||||||
Byte *_bufferBase;
|
|
||||||
CMyComPtr<ISequentialInStream> _stream;
|
|
||||||
UInt64 _processedSize;
|
|
||||||
UInt32 _bufferSize;
|
|
||||||
bool _wasFinished;
|
|
||||||
|
|
||||||
bool ReadBlock();
|
|
||||||
Byte ReadBlock2();
|
|
||||||
|
|
||||||
public:
|
|
||||||
#ifdef _NO_EXCEPTIONS
|
|
||||||
HRESULT ErrorCode;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CInBuffer();
|
|
||||||
~CInBuffer() { Free(); }
|
|
||||||
|
|
||||||
bool Create(UInt32 bufferSize);
|
|
||||||
void Free();
|
|
||||||
|
|
||||||
void SetStream(ISequentialInStream *stream);
|
|
||||||
void Init();
|
|
||||||
void ReleaseStream() { _stream.Release(); }
|
|
||||||
|
|
||||||
bool ReadByte(Byte &b)
|
|
||||||
{
|
|
||||||
if(_buffer >= _bufferLimit)
|
|
||||||
if(!ReadBlock())
|
|
||||||
return false;
|
|
||||||
b = *_buffer++;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
Byte ReadByte()
|
|
||||||
{
|
|
||||||
if(_buffer >= _bufferLimit)
|
|
||||||
return ReadBlock2();
|
|
||||||
return *_buffer++;
|
|
||||||
}
|
|
||||||
void ReadBytes(void *data, UInt32 size, UInt32 &processedSize)
|
|
||||||
{
|
|
||||||
for(processedSize = 0; processedSize < size; processedSize++)
|
|
||||||
if (!ReadByte(((Byte *)data)[processedSize]))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
bool ReadBytes(void *data, UInt32 size)
|
|
||||||
{
|
|
||||||
UInt32 processedSize;
|
|
||||||
ReadBytes(data, size, processedSize);
|
|
||||||
return (processedSize == size);
|
|
||||||
}
|
|
||||||
UInt64 GetProcessedSize() const { return _processedSize + (_buffer - _bufferBase); }
|
|
||||||
bool WasFinished() const { return _wasFinished; }
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,116 +0,0 @@
|
|||||||
// OutByte.cpp
|
|
||||||
|
|
||||||
#include "StdAfx.h"
|
|
||||||
|
|
||||||
#include "OutBuffer.h"
|
|
||||||
|
|
||||||
#include "../../Common/Alloc.h"
|
|
||||||
|
|
||||||
bool COutBuffer::Create(UInt32 bufferSize)
|
|
||||||
{
|
|
||||||
const UInt32 kMinBlockSize = 1;
|
|
||||||
if (bufferSize < kMinBlockSize)
|
|
||||||
bufferSize = kMinBlockSize;
|
|
||||||
if (_buffer != 0 && _bufferSize == bufferSize)
|
|
||||||
return true;
|
|
||||||
Free();
|
|
||||||
_bufferSize = bufferSize;
|
|
||||||
_buffer = (Byte *)::MidAlloc(bufferSize);
|
|
||||||
return (_buffer != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void COutBuffer::Free()
|
|
||||||
{
|
|
||||||
::MidFree(_buffer);
|
|
||||||
_buffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void COutBuffer::SetStream(ISequentialOutStream *stream)
|
|
||||||
{
|
|
||||||
_stream = stream;
|
|
||||||
}
|
|
||||||
|
|
||||||
void COutBuffer::Init()
|
|
||||||
{
|
|
||||||
_streamPos = 0;
|
|
||||||
_limitPos = _bufferSize;
|
|
||||||
_pos = 0;
|
|
||||||
_processedSize = 0;
|
|
||||||
_overDict = false;
|
|
||||||
#ifdef _NO_EXCEPTIONS
|
|
||||||
ErrorCode = S_OK;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt64 COutBuffer::GetProcessedSize() const
|
|
||||||
{
|
|
||||||
UInt64 res = _processedSize + _pos - _streamPos;
|
|
||||||
if (_streamPos > _pos)
|
|
||||||
res += _bufferSize;
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
HRESULT COutBuffer::FlushPart()
|
|
||||||
{
|
|
||||||
// _streamPos < _bufferSize
|
|
||||||
UInt32 size = (_streamPos >= _pos) ? (_bufferSize - _streamPos) : (_pos - _streamPos);
|
|
||||||
HRESULT result = S_OK;
|
|
||||||
#ifdef _NO_EXCEPTIONS
|
|
||||||
result = ErrorCode;
|
|
||||||
#endif
|
|
||||||
if (_buffer2 != 0)
|
|
||||||
{
|
|
||||||
memmove(_buffer2, _buffer + _streamPos, size);
|
|
||||||
_buffer2 += size;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_stream != 0
|
|
||||||
#ifdef _NO_EXCEPTIONS
|
|
||||||
&& (ErrorCode == S_OK)
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
UInt32 processedSize = 0;
|
|
||||||
result = _stream->Write(_buffer + _streamPos, size, &processedSize);
|
|
||||||
size = processedSize;
|
|
||||||
}
|
|
||||||
_streamPos += size;
|
|
||||||
if (_streamPos == _bufferSize)
|
|
||||||
_streamPos = 0;
|
|
||||||
if (_pos == _bufferSize)
|
|
||||||
{
|
|
||||||
_overDict = true;
|
|
||||||
_pos = 0;
|
|
||||||
}
|
|
||||||
_limitPos = (_streamPos > _pos) ? _streamPos : _bufferSize;
|
|
||||||
_processedSize += size;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT COutBuffer::Flush()
|
|
||||||
{
|
|
||||||
#ifdef _NO_EXCEPTIONS
|
|
||||||
if (ErrorCode != S_OK)
|
|
||||||
return ErrorCode;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while(_streamPos != _pos)
|
|
||||||
{
|
|
||||||
HRESULT result = FlushPart();
|
|
||||||
if (result != S_OK)
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void COutBuffer::FlushWithCheck()
|
|
||||||
{
|
|
||||||
HRESULT result = FlushPart();
|
|
||||||
#ifdef _NO_EXCEPTIONS
|
|
||||||
ErrorCode = result;
|
|
||||||
#else
|
|
||||||
if (result != S_OK)
|
|
||||||
throw COutBufferException(result);
|
|
||||||
#endif
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
// OutBuffer.h
|
|
||||||
|
|
||||||
#ifndef __OUTBUFFER_H
|
|
||||||
#define __OUTBUFFER_H
|
|
||||||
|
|
||||||
#include "../IStream.h"
|
|
||||||
#include "../../Common/MyCom.h"
|
|
||||||
|
|
||||||
#ifndef _NO_EXCEPTIONS
|
|
||||||
struct COutBufferException
|
|
||||||
{
|
|
||||||
HRESULT ErrorCode;
|
|
||||||
COutBufferException(HRESULT errorCode): ErrorCode(errorCode) {}
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class COutBuffer
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
Byte *_buffer;
|
|
||||||
UInt32 _pos;
|
|
||||||
UInt32 _limitPos;
|
|
||||||
UInt32 _streamPos;
|
|
||||||
UInt32 _bufferSize;
|
|
||||||
CMyComPtr<ISequentialOutStream> _stream;
|
|
||||||
UInt64 _processedSize;
|
|
||||||
Byte *_buffer2;
|
|
||||||
bool _overDict;
|
|
||||||
|
|
||||||
HRESULT FlushPart();
|
|
||||||
void FlushWithCheck();
|
|
||||||
public:
|
|
||||||
#ifdef _NO_EXCEPTIONS
|
|
||||||
HRESULT ErrorCode;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
COutBuffer(): _buffer(0), _pos(0), _stream(0), _buffer2(0) {}
|
|
||||||
~COutBuffer() { Free(); }
|
|
||||||
|
|
||||||
bool Create(UInt32 bufferSize);
|
|
||||||
void Free();
|
|
||||||
|
|
||||||
void SetMemStream(Byte *buffer) { _buffer2 = buffer; }
|
|
||||||
void SetStream(ISequentialOutStream *stream);
|
|
||||||
void Init();
|
|
||||||
HRESULT Flush();
|
|
||||||
void ReleaseStream() { _stream.Release(); }
|
|
||||||
|
|
||||||
void WriteByte(Byte b)
|
|
||||||
{
|
|
||||||
_buffer[_pos++] = b;
|
|
||||||
if(_pos == _limitPos)
|
|
||||||
FlushWithCheck();
|
|
||||||
}
|
|
||||||
void WriteBytes(const void *data, size_t size)
|
|
||||||
{
|
|
||||||
for (size_t i = 0; i < size; i++)
|
|
||||||
WriteByte(((const Byte *)data)[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt64 GetProcessedSize() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,9 +0,0 @@
|
|||||||
// StdAfx.h
|
|
||||||
|
|
||||||
#ifndef __STDAFX_H
|
|
||||||
#define __STDAFX_H
|
|
||||||
|
|
||||||
#include "../../Common/MyWindows.h"
|
|
||||||
#include "../../Common/NewHandler.h"
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,44 +0,0 @@
|
|||||||
// StreamUtils.cpp
|
|
||||||
|
|
||||||
#include "StdAfx.h"
|
|
||||||
|
|
||||||
#include "../../Common/MyCom.h"
|
|
||||||
#include "StreamUtils.h"
|
|
||||||
|
|
||||||
HRESULT ReadStream(ISequentialInStream *stream, void *data, UInt32 size, UInt32 *processedSize)
|
|
||||||
{
|
|
||||||
if (processedSize != 0)
|
|
||||||
*processedSize = 0;
|
|
||||||
while(size != 0)
|
|
||||||
{
|
|
||||||
UInt32 processedSizeLoc;
|
|
||||||
HRESULT res = stream->Read(data, size, &processedSizeLoc);
|
|
||||||
if (processedSize != 0)
|
|
||||||
*processedSize += processedSizeLoc;
|
|
||||||
data = (Byte *)((Byte *)data + processedSizeLoc);
|
|
||||||
size -= processedSizeLoc;
|
|
||||||
RINOK(res);
|
|
||||||
if (processedSizeLoc == 0)
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT WriteStream(ISequentialOutStream *stream, const void *data, UInt32 size, UInt32 *processedSize)
|
|
||||||
{
|
|
||||||
if (processedSize != 0)
|
|
||||||
*processedSize = 0;
|
|
||||||
while(size != 0)
|
|
||||||
{
|
|
||||||
UInt32 processedSizeLoc;
|
|
||||||
HRESULT res = stream->Write(data, size, &processedSizeLoc);
|
|
||||||
if (processedSize != 0)
|
|
||||||
*processedSize += processedSizeLoc;
|
|
||||||
data = (const void *)((const Byte *)data + processedSizeLoc);
|
|
||||||
size -= processedSizeLoc;
|
|
||||||
RINOK(res);
|
|
||||||
if (processedSizeLoc == 0)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
// StreamUtils.h
|
|
||||||
|
|
||||||
#ifndef __STREAMUTILS_H
|
|
||||||
#define __STREAMUTILS_H
|
|
||||||
|
|
||||||
#include "../IStream.h"
|
|
||||||
|
|
||||||
HRESULT ReadStream(ISequentialInStream *stream, void *data, UInt32 size, UInt32 *processedSize);
|
|
||||||
HRESULT WriteStream(ISequentialOutStream *stream, const void *data, UInt32 size, UInt32 *processedSize);
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,54 +0,0 @@
|
|||||||
// BinTree.h
|
|
||||||
|
|
||||||
#include "../LZInWindow.h"
|
|
||||||
#include "../IMatchFinder.h"
|
|
||||||
|
|
||||||
namespace BT_NAMESPACE {
|
|
||||||
|
|
||||||
typedef UInt32 CIndex;
|
|
||||||
const UInt32 kMaxValForNormalize = (UInt32(1) << 31) - 1;
|
|
||||||
|
|
||||||
class CMatchFinder:
|
|
||||||
public IMatchFinder,
|
|
||||||
public CLZInWindow,
|
|
||||||
public CMyUnknownImp,
|
|
||||||
public IMatchFinderSetNumPasses
|
|
||||||
{
|
|
||||||
UInt32 _cyclicBufferPos;
|
|
||||||
UInt32 _cyclicBufferSize; // it must be historySize + 1
|
|
||||||
UInt32 _matchMaxLen;
|
|
||||||
CIndex *_hash;
|
|
||||||
CIndex *_son;
|
|
||||||
UInt32 _hashMask;
|
|
||||||
UInt32 _cutValue;
|
|
||||||
UInt32 _hashSizeSum;
|
|
||||||
|
|
||||||
void Normalize();
|
|
||||||
void FreeThisClassMemory();
|
|
||||||
void FreeMemory();
|
|
||||||
|
|
||||||
MY_UNKNOWN_IMP
|
|
||||||
|
|
||||||
STDMETHOD(SetStream)(ISequentialInStream *inStream);
|
|
||||||
STDMETHOD_(void, ReleaseStream)();
|
|
||||||
STDMETHOD(Init)();
|
|
||||||
HRESULT MovePos();
|
|
||||||
STDMETHOD_(Byte, GetIndexByte)(Int32 index);
|
|
||||||
STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 back, UInt32 limit);
|
|
||||||
STDMETHOD_(UInt32, GetNumAvailableBytes)();
|
|
||||||
STDMETHOD_(const Byte *, GetPointerToCurrentPos)();
|
|
||||||
STDMETHOD_(Int32, NeedChangeBufferPos)(UInt32 numCheckBytes);
|
|
||||||
STDMETHOD_(void, ChangeBufferPos)();
|
|
||||||
|
|
||||||
STDMETHOD(Create)(UInt32 historySize, UInt32 keepAddBufferBefore,
|
|
||||||
UInt32 matchMaxLen, UInt32 keepAddBufferAfter);
|
|
||||||
STDMETHOD(GetMatches)(UInt32 *distances);
|
|
||||||
STDMETHOD(Skip)(UInt32 num);
|
|
||||||
|
|
||||||
public:
|
|
||||||
CMatchFinder();
|
|
||||||
virtual ~CMatchFinder();
|
|
||||||
virtual void SetNumPasses(UInt32 numPasses) { _cutValue = numPasses; }
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
// BinTree2.h
|
|
||||||
|
|
||||||
#ifndef __BINTREE2_H
|
|
||||||
#define __BINTREE2_H
|
|
||||||
|
|
||||||
#define BT_NAMESPACE NBT2
|
|
||||||
|
|
||||||
#include "BinTreeMain.h"
|
|
||||||
|
|
||||||
#undef BT_NAMESPACE
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,16 +0,0 @@
|
|||||||
// BinTree3.h
|
|
||||||
|
|
||||||
#ifndef __BINTREE3_H
|
|
||||||
#define __BINTREE3_H
|
|
||||||
|
|
||||||
#define BT_NAMESPACE NBT3
|
|
||||||
|
|
||||||
#define HASH_ARRAY_2
|
|
||||||
|
|
||||||
#include "BinTreeMain.h"
|
|
||||||
|
|
||||||
#undef HASH_ARRAY_2
|
|
||||||
|
|
||||||
#undef BT_NAMESPACE
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,18 +0,0 @@
|
|||||||
// BinTree4.h
|
|
||||||
|
|
||||||
#ifndef __BINTREE4_H
|
|
||||||
#define __BINTREE4_H
|
|
||||||
|
|
||||||
#define BT_NAMESPACE NBT4
|
|
||||||
|
|
||||||
#define HASH_ARRAY_2
|
|
||||||
#define HASH_ARRAY_3
|
|
||||||
|
|
||||||
#include "BinTreeMain.h"
|
|
||||||
|
|
||||||
#undef HASH_ARRAY_2
|
|
||||||
#undef HASH_ARRAY_3
|
|
||||||
|
|
||||||
#undef BT_NAMESPACE
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,531 +0,0 @@
|
|||||||
// BinTreeMain.h
|
|
||||||
|
|
||||||
#include "../../../../Common/Defs.h"
|
|
||||||
#include "../../../../Common/CRC.h"
|
|
||||||
#include "../../../../Common/Alloc.h"
|
|
||||||
|
|
||||||
#include "BinTree.h"
|
|
||||||
|
|
||||||
// #include <xmmintrin.h>
|
|
||||||
// It's for prefetch
|
|
||||||
// But prefetch doesn't give big gain in K8.
|
|
||||||
|
|
||||||
namespace BT_NAMESPACE {
|
|
||||||
|
|
||||||
#ifdef HASH_ARRAY_2
|
|
||||||
static const UInt32 kHash2Size = 1 << 10;
|
|
||||||
#define kNumHashDirectBytes 0
|
|
||||||
#ifdef HASH_ARRAY_3
|
|
||||||
static const UInt32 kNumHashBytes = 4;
|
|
||||||
static const UInt32 kHash3Size = 1 << 16;
|
|
||||||
#else
|
|
||||||
static const UInt32 kNumHashBytes = 3;
|
|
||||||
#endif
|
|
||||||
static const UInt32 kHashSize = 0;
|
|
||||||
static const UInt32 kMinMatchCheck = kNumHashBytes;
|
|
||||||
static const UInt32 kStartMaxLen = 1;
|
|
||||||
#else
|
|
||||||
#ifdef HASH_ZIP
|
|
||||||
#define kNumHashDirectBytes 0
|
|
||||||
static const UInt32 kNumHashBytes = 3;
|
|
||||||
static const UInt32 kHashSize = 1 << 16;
|
|
||||||
static const UInt32 kMinMatchCheck = kNumHashBytes;
|
|
||||||
static const UInt32 kStartMaxLen = 1;
|
|
||||||
#else
|
|
||||||
#define kNumHashDirectBytes 2
|
|
||||||
static const UInt32 kNumHashBytes = 2;
|
|
||||||
static const UInt32 kHashSize = 1 << (8 * kNumHashBytes);
|
|
||||||
static const UInt32 kMinMatchCheck = kNumHashBytes + 1;
|
|
||||||
static const UInt32 kStartMaxLen = 1;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HASH_ARRAY_2
|
|
||||||
#ifdef HASH_ARRAY_3
|
|
||||||
static const UInt32 kHash3Offset = kHash2Size;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const UInt32 kFixHashSize = 0
|
|
||||||
#ifdef HASH_ARRAY_2
|
|
||||||
+ kHash2Size
|
|
||||||
#ifdef HASH_ARRAY_3
|
|
||||||
+ kHash3Size
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
CMatchFinder::CMatchFinder():
|
|
||||||
_hash(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void CMatchFinder::FreeThisClassMemory()
|
|
||||||
{
|
|
||||||
BigFree(_hash);
|
|
||||||
_hash = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CMatchFinder::FreeMemory()
|
|
||||||
{
|
|
||||||
FreeThisClassMemory();
|
|
||||||
CLZInWindow::Free();
|
|
||||||
}
|
|
||||||
|
|
||||||
CMatchFinder::~CMatchFinder()
|
|
||||||
{
|
|
||||||
FreeMemory();
|
|
||||||
}
|
|
||||||
|
|
||||||
STDMETHODIMP CMatchFinder::Create(UInt32 historySize, UInt32 keepAddBufferBefore,
|
|
||||||
UInt32 matchMaxLen, UInt32 keepAddBufferAfter)
|
|
||||||
{
|
|
||||||
if (historySize > kMaxValForNormalize - 256)
|
|
||||||
{
|
|
||||||
FreeMemory();
|
|
||||||
return E_INVALIDARG;
|
|
||||||
}
|
|
||||||
_cutValue =
|
|
||||||
#ifdef _HASH_CHAIN
|
|
||||||
8 + (matchMaxLen >> 2);
|
|
||||||
#else
|
|
||||||
16 + (matchMaxLen >> 1);
|
|
||||||
#endif
|
|
||||||
UInt32 sizeReserv = (historySize + keepAddBufferBefore +
|
|
||||||
matchMaxLen + keepAddBufferAfter) / 2 + 256;
|
|
||||||
if (CLZInWindow::Create(historySize + keepAddBufferBefore,
|
|
||||||
matchMaxLen + keepAddBufferAfter, sizeReserv))
|
|
||||||
{
|
|
||||||
_matchMaxLen = matchMaxLen;
|
|
||||||
UInt32 newCyclicBufferSize = historySize + 1;
|
|
||||||
if (_hash != 0 && newCyclicBufferSize == _cyclicBufferSize)
|
|
||||||
return S_OK;
|
|
||||||
FreeThisClassMemory();
|
|
||||||
_cyclicBufferSize = newCyclicBufferSize; // don't change it
|
|
||||||
|
|
||||||
UInt32 hs = kHashSize;
|
|
||||||
|
|
||||||
#ifdef HASH_ARRAY_2
|
|
||||||
hs = historySize - 1;
|
|
||||||
hs |= (hs >> 1);
|
|
||||||
hs |= (hs >> 2);
|
|
||||||
hs |= (hs >> 4);
|
|
||||||
hs |= (hs >> 8);
|
|
||||||
hs >>= 1;
|
|
||||||
hs |= 0xFFFF;
|
|
||||||
if (hs > (1 << 24))
|
|
||||||
{
|
|
||||||
#ifdef HASH_ARRAY_3
|
|
||||||
hs >>= 1;
|
|
||||||
#else
|
|
||||||
hs = (1 << 24) - 1;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
_hashMask = hs;
|
|
||||||
hs++;
|
|
||||||
#endif
|
|
||||||
_hashSizeSum = hs + kFixHashSize;
|
|
||||||
UInt32 numItems = _hashSizeSum + _cyclicBufferSize
|
|
||||||
#ifndef _HASH_CHAIN
|
|
||||||
* 2
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
size_t sizeInBytes = (size_t)numItems * sizeof(CIndex);
|
|
||||||
if (sizeInBytes / sizeof(CIndex) != numItems)
|
|
||||||
return E_OUTOFMEMORY;
|
|
||||||
_hash = (CIndex *)BigAlloc(sizeInBytes);
|
|
||||||
_son = _hash + _hashSizeSum;
|
|
||||||
if (_hash != 0)
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
FreeMemory();
|
|
||||||
return E_OUTOFMEMORY;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const UInt32 kEmptyHashValue = 0;
|
|
||||||
|
|
||||||
STDMETHODIMP CMatchFinder::SetStream(ISequentialInStream *stream)
|
|
||||||
{
|
|
||||||
CLZInWindow::SetStream(stream);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
STDMETHODIMP CMatchFinder::Init()
|
|
||||||
{
|
|
||||||
RINOK(CLZInWindow::Init());
|
|
||||||
for(UInt32 i = 0; i < _hashSizeSum; i++)
|
|
||||||
_hash[i] = kEmptyHashValue;
|
|
||||||
_cyclicBufferPos = 0;
|
|
||||||
ReduceOffsets(-1);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
STDMETHODIMP_(void) CMatchFinder::ReleaseStream()
|
|
||||||
{
|
|
||||||
// ReleaseStream();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HASH_ARRAY_2
|
|
||||||
#ifdef HASH_ARRAY_3
|
|
||||||
|
|
||||||
#define HASH_CALC { \
|
|
||||||
UInt32 temp = CCRC::Table[cur[0]] ^ cur[1]; \
|
|
||||||
hash2Value = temp & (kHash2Size - 1); \
|
|
||||||
hash3Value = (temp ^ (UInt32(cur[2]) << 8)) & (kHash3Size - 1); \
|
|
||||||
hashValue = (temp ^ (UInt32(cur[2]) << 8) ^ (CCRC::Table[cur[3]] << 5)) & _hashMask; }
|
|
||||||
|
|
||||||
#else // no HASH_ARRAY_3
|
|
||||||
#define HASH_CALC { \
|
|
||||||
UInt32 temp = CCRC::Table[cur[0]] ^ cur[1]; \
|
|
||||||
hash2Value = temp & (kHash2Size - 1); \
|
|
||||||
hashValue = (temp ^ (UInt32(cur[2]) << 8)) & _hashMask; }
|
|
||||||
#endif // HASH_ARRAY_3
|
|
||||||
#else // no HASH_ARRAY_2
|
|
||||||
#ifdef HASH_ZIP
|
|
||||||
inline UInt32 Hash(const Byte *pointer)
|
|
||||||
{
|
|
||||||
return ((UInt32(pointer[0]) << 8) ^ CCRC::Table[pointer[1]] ^ pointer[2]) & (kHashSize - 1);
|
|
||||||
}
|
|
||||||
#else // no HASH_ZIP
|
|
||||||
inline UInt32 Hash(const Byte *pointer)
|
|
||||||
{
|
|
||||||
return pointer[0] ^ (UInt32(pointer[1]) << 8);
|
|
||||||
}
|
|
||||||
#endif // HASH_ZIP
|
|
||||||
#endif // HASH_ARRAY_2
|
|
||||||
|
|
||||||
STDMETHODIMP CMatchFinder::GetMatches(UInt32 *distances)
|
|
||||||
{
|
|
||||||
UInt32 lenLimit;
|
|
||||||
if (_pos + _matchMaxLen <= _streamPos)
|
|
||||||
lenLimit = _matchMaxLen;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lenLimit = _streamPos - _pos;
|
|
||||||
if(lenLimit < kMinMatchCheck)
|
|
||||||
{
|
|
||||||
distances[0] = 0;
|
|
||||||
return MovePos();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int offset = 1;
|
|
||||||
|
|
||||||
UInt32 matchMinPos = (_pos > _cyclicBufferSize) ? (_pos - _cyclicBufferSize) : 0;
|
|
||||||
const Byte *cur = _buffer + _pos;
|
|
||||||
|
|
||||||
UInt32 maxLen = kStartMaxLen; // to avoid items for len < hashSize;
|
|
||||||
|
|
||||||
#ifdef HASH_ARRAY_2
|
|
||||||
UInt32 hash2Value;
|
|
||||||
#ifdef HASH_ARRAY_3
|
|
||||||
UInt32 hash3Value;
|
|
||||||
#endif
|
|
||||||
UInt32 hashValue;
|
|
||||||
HASH_CALC;
|
|
||||||
#else
|
|
||||||
UInt32 hashValue = Hash(cur);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UInt32 curMatch = _hash[kFixHashSize + hashValue];
|
|
||||||
#ifdef HASH_ARRAY_2
|
|
||||||
UInt32 curMatch2 = _hash[hash2Value];
|
|
||||||
#ifdef HASH_ARRAY_3
|
|
||||||
UInt32 curMatch3 = _hash[kHash3Offset + hash3Value];
|
|
||||||
#endif
|
|
||||||
_hash[hash2Value] = _pos;
|
|
||||||
if(curMatch2 > matchMinPos)
|
|
||||||
if (_buffer[curMatch2] == cur[0])
|
|
||||||
{
|
|
||||||
distances[offset++] = maxLen = 2;
|
|
||||||
distances[offset++] = _pos - curMatch2 - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HASH_ARRAY_3
|
|
||||||
_hash[kHash3Offset + hash3Value] = _pos;
|
|
||||||
if(curMatch3 > matchMinPos)
|
|
||||||
if (_buffer[curMatch3] == cur[0])
|
|
||||||
{
|
|
||||||
if (curMatch3 == curMatch2)
|
|
||||||
offset -= 2;
|
|
||||||
distances[offset++] = maxLen = 3;
|
|
||||||
distances[offset++] = _pos - curMatch3 - 1;
|
|
||||||
curMatch2 = curMatch3;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (offset != 1 && curMatch2 == curMatch)
|
|
||||||
{
|
|
||||||
offset -= 2;
|
|
||||||
maxLen = kStartMaxLen;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_hash[kFixHashSize + hashValue] = _pos;
|
|
||||||
|
|
||||||
CIndex *son = _son;
|
|
||||||
|
|
||||||
#ifdef _HASH_CHAIN
|
|
||||||
son[_cyclicBufferPos] = curMatch;
|
|
||||||
#else
|
|
||||||
CIndex *ptr0 = son + (_cyclicBufferPos << 1) + 1;
|
|
||||||
CIndex *ptr1 = son + (_cyclicBufferPos << 1);
|
|
||||||
|
|
||||||
UInt32 len0, len1;
|
|
||||||
len0 = len1 = kNumHashDirectBytes;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if kNumHashDirectBytes != 0
|
|
||||||
if(curMatch > matchMinPos)
|
|
||||||
{
|
|
||||||
if (_buffer[curMatch + kNumHashDirectBytes] != cur[kNumHashDirectBytes])
|
|
||||||
{
|
|
||||||
distances[offset++] = maxLen = kNumHashDirectBytes;
|
|
||||||
distances[offset++] = _pos - curMatch - 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
UInt32 count = _cutValue;
|
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
if(curMatch <= matchMinPos || count-- == 0)
|
|
||||||
{
|
|
||||||
#ifndef _HASH_CHAIN
|
|
||||||
*ptr0 = *ptr1 = kEmptyHashValue;
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
UInt32 delta = _pos - curMatch;
|
|
||||||
UInt32 cyclicPos = (delta <= _cyclicBufferPos) ?
|
|
||||||
(_cyclicBufferPos - delta):
|
|
||||||
(_cyclicBufferPos - delta + _cyclicBufferSize);
|
|
||||||
CIndex *pair = son +
|
|
||||||
#ifdef _HASH_CHAIN
|
|
||||||
cyclicPos;
|
|
||||||
#else
|
|
||||||
(cyclicPos << 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// _mm_prefetch((const char *)pair, _MM_HINT_T0);
|
|
||||||
|
|
||||||
const Byte *pb = _buffer + curMatch;
|
|
||||||
UInt32 len =
|
|
||||||
#ifdef _HASH_CHAIN
|
|
||||||
kNumHashDirectBytes;
|
|
||||||
if (pb[maxLen] == cur[maxLen])
|
|
||||||
#else
|
|
||||||
MyMin(len0, len1);
|
|
||||||
#endif
|
|
||||||
if (pb[len] == cur[len])
|
|
||||||
{
|
|
||||||
while(++len != lenLimit)
|
|
||||||
if (pb[len] != cur[len])
|
|
||||||
break;
|
|
||||||
if (maxLen < len)
|
|
||||||
{
|
|
||||||
distances[offset++] = maxLen = len;
|
|
||||||
distances[offset++] = delta - 1;
|
|
||||||
if (len == lenLimit)
|
|
||||||
{
|
|
||||||
#ifndef _HASH_CHAIN
|
|
||||||
*ptr1 = pair[0];
|
|
||||||
*ptr0 = pair[1];
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#ifdef _HASH_CHAIN
|
|
||||||
curMatch = *pair;
|
|
||||||
#else
|
|
||||||
if (pb[len] < cur[len])
|
|
||||||
{
|
|
||||||
*ptr1 = curMatch;
|
|
||||||
ptr1 = pair + 1;
|
|
||||||
curMatch = *ptr1;
|
|
||||||
len1 = len;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*ptr0 = curMatch;
|
|
||||||
ptr0 = pair;
|
|
||||||
curMatch = *ptr0;
|
|
||||||
len0 = len;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
distances[0] = offset - 1;
|
|
||||||
if (++_cyclicBufferPos == _cyclicBufferSize)
|
|
||||||
_cyclicBufferPos = 0;
|
|
||||||
RINOK(CLZInWindow::MovePos());
|
|
||||||
if (_pos == kMaxValForNormalize)
|
|
||||||
Normalize();
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
STDMETHODIMP CMatchFinder::Skip(UInt32 num)
|
|
||||||
{
|
|
||||||
do
|
|
||||||
{
|
|
||||||
#ifdef _HASH_CHAIN
|
|
||||||
if (_streamPos - _pos < kNumHashBytes)
|
|
||||||
{
|
|
||||||
RINOK(MovePos());
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
UInt32 lenLimit;
|
|
||||||
if (_pos + _matchMaxLen <= _streamPos)
|
|
||||||
lenLimit = _matchMaxLen;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lenLimit = _streamPos - _pos;
|
|
||||||
if(lenLimit < kMinMatchCheck)
|
|
||||||
{
|
|
||||||
RINOK(MovePos());
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UInt32 matchMinPos = (_pos > _cyclicBufferSize) ? (_pos - _cyclicBufferSize) : 0;
|
|
||||||
#endif
|
|
||||||
const Byte *cur = _buffer + _pos;
|
|
||||||
|
|
||||||
#ifdef HASH_ARRAY_2
|
|
||||||
UInt32 hash2Value;
|
|
||||||
#ifdef HASH_ARRAY_3
|
|
||||||
UInt32 hash3Value;
|
|
||||||
UInt32 hashValue;
|
|
||||||
HASH_CALC;
|
|
||||||
_hash[kHash3Offset + hash3Value] = _pos;
|
|
||||||
#else
|
|
||||||
UInt32 hashValue;
|
|
||||||
HASH_CALC;
|
|
||||||
#endif
|
|
||||||
_hash[hash2Value] = _pos;
|
|
||||||
#else
|
|
||||||
UInt32 hashValue = Hash(cur);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UInt32 curMatch = _hash[kFixHashSize + hashValue];
|
|
||||||
_hash[kFixHashSize + hashValue] = _pos;
|
|
||||||
|
|
||||||
#ifdef _HASH_CHAIN
|
|
||||||
_son[_cyclicBufferPos] = curMatch;
|
|
||||||
#else
|
|
||||||
CIndex *son = _son;
|
|
||||||
CIndex *ptr0 = son + (_cyclicBufferPos << 1) + 1;
|
|
||||||
CIndex *ptr1 = son + (_cyclicBufferPos << 1);
|
|
||||||
|
|
||||||
UInt32 len0, len1;
|
|
||||||
len0 = len1 = kNumHashDirectBytes;
|
|
||||||
UInt32 count = _cutValue;
|
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
if(curMatch <= matchMinPos || count-- == 0)
|
|
||||||
{
|
|
||||||
*ptr0 = *ptr1 = kEmptyHashValue;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt32 delta = _pos - curMatch;
|
|
||||||
UInt32 cyclicPos = (delta <= _cyclicBufferPos) ?
|
|
||||||
(_cyclicBufferPos - delta):
|
|
||||||
(_cyclicBufferPos - delta + _cyclicBufferSize);
|
|
||||||
CIndex *pair = son + (cyclicPos << 1);
|
|
||||||
|
|
||||||
// _mm_prefetch((const char *)pair, _MM_HINT_T0);
|
|
||||||
|
|
||||||
const Byte *pb = _buffer + curMatch;
|
|
||||||
UInt32 len = MyMin(len0, len1);
|
|
||||||
|
|
||||||
if (pb[len] == cur[len])
|
|
||||||
{
|
|
||||||
while(++len != lenLimit)
|
|
||||||
if (pb[len] != cur[len])
|
|
||||||
break;
|
|
||||||
if (len == lenLimit)
|
|
||||||
{
|
|
||||||
*ptr1 = pair[0];
|
|
||||||
*ptr0 = pair[1];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (pb[len] < cur[len])
|
|
||||||
{
|
|
||||||
*ptr1 = curMatch;
|
|
||||||
ptr1 = pair + 1;
|
|
||||||
curMatch = *ptr1;
|
|
||||||
len1 = len;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*ptr0 = curMatch;
|
|
||||||
ptr0 = pair;
|
|
||||||
curMatch = *ptr0;
|
|
||||||
len0 = len;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (++_cyclicBufferPos == _cyclicBufferSize)
|
|
||||||
_cyclicBufferPos = 0;
|
|
||||||
RINOK(CLZInWindow::MovePos());
|
|
||||||
if (_pos == kMaxValForNormalize)
|
|
||||||
Normalize();
|
|
||||||
}
|
|
||||||
while(--num != 0);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CMatchFinder::Normalize()
|
|
||||||
{
|
|
||||||
UInt32 subValue = _pos - _cyclicBufferSize;
|
|
||||||
CIndex *items = _hash;
|
|
||||||
UInt32 numItems = (_hashSizeSum + _cyclicBufferSize
|
|
||||||
#ifndef _HASH_CHAIN
|
|
||||||
* 2
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
for (UInt32 i = 0; i < numItems; i++)
|
|
||||||
{
|
|
||||||
UInt32 value = items[i];
|
|
||||||
if (value <= subValue)
|
|
||||||
value = kEmptyHashValue;
|
|
||||||
else
|
|
||||||
value -= subValue;
|
|
||||||
items[i] = value;
|
|
||||||
}
|
|
||||||
ReduceOffsets(subValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT CMatchFinder::MovePos()
|
|
||||||
{
|
|
||||||
if (++_cyclicBufferPos == _cyclicBufferSize)
|
|
||||||
_cyclicBufferPos = 0;
|
|
||||||
RINOK(CLZInWindow::MovePos());
|
|
||||||
if (_pos == kMaxValForNormalize)
|
|
||||||
Normalize();
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
STDMETHODIMP_(Byte) CMatchFinder::GetIndexByte(Int32 index)
|
|
||||||
{ return CLZInWindow::GetIndexByte(index); }
|
|
||||||
|
|
||||||
STDMETHODIMP_(UInt32) CMatchFinder::GetMatchLen(Int32 index,
|
|
||||||
UInt32 back, UInt32 limit)
|
|
||||||
{ return CLZInWindow::GetMatchLen(index, back, limit); }
|
|
||||||
|
|
||||||
STDMETHODIMP_(UInt32) CMatchFinder::GetNumAvailableBytes()
|
|
||||||
{ return CLZInWindow::GetNumAvailableBytes(); }
|
|
||||||
|
|
||||||
STDMETHODIMP_(const Byte *) CMatchFinder::GetPointerToCurrentPos()
|
|
||||||
{ return CLZInWindow::GetPointerToCurrentPos(); }
|
|
||||||
|
|
||||||
STDMETHODIMP_(Int32) CMatchFinder::NeedChangeBufferPos(UInt32 numCheckBytes)
|
|
||||||
{ return CLZInWindow::NeedMove(numCheckBytes) ? 1: 0; }
|
|
||||||
|
|
||||||
STDMETHODIMP_(void) CMatchFinder::ChangeBufferPos()
|
|
||||||
{ CLZInWindow::MoveBlock();}
|
|
||||||
|
|
||||||
#undef HASH_CALC
|
|
||||||
#undef kNumHashDirectBytes
|
|
||||||
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
// HC4.h
|
|
||||||
|
|
||||||
#ifndef __HC4_H
|
|
||||||
#define __HC4_H
|
|
||||||
|
|
||||||
#define BT_NAMESPACE NHC4
|
|
||||||
|
|
||||||
#define HASH_ARRAY_2
|
|
||||||
#define HASH_ARRAY_3
|
|
||||||
|
|
||||||
#include "HCMain.h"
|
|
||||||
|
|
||||||
#undef HASH_ARRAY_2
|
|
||||||
#undef HASH_ARRAY_3
|
|
||||||
|
|
||||||
#undef BT_NAMESPACE
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,5 +0,0 @@
|
|||||||
// HCMain.h
|
|
||||||
|
|
||||||
#define _HASH_CHAIN
|
|
||||||
#include "../BinTree/BinTreeMain.h"
|
|
||||||
#undef _HASH_CHAIN
|
|
@ -1,33 +0,0 @@
|
|||||||
// MatchFinders/IMatchFinder.h
|
|
||||||
|
|
||||||
#ifndef __IMATCHFINDER_H
|
|
||||||
#define __IMATCHFINDER_H
|
|
||||||
|
|
||||||
struct IInWindowStream: public IUnknown
|
|
||||||
{
|
|
||||||
STDMETHOD(SetStream)(ISequentialInStream *inStream) PURE;
|
|
||||||
STDMETHOD_(void, ReleaseStream)() PURE;
|
|
||||||
STDMETHOD(Init)() PURE;
|
|
||||||
STDMETHOD_(Byte, GetIndexByte)(Int32 index) PURE;
|
|
||||||
STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 distance, UInt32 limit) PURE;
|
|
||||||
STDMETHOD_(UInt32, GetNumAvailableBytes)() PURE;
|
|
||||||
STDMETHOD_(const Byte *, GetPointerToCurrentPos)() PURE;
|
|
||||||
STDMETHOD_(Int32, NeedChangeBufferPos)(UInt32 numCheckBytes) PURE;
|
|
||||||
STDMETHOD_(void, ChangeBufferPos)() PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct IMatchFinder: public IInWindowStream
|
|
||||||
{
|
|
||||||
STDMETHOD(Create)(UInt32 historySize, UInt32 keepAddBufferBefore,
|
|
||||||
UInt32 matchMaxLen, UInt32 keepAddBufferAfter) PURE;
|
|
||||||
STDMETHOD(GetMatches)(UInt32 *distances) PURE;
|
|
||||||
STDMETHOD(Skip)(UInt32 num) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct IMatchFinderSetNumPasses
|
|
||||||
{
|
|
||||||
//virtual ~IMatchFinderSetNumPasses(){}
|
|
||||||
virtual void SetNumPasses(UInt32 numPasses) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,105 +0,0 @@
|
|||||||
// LZInWindow.cpp
|
|
||||||
|
|
||||||
#include "StdAfx.h"
|
|
||||||
|
|
||||||
#include "LZInWindow.h"
|
|
||||||
#include "../../../Common/MyCom.h"
|
|
||||||
#include "../../../Common/Alloc.h"
|
|
||||||
|
|
||||||
void CLZInWindow::Free()
|
|
||||||
{
|
|
||||||
::BigFree(_bufferBase);
|
|
||||||
_bufferBase = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CLZInWindow::Create(UInt32 keepSizeBefore, UInt32 keepSizeAfter, UInt32 keepSizeReserv)
|
|
||||||
{
|
|
||||||
_keepSizeBefore = keepSizeBefore;
|
|
||||||
_keepSizeAfter = keepSizeAfter;
|
|
||||||
UInt32 blockSize = keepSizeBefore + keepSizeAfter + keepSizeReserv;
|
|
||||||
if (_bufferBase == 0 || _blockSize != blockSize)
|
|
||||||
{
|
|
||||||
Free();
|
|
||||||
_blockSize = blockSize;
|
|
||||||
if (_blockSize != 0)
|
|
||||||
_bufferBase = (Byte *)::BigAlloc(_blockSize);
|
|
||||||
}
|
|
||||||
_pointerToLastSafePosition = _bufferBase + _blockSize - keepSizeAfter;
|
|
||||||
if (_blockSize == 0)
|
|
||||||
return true;
|
|
||||||
return (_bufferBase != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CLZInWindow::SetStream(ISequentialInStream *stream)
|
|
||||||
{
|
|
||||||
_stream = stream;
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT CLZInWindow::Init()
|
|
||||||
{
|
|
||||||
_buffer = _bufferBase;
|
|
||||||
_pos = 0;
|
|
||||||
_streamPos = 0;
|
|
||||||
_streamEndWasReached = false;
|
|
||||||
return ReadBlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
void CLZInWindow::ReleaseStream()
|
|
||||||
{
|
|
||||||
_stream.Release();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
///////////////////////////////////////////
|
|
||||||
// ReadBlock
|
|
||||||
|
|
||||||
// In State:
|
|
||||||
// (_buffer + _streamPos) <= (_bufferBase + _blockSize)
|
|
||||||
// Out State:
|
|
||||||
// _posLimit <= _blockSize - _keepSizeAfter;
|
|
||||||
// if(_streamEndWasReached == false):
|
|
||||||
// _streamPos >= _pos + _keepSizeAfter
|
|
||||||
// _posLimit = _streamPos - _keepSizeAfter;
|
|
||||||
// else
|
|
||||||
//
|
|
||||||
|
|
||||||
HRESULT CLZInWindow::ReadBlock()
|
|
||||||
{
|
|
||||||
if(_streamEndWasReached)
|
|
||||||
return S_OK;
|
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
UInt32 size = (UInt32)(_bufferBase - _buffer) + _blockSize - _streamPos;
|
|
||||||
if(size == 0)
|
|
||||||
return S_OK;
|
|
||||||
UInt32 numReadBytes;
|
|
||||||
RINOK(_stream->Read(_buffer + _streamPos, size, &numReadBytes));
|
|
||||||
if(numReadBytes == 0)
|
|
||||||
{
|
|
||||||
_posLimit = _streamPos;
|
|
||||||
const Byte *pointerToPostion = _buffer + _posLimit;
|
|
||||||
if(pointerToPostion > _pointerToLastSafePosition)
|
|
||||||
_posLimit = (UInt32)(_pointerToLastSafePosition - _buffer);
|
|
||||||
_streamEndWasReached = true;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
_streamPos += numReadBytes;
|
|
||||||
if(_streamPos >= _pos + _keepSizeAfter)
|
|
||||||
{
|
|
||||||
_posLimit = _streamPos - _keepSizeAfter;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CLZInWindow::MoveBlock()
|
|
||||||
{
|
|
||||||
UInt32 offset = (UInt32)(_buffer - _bufferBase) + _pos - _keepSizeBefore;
|
|
||||||
// we need one additional byte, since MovePos moves on 1 byte.
|
|
||||||
if (offset > 0)
|
|
||||||
offset--;
|
|
||||||
UInt32 numBytes = (UInt32)(_buffer - _bufferBase) + _streamPos - offset;
|
|
||||||
memmove(_bufferBase, _bufferBase + offset, numBytes);
|
|
||||||
_buffer -= offset;
|
|
||||||
}
|
|
@ -1,87 +0,0 @@
|
|||||||
// LZInWindow.h
|
|
||||||
|
|
||||||
#ifndef __LZ_IN_WINDOW_H
|
|
||||||
#define __LZ_IN_WINDOW_H
|
|
||||||
|
|
||||||
#include "../../IStream.h"
|
|
||||||
|
|
||||||
class CLZInWindow
|
|
||||||
{
|
|
||||||
Byte *_bufferBase; // pointer to buffer with data
|
|
||||||
ISequentialInStream *_stream;
|
|
||||||
UInt32 _posLimit; // offset (from _buffer) when new block reading must be done
|
|
||||||
bool _streamEndWasReached; // if (true) then _streamPos shows real end of stream
|
|
||||||
const Byte *_pointerToLastSafePosition;
|
|
||||||
protected:
|
|
||||||
Byte *_buffer; // Pointer to virtual Buffer begin
|
|
||||||
UInt32 _blockSize; // Size of Allocated memory block
|
|
||||||
UInt32 _pos; // offset (from _buffer) of curent byte
|
|
||||||
UInt32 _keepSizeBefore; // how many BYTEs must be kept in buffer before _pos
|
|
||||||
UInt32 _keepSizeAfter; // how many BYTEs must be kept buffer after _pos
|
|
||||||
UInt32 _streamPos; // offset (from _buffer) of first not read byte from Stream
|
|
||||||
|
|
||||||
void MoveBlock();
|
|
||||||
HRESULT ReadBlock();
|
|
||||||
void Free();
|
|
||||||
public:
|
|
||||||
CLZInWindow(): _bufferBase(0) {}
|
|
||||||
virtual ~CLZInWindow() { Free(); }
|
|
||||||
|
|
||||||
// keepSizeBefore + keepSizeAfter + keepSizeReserv < 4G)
|
|
||||||
bool Create(UInt32 keepSizeBefore, UInt32 keepSizeAfter, UInt32 keepSizeReserv = (1<<17));
|
|
||||||
|
|
||||||
void SetStream(ISequentialInStream *stream);
|
|
||||||
HRESULT Init();
|
|
||||||
// void ReleaseStream();
|
|
||||||
|
|
||||||
Byte *GetBuffer() const { return _buffer; }
|
|
||||||
|
|
||||||
const Byte *GetPointerToCurrentPos() const { return _buffer + _pos; }
|
|
||||||
|
|
||||||
HRESULT MovePos()
|
|
||||||
{
|
|
||||||
_pos++;
|
|
||||||
if (_pos > _posLimit)
|
|
||||||
{
|
|
||||||
const Byte *pointerToPostion = _buffer + _pos;
|
|
||||||
if(pointerToPostion > _pointerToLastSafePosition)
|
|
||||||
MoveBlock();
|
|
||||||
return ReadBlock();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
Byte GetIndexByte(Int32 index) const { return _buffer[(size_t)_pos + index]; }
|
|
||||||
|
|
||||||
// index + limit have not to exceed _keepSizeAfter;
|
|
||||||
// -2G <= index < 2G
|
|
||||||
UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit) const
|
|
||||||
{
|
|
||||||
if(_streamEndWasReached)
|
|
||||||
if ((_pos + index) + limit > _streamPos)
|
|
||||||
limit = _streamPos - (_pos + index);
|
|
||||||
distance++;
|
|
||||||
const Byte *pby = _buffer + (size_t)_pos + index;
|
|
||||||
UInt32 i;
|
|
||||||
for(i = 0; i < limit && pby[i] == pby[(size_t)i - distance]; i++);
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt32 GetNumAvailableBytes() const { return _streamPos - _pos; }
|
|
||||||
|
|
||||||
void ReduceOffsets(Int32 subValue)
|
|
||||||
{
|
|
||||||
_buffer += subValue;
|
|
||||||
_posLimit -= subValue;
|
|
||||||
_pos -= subValue;
|
|
||||||
_streamPos -= subValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool NeedMove(UInt32 numCheckBytes)
|
|
||||||
{
|
|
||||||
UInt32 reserv = _pointerToLastSafePosition - (_buffer + _pos);
|
|
||||||
return (reserv <= numCheckBytes);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,6 +0,0 @@
|
|||||||
// StdAfx.h
|
|
||||||
|
|
||||||
#ifndef __STDAFX_H
|
|
||||||
#define __STDAFX_H
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,82 +0,0 @@
|
|||||||
// LZMA.h
|
|
||||||
|
|
||||||
#ifndef __LZMA_H
|
|
||||||
#define __LZMA_H
|
|
||||||
|
|
||||||
namespace NCompress {
|
|
||||||
namespace NLZMA {
|
|
||||||
|
|
||||||
const UInt32 kNumRepDistances = 4;
|
|
||||||
|
|
||||||
const int kNumStates = 12;
|
|
||||||
|
|
||||||
const Byte kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5};
|
|
||||||
const Byte kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10};
|
|
||||||
const Byte kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11};
|
|
||||||
const Byte kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11};
|
|
||||||
|
|
||||||
class CState
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Byte Index;
|
|
||||||
void Init() { Index = 0; }
|
|
||||||
void UpdateChar() { Index = kLiteralNextStates[Index]; }
|
|
||||||
void UpdateMatch() { Index = kMatchNextStates[Index]; }
|
|
||||||
void UpdateRep() { Index = kRepNextStates[Index]; }
|
|
||||||
void UpdateShortRep() { Index = kShortRepNextStates[Index]; }
|
|
||||||
bool IsCharState() const { return Index < 7; }
|
|
||||||
};
|
|
||||||
|
|
||||||
const int kNumPosSlotBits = 6;
|
|
||||||
const int kDicLogSizeMin = 0;
|
|
||||||
const int kDicLogSizeMax = 32;
|
|
||||||
const int kDistTableSizeMax = kDicLogSizeMax * 2;
|
|
||||||
|
|
||||||
const UInt32 kNumLenToPosStates = 4;
|
|
||||||
|
|
||||||
inline UInt32 GetLenToPosState(UInt32 len)
|
|
||||||
{
|
|
||||||
len -= 2;
|
|
||||||
if (len < kNumLenToPosStates)
|
|
||||||
return len;
|
|
||||||
return kNumLenToPosStates - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace NLength {
|
|
||||||
|
|
||||||
const int kNumPosStatesBitsMax = 4;
|
|
||||||
const UInt32 kNumPosStatesMax = (1 << kNumPosStatesBitsMax);
|
|
||||||
|
|
||||||
const int kNumPosStatesBitsEncodingMax = 4;
|
|
||||||
const UInt32 kNumPosStatesEncodingMax = (1 << kNumPosStatesBitsEncodingMax);
|
|
||||||
|
|
||||||
const int kNumLowBits = 3;
|
|
||||||
const int kNumMidBits = 3;
|
|
||||||
const int kNumHighBits = 8;
|
|
||||||
const UInt32 kNumLowSymbols = 1 << kNumLowBits;
|
|
||||||
const UInt32 kNumMidSymbols = 1 << kNumMidBits;
|
|
||||||
const UInt32 kNumSymbolsTotal = kNumLowSymbols + kNumMidSymbols + (1 << kNumHighBits);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const UInt32 kMatchMinLen = 2;
|
|
||||||
const UInt32 kMatchMaxLen = kMatchMinLen + NLength::kNumSymbolsTotal - 1;
|
|
||||||
|
|
||||||
const int kNumAlignBits = 4;
|
|
||||||
const UInt32 kAlignTableSize = 1 << kNumAlignBits;
|
|
||||||
const UInt32 kAlignMask = (kAlignTableSize - 1);
|
|
||||||
|
|
||||||
const UInt32 kStartPosModelIndex = 4;
|
|
||||||
const UInt32 kEndPosModelIndex = 14;
|
|
||||||
const UInt32 kNumPosModels = kEndPosModelIndex - kStartPosModelIndex;
|
|
||||||
|
|
||||||
const UInt32 kNumFullDistances = 1 << (kEndPosModelIndex / 2);
|
|
||||||
|
|
||||||
const int kNumLitPosStatesBitsEncodingMax = 4;
|
|
||||||
const int kNumLitContextBitsMax = 8;
|
|
||||||
|
|
||||||
const int kNumMoveBits = 5;
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
@ -1,411 +0,0 @@
|
|||||||
// LZMA/Encoder.h
|
|
||||||
|
|
||||||
#ifndef __LZMA_ENCODER_H
|
|
||||||
#define __LZMA_ENCODER_H
|
|
||||||
|
|
||||||
#include "../../../Common/MyCom.h"
|
|
||||||
#include "../../../Common/Alloc.h"
|
|
||||||
#include "../../ICoder.h"
|
|
||||||
#include "../LZ/IMatchFinder.h"
|
|
||||||
#include "../RangeCoder/RangeCoderBitTree.h"
|
|
||||||
|
|
||||||
#include "LZMA.h"
|
|
||||||
|
|
||||||
namespace NCompress {
|
|
||||||
namespace NLZMA {
|
|
||||||
|
|
||||||
typedef NRangeCoder::CBitEncoder<kNumMoveBits> CMyBitEncoder;
|
|
||||||
|
|
||||||
class CBaseState
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
CState _state;
|
|
||||||
Byte _previousByte;
|
|
||||||
UInt32 _repDistances[kNumRepDistances];
|
|
||||||
void Init()
|
|
||||||
{
|
|
||||||
_state.Init();
|
|
||||||
_previousByte = 0;
|
|
||||||
for(UInt32 i = 0 ; i < kNumRepDistances; i++)
|
|
||||||
_repDistances[i] = 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct COptimal
|
|
||||||
{
|
|
||||||
CState State;
|
|
||||||
|
|
||||||
bool Prev1IsChar;
|
|
||||||
bool Prev2;
|
|
||||||
|
|
||||||
UInt32 PosPrev2;
|
|
||||||
UInt32 BackPrev2;
|
|
||||||
|
|
||||||
UInt32 Price;
|
|
||||||
UInt32 PosPrev; // posNext;
|
|
||||||
UInt32 BackPrev;
|
|
||||||
UInt32 Backs[kNumRepDistances];
|
|
||||||
void MakeAsChar() { BackPrev = UInt32(-1); Prev1IsChar = false; }
|
|
||||||
void MakeAsShortRep() { BackPrev = 0; ; Prev1IsChar = false; }
|
|
||||||
bool IsShortRep() { return (BackPrev == 0); }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
extern Byte g_FastPos[1 << 11];
|
|
||||||
inline UInt32 GetPosSlot(UInt32 pos)
|
|
||||||
{
|
|
||||||
if (pos < (1 << 11))
|
|
||||||
return g_FastPos[pos];
|
|
||||||
if (pos < (1 << 21))
|
|
||||||
return g_FastPos[pos >> 10] + 20;
|
|
||||||
return g_FastPos[pos >> 20] + 40;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline UInt32 GetPosSlot2(UInt32 pos)
|
|
||||||
{
|
|
||||||
if (pos < (1 << 17))
|
|
||||||
return g_FastPos[pos >> 6] + 12;
|
|
||||||
if (pos < (1 << 27))
|
|
||||||
return g_FastPos[pos >> 16] + 32;
|
|
||||||
return g_FastPos[pos >> 26] + 52;
|
|
||||||
}
|
|
||||||
|
|
||||||
const UInt32 kIfinityPrice = 0xFFFFFFF;
|
|
||||||
|
|
||||||
const UInt32 kNumOpts = 1 << 12;
|
|
||||||
|
|
||||||
|
|
||||||
class CLiteralEncoder2
|
|
||||||
{
|
|
||||||
CMyBitEncoder _encoders[0x300];
|
|
||||||
public:
|
|
||||||
void Init()
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 0x300; i++)
|
|
||||||
_encoders[i].Init();
|
|
||||||
}
|
|
||||||
void Encode(NRangeCoder::CEncoder *rangeEncoder, Byte symbol);
|
|
||||||
void EncodeMatched(NRangeCoder::CEncoder *rangeEncoder, Byte matchByte, Byte symbol);
|
|
||||||
UInt32 GetPrice(bool matchMode, Byte matchByte, Byte symbol) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
class CLiteralEncoder
|
|
||||||
{
|
|
||||||
CLiteralEncoder2 *_coders;
|
|
||||||
int _numPrevBits;
|
|
||||||
int _numPosBits;
|
|
||||||
UInt32 _posMask;
|
|
||||||
public:
|
|
||||||
CLiteralEncoder(): _coders(0) {}
|
|
||||||
~CLiteralEncoder() { Free(); }
|
|
||||||
void Free()
|
|
||||||
{
|
|
||||||
MyFree(_coders);
|
|
||||||
_coders = 0;
|
|
||||||
}
|
|
||||||
bool Create(int numPosBits, int numPrevBits)
|
|
||||||
{
|
|
||||||
if (_coders == 0 || (numPosBits + numPrevBits) != (_numPrevBits + _numPosBits))
|
|
||||||
{
|
|
||||||
Free();
|
|
||||||
UInt32 numStates = 1 << (numPosBits + numPrevBits);
|
|
||||||
_coders = (CLiteralEncoder2 *)MyAlloc(numStates * sizeof(CLiteralEncoder2));
|
|
||||||
}
|
|
||||||
_numPosBits = numPosBits;
|
|
||||||
_posMask = (1 << numPosBits) - 1;
|
|
||||||
_numPrevBits = numPrevBits;
|
|
||||||
return (_coders != 0);
|
|
||||||
}
|
|
||||||
void Init()
|
|
||||||
{
|
|
||||||
UInt32 numStates = 1 << (_numPrevBits + _numPosBits);
|
|
||||||
for (UInt32 i = 0; i < numStates; i++)
|
|
||||||
_coders[i].Init();
|
|
||||||
}
|
|
||||||
CLiteralEncoder2 *GetSubCoder(UInt32 pos, Byte prevByte)
|
|
||||||
{ return &_coders[((pos & _posMask) << _numPrevBits) + (prevByte >> (8 - _numPrevBits))]; }
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace NLength {
|
|
||||||
|
|
||||||
class CEncoder
|
|
||||||
{
|
|
||||||
CMyBitEncoder _choice;
|
|
||||||
CMyBitEncoder _choice2;
|
|
||||||
NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumLowBits> _lowCoder[kNumPosStatesEncodingMax];
|
|
||||||
NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumMidBits> _midCoder[kNumPosStatesEncodingMax];
|
|
||||||
NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumHighBits> _highCoder;
|
|
||||||
public:
|
|
||||||
void Init(UInt32 numPosStates);
|
|
||||||
void Encode(NRangeCoder::CEncoder *rangeEncoder, UInt32 symbol, UInt32 posState);
|
|
||||||
void SetPrices(UInt32 posState, UInt32 numSymbols, UInt32 *prices) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
const UInt32 kNumSpecSymbols = kNumLowSymbols + kNumMidSymbols;
|
|
||||||
|
|
||||||
class CPriceTableEncoder: public CEncoder
|
|
||||||
{
|
|
||||||
UInt32 _prices[kNumPosStatesEncodingMax][kNumSymbolsTotal];
|
|
||||||
UInt32 _tableSize;
|
|
||||||
UInt32 _counters[kNumPosStatesEncodingMax];
|
|
||||||
public:
|
|
||||||
void SetTableSize(UInt32 tableSize) { _tableSize = tableSize; }
|
|
||||||
UInt32 GetPrice(UInt32 symbol, UInt32 posState) const { return _prices[posState][symbol]; }
|
|
||||||
void UpdateTable(UInt32 posState)
|
|
||||||
{
|
|
||||||
SetPrices(posState, _tableSize, _prices[posState]);
|
|
||||||
_counters[posState] = _tableSize;
|
|
||||||
}
|
|
||||||
void UpdateTables(UInt32 numPosStates)
|
|
||||||
{
|
|
||||||
for (UInt32 posState = 0; posState < numPosStates; posState++)
|
|
||||||
UpdateTable(posState);
|
|
||||||
}
|
|
||||||
void Encode(NRangeCoder::CEncoder *rangeEncoder, UInt32 symbol, UInt32 posState, bool updatePrice)
|
|
||||||
{
|
|
||||||
CEncoder::Encode(rangeEncoder, symbol, posState);
|
|
||||||
if (updatePrice)
|
|
||||||
if (--_counters[posState] == 0)
|
|
||||||
UpdateTable(posState);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class CEncoder :
|
|
||||||
public ICompressCoder,
|
|
||||||
public ICompressSetOutStream,
|
|
||||||
public ICompressSetCoderProperties,
|
|
||||||
public ICompressWriteCoderProperties,
|
|
||||||
public CBaseState,
|
|
||||||
public CMyUnknownImp
|
|
||||||
{
|
|
||||||
COptimal _optimum[kNumOpts];
|
|
||||||
CMyComPtr<IMatchFinder> _matchFinder; // test it
|
|
||||||
NRangeCoder::CEncoder _rangeEncoder;
|
|
||||||
|
|
||||||
CMyBitEncoder _isMatch[kNumStates][NLength::kNumPosStatesEncodingMax];
|
|
||||||
CMyBitEncoder _isRep[kNumStates];
|
|
||||||
CMyBitEncoder _isRepG0[kNumStates];
|
|
||||||
CMyBitEncoder _isRepG1[kNumStates];
|
|
||||||
CMyBitEncoder _isRepG2[kNumStates];
|
|
||||||
CMyBitEncoder _isRep0Long[kNumStates][NLength::kNumPosStatesEncodingMax];
|
|
||||||
|
|
||||||
NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumPosSlotBits> _posSlotEncoder[kNumLenToPosStates];
|
|
||||||
|
|
||||||
CMyBitEncoder _posEncoders[kNumFullDistances - kEndPosModelIndex];
|
|
||||||
NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumAlignBits> _posAlignEncoder;
|
|
||||||
|
|
||||||
NLength::CPriceTableEncoder _lenEncoder;
|
|
||||||
NLength::CPriceTableEncoder _repMatchLenEncoder;
|
|
||||||
|
|
||||||
CLiteralEncoder _literalEncoder;
|
|
||||||
|
|
||||||
UInt32 _matchDistances[kMatchMaxLen * 2 + 2 + 1];
|
|
||||||
|
|
||||||
bool _fastMode;
|
|
||||||
// bool _maxMode;
|
|
||||||
UInt32 _numFastBytes;
|
|
||||||
UInt32 _longestMatchLength;
|
|
||||||
UInt32 _numDistancePairs;
|
|
||||||
|
|
||||||
UInt32 _additionalOffset;
|
|
||||||
|
|
||||||
UInt32 _optimumEndIndex;
|
|
||||||
UInt32 _optimumCurrentIndex;
|
|
||||||
|
|
||||||
bool _longestMatchWasFound;
|
|
||||||
|
|
||||||
UInt32 _posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
|
|
||||||
|
|
||||||
UInt32 _distancesPrices[kNumLenToPosStates][kNumFullDistances];
|
|
||||||
|
|
||||||
UInt32 _alignPrices[kAlignTableSize];
|
|
||||||
UInt32 _alignPriceCount;
|
|
||||||
|
|
||||||
UInt32 _distTableSize;
|
|
||||||
|
|
||||||
UInt32 _posStateBits;
|
|
||||||
UInt32 _posStateMask;
|
|
||||||
UInt32 _numLiteralPosStateBits;
|
|
||||||
UInt32 _numLiteralContextBits;
|
|
||||||
|
|
||||||
UInt32 _dictionarySize;
|
|
||||||
|
|
||||||
UInt32 _dictionarySizePrev;
|
|
||||||
UInt32 _numFastBytesPrev;
|
|
||||||
|
|
||||||
UInt32 _matchPriceCount;
|
|
||||||
UInt64 nowPos64;
|
|
||||||
bool _finished;
|
|
||||||
ISequentialInStream *_inStream;
|
|
||||||
|
|
||||||
UInt32 _matchFinderCycles;
|
|
||||||
int _matchFinderIndex;
|
|
||||||
#ifdef COMPRESS_MF_MT
|
|
||||||
bool _multiThread;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool _writeEndMark;
|
|
||||||
|
|
||||||
bool _needReleaseMFStream;
|
|
||||||
|
|
||||||
IMatchFinderSetNumPasses *setMfPasses;
|
|
||||||
|
|
||||||
void ReleaseMatchFinder()
|
|
||||||
{
|
|
||||||
setMfPasses = 0;
|
|
||||||
_matchFinder.Release();
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT ReadMatchDistances(UInt32 &len, UInt32 &numDistancePairs);
|
|
||||||
|
|
||||||
HRESULT MovePos(UInt32 num);
|
|
||||||
UInt32 GetRepLen1Price(CState state, UInt32 posState) const
|
|
||||||
{
|
|
||||||
return _isRepG0[state.Index].GetPrice0() +
|
|
||||||
_isRep0Long[state.Index][posState].GetPrice0();
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt32 GetPureRepPrice(UInt32 repIndex, CState state, UInt32 posState) const
|
|
||||||
{
|
|
||||||
UInt32 price;
|
|
||||||
if(repIndex == 0)
|
|
||||||
{
|
|
||||||
price = _isRepG0[state.Index].GetPrice0();
|
|
||||||
price += _isRep0Long[state.Index][posState].GetPrice1();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
price = _isRepG0[state.Index].GetPrice1();
|
|
||||||
if (repIndex == 1)
|
|
||||||
price += _isRepG1[state.Index].GetPrice0();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
price += _isRepG1[state.Index].GetPrice1();
|
|
||||||
price += _isRepG2[state.Index].GetPrice(repIndex - 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return price;
|
|
||||||
}
|
|
||||||
UInt32 GetRepPrice(UInt32 repIndex, UInt32 len, CState state, UInt32 posState) const
|
|
||||||
{
|
|
||||||
return _repMatchLenEncoder.GetPrice(len - kMatchMinLen, posState) +
|
|
||||||
GetPureRepPrice(repIndex, state, posState);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
UInt32 GetPosLen2Price(UInt32 pos, UInt32 posState) const
|
|
||||||
{
|
|
||||||
if (pos >= kNumFullDistances)
|
|
||||||
return kIfinityPrice;
|
|
||||||
return _distancesPrices[0][pos] + _lenEncoder.GetPrice(0, posState);
|
|
||||||
}
|
|
||||||
UInt32 GetPosLen3Price(UInt32 pos, UInt32 len, UInt32 posState) const
|
|
||||||
{
|
|
||||||
UInt32 price;
|
|
||||||
UInt32 lenToPosState = GetLenToPosState(len);
|
|
||||||
if (pos < kNumFullDistances)
|
|
||||||
price = _distancesPrices[lenToPosState][pos];
|
|
||||||
else
|
|
||||||
price = _posSlotPrices[lenToPosState][GetPosSlot2(pos)] +
|
|
||||||
_alignPrices[pos & kAlignMask];
|
|
||||||
return price + _lenEncoder.GetPrice(len - kMatchMinLen, posState);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
UInt32 GetPosLenPrice(UInt32 pos, UInt32 len, UInt32 posState) const
|
|
||||||
{
|
|
||||||
UInt32 price;
|
|
||||||
UInt32 lenToPosState = GetLenToPosState(len);
|
|
||||||
if (pos < kNumFullDistances)
|
|
||||||
price = _distancesPrices[lenToPosState][pos];
|
|
||||||
else
|
|
||||||
price = _posSlotPrices[lenToPosState][GetPosSlot2(pos)] +
|
|
||||||
_alignPrices[pos & kAlignMask];
|
|
||||||
return price + _lenEncoder.GetPrice(len - kMatchMinLen, posState);
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt32 Backward(UInt32 &backRes, UInt32 cur);
|
|
||||||
HRESULT GetOptimum(UInt32 position, UInt32 &backRes, UInt32 &lenRes);
|
|
||||||
HRESULT GetOptimumFast(UInt32 position, UInt32 &backRes, UInt32 &lenRes);
|
|
||||||
|
|
||||||
void FillDistancesPrices();
|
|
||||||
void FillAlignPrices();
|
|
||||||
|
|
||||||
void ReleaseMFStream()
|
|
||||||
{
|
|
||||||
if (_matchFinder && _needReleaseMFStream)
|
|
||||||
{
|
|
||||||
_matchFinder->ReleaseStream();
|
|
||||||
_needReleaseMFStream = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReleaseStreams()
|
|
||||||
{
|
|
||||||
ReleaseMFStream();
|
|
||||||
ReleaseOutStream();
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT Flush(UInt32 nowPos);
|
|
||||||
class CCoderReleaser
|
|
||||||
{
|
|
||||||
CEncoder *_coder;
|
|
||||||
public:
|
|
||||||
CCoderReleaser(CEncoder *coder): _coder(coder) {}
|
|
||||||
~CCoderReleaser()
|
|
||||||
{
|
|
||||||
_coder->ReleaseStreams();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
friend class CCoderReleaser;
|
|
||||||
|
|
||||||
void WriteEndMarker(UInt32 posState);
|
|
||||||
|
|
||||||
public:
|
|
||||||
CEncoder();
|
|
||||||
void SetWriteEndMarkerMode(bool writeEndMarker)
|
|
||||||
{ _writeEndMark= writeEndMarker; }
|
|
||||||
|
|
||||||
HRESULT Create();
|
|
||||||
|
|
||||||
MY_UNKNOWN_IMP3(
|
|
||||||
ICompressSetOutStream,
|
|
||||||
ICompressSetCoderProperties,
|
|
||||||
ICompressWriteCoderProperties
|
|
||||||
)
|
|
||||||
|
|
||||||
HRESULT Init();
|
|
||||||
|
|
||||||
// ICompressCoder interface
|
|
||||||
HRESULT SetStreams(ISequentialInStream *inStream,
|
|
||||||
ISequentialOutStream *outStream,
|
|
||||||
const UInt64 *inSize, const UInt64 *outSize);
|
|
||||||
HRESULT CodeOneBlock(UInt64 *inSize, UInt64 *outSize, Int32 *finished);
|
|
||||||
|
|
||||||
HRESULT CodeReal(ISequentialInStream *inStream,
|
|
||||||
ISequentialOutStream *outStream,
|
|
||||||
const UInt64 *inSize, const UInt64 *outSize,
|
|
||||||
ICompressProgressInfo *progress);
|
|
||||||
|
|
||||||
// ICompressCoder interface
|
|
||||||
STDMETHOD(Code)(ISequentialInStream *inStream,
|
|
||||||
ISequentialOutStream *outStream,
|
|
||||||
const UInt64 *inSize, const UInt64 *outSize,
|
|
||||||
ICompressProgressInfo *progress);
|
|
||||||
|
|
||||||
// ICompressSetCoderProperties2
|
|
||||||
STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
|
|
||||||
const PROPVARIANT *properties, UInt32 numProperties);
|
|
||||||
|
|
||||||
// ICompressWriteCoderProperties
|
|
||||||
STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream);
|
|
||||||
|
|
||||||
STDMETHOD(SetOutStream)(ISequentialOutStream *outStream);
|
|
||||||
STDMETHOD(ReleaseOutStream)();
|
|
||||||
|
|
||||||
virtual ~CEncoder() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,8 +0,0 @@
|
|||||||
// StdAfx.h
|
|
||||||
|
|
||||||
#ifndef __STDAFX_H
|
|
||||||
#define __STDAFX_H
|
|
||||||
|
|
||||||
#include "../../../Common/MyWindows.h"
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,205 +0,0 @@
|
|||||||
// Compress/RangeCoder/RangeCoder.h
|
|
||||||
|
|
||||||
#ifndef __COMPRESS_RANGECODER_H
|
|
||||||
#define __COMPRESS_RANGECODER_H
|
|
||||||
|
|
||||||
#include "../../Common/InBuffer.h"
|
|
||||||
#include "../../Common/OutBuffer.h"
|
|
||||||
|
|
||||||
namespace NCompress {
|
|
||||||
namespace NRangeCoder {
|
|
||||||
|
|
||||||
const int kNumTopBits = 24;
|
|
||||||
const UInt32 kTopValue = (1 << kNumTopBits);
|
|
||||||
|
|
||||||
class CEncoder
|
|
||||||
{
|
|
||||||
UInt32 _cacheSize;
|
|
||||||
Byte _cache;
|
|
||||||
public:
|
|
||||||
UInt64 Low;
|
|
||||||
UInt32 Range;
|
|
||||||
COutBuffer Stream;
|
|
||||||
bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); }
|
|
||||||
|
|
||||||
void SetStream(ISequentialOutStream *stream) { Stream.SetStream(stream); }
|
|
||||||
void Init()
|
|
||||||
{
|
|
||||||
Stream.Init();
|
|
||||||
Low = 0;
|
|
||||||
Range = 0xFFFFFFFF;
|
|
||||||
_cacheSize = 1;
|
|
||||||
_cache = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FlushData()
|
|
||||||
{
|
|
||||||
// Low += 1;
|
|
||||||
for(int i = 0; i < 5; i++)
|
|
||||||
ShiftLow();
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT FlushStream() { return Stream.Flush(); }
|
|
||||||
|
|
||||||
void ReleaseStream() { Stream.ReleaseStream(); }
|
|
||||||
|
|
||||||
void Encode(UInt32 start, UInt32 size, UInt32 total)
|
|
||||||
{
|
|
||||||
Low += start * (Range /= total);
|
|
||||||
Range *= size;
|
|
||||||
while (Range < kTopValue)
|
|
||||||
{
|
|
||||||
Range <<= 8;
|
|
||||||
ShiftLow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ShiftLow()
|
|
||||||
{
|
|
||||||
if ((UInt32)Low < (UInt32)0xFF000000 || (int)(Low >> 32) != 0)
|
|
||||||
{
|
|
||||||
Byte temp = _cache;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
Stream.WriteByte((Byte)(temp + (Byte)(Low >> 32)));
|
|
||||||
temp = 0xFF;
|
|
||||||
}
|
|
||||||
while(--_cacheSize != 0);
|
|
||||||
_cache = (Byte)((UInt32)Low >> 24);
|
|
||||||
}
|
|
||||||
_cacheSize++;
|
|
||||||
Low = (UInt32)Low << 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EncodeDirectBits(UInt32 value, int numTotalBits)
|
|
||||||
{
|
|
||||||
for (int i = numTotalBits - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
Range >>= 1;
|
|
||||||
if (((value >> i) & 1) == 1)
|
|
||||||
Low += Range;
|
|
||||||
if (Range < kTopValue)
|
|
||||||
{
|
|
||||||
Range <<= 8;
|
|
||||||
ShiftLow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EncodeBit(UInt32 size0, UInt32 numTotalBits, UInt32 symbol)
|
|
||||||
{
|
|
||||||
UInt32 newBound = (Range >> numTotalBits) * size0;
|
|
||||||
if (symbol == 0)
|
|
||||||
Range = newBound;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Low += newBound;
|
|
||||||
Range -= newBound;
|
|
||||||
}
|
|
||||||
while (Range < kTopValue)
|
|
||||||
{
|
|
||||||
Range <<= 8;
|
|
||||||
ShiftLow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt64 GetProcessedSize() { return Stream.GetProcessedSize() + _cacheSize + 4; }
|
|
||||||
};
|
|
||||||
|
|
||||||
class CDecoder
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CInBuffer Stream;
|
|
||||||
UInt32 Range;
|
|
||||||
UInt32 Code;
|
|
||||||
bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); }
|
|
||||||
|
|
||||||
void Normalize()
|
|
||||||
{
|
|
||||||
while (Range < kTopValue)
|
|
||||||
{
|
|
||||||
Code = (Code << 8) | Stream.ReadByte();
|
|
||||||
Range <<= 8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetStream(ISequentialInStream *stream) { Stream.SetStream(stream); }
|
|
||||||
void Init()
|
|
||||||
{
|
|
||||||
Stream.Init();
|
|
||||||
Code = 0;
|
|
||||||
Range = 0xFFFFFFFF;
|
|
||||||
for(int i = 0; i < 5; i++)
|
|
||||||
Code = (Code << 8) | Stream.ReadByte();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReleaseStream() { Stream.ReleaseStream(); }
|
|
||||||
|
|
||||||
UInt32 GetThreshold(UInt32 total)
|
|
||||||
{
|
|
||||||
return (Code) / ( Range /= total);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Decode(UInt32 start, UInt32 size)
|
|
||||||
{
|
|
||||||
Code -= start * Range;
|
|
||||||
Range *= size;
|
|
||||||
Normalize();
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt32 DecodeDirectBits(int numTotalBits)
|
|
||||||
{
|
|
||||||
UInt32 range = Range;
|
|
||||||
UInt32 code = Code;
|
|
||||||
UInt32 result = 0;
|
|
||||||
for (int i = numTotalBits; i != 0; i--)
|
|
||||||
{
|
|
||||||
range >>= 1;
|
|
||||||
/*
|
|
||||||
result <<= 1;
|
|
||||||
if (code >= range)
|
|
||||||
{
|
|
||||||
code -= range;
|
|
||||||
result |= 1;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
UInt32 t = (code - range) >> 31;
|
|
||||||
code -= range & (t - 1);
|
|
||||||
result = (result << 1) | (1 - t);
|
|
||||||
|
|
||||||
if (range < kTopValue)
|
|
||||||
{
|
|
||||||
code = (code << 8) | Stream.ReadByte();
|
|
||||||
range <<= 8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Range = range;
|
|
||||||
Code = code;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt32 DecodeBit(UInt32 size0, UInt32 numTotalBits)
|
|
||||||
{
|
|
||||||
UInt32 newBound = (Range >> numTotalBits) * size0;
|
|
||||||
UInt32 symbol;
|
|
||||||
if (Code < newBound)
|
|
||||||
{
|
|
||||||
symbol = 0;
|
|
||||||
Range = newBound;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
symbol = 1;
|
|
||||||
Code -= newBound;
|
|
||||||
Range -= newBound;
|
|
||||||
}
|
|
||||||
Normalize();
|
|
||||||
return symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
UInt64 GetProcessedSize() {return Stream.GetProcessedSize(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,80 +0,0 @@
|
|||||||
// Compress/RangeCoder/RangeCoderBit.cpp
|
|
||||||
|
|
||||||
#include "StdAfx.h"
|
|
||||||
|
|
||||||
#include "RangeCoderBit.h"
|
|
||||||
|
|
||||||
namespace NCompress {
|
|
||||||
namespace NRangeCoder {
|
|
||||||
|
|
||||||
UInt32 CPriceTables::ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
|
|
||||||
static CPriceTables g_PriceTables;
|
|
||||||
|
|
||||||
CPriceTables::CPriceTables() { Init(); }
|
|
||||||
|
|
||||||
void CPriceTables::Init()
|
|
||||||
{
|
|
||||||
const int kNumBits = (kNumBitModelTotalBits - kNumMoveReducingBits);
|
|
||||||
for(int i = kNumBits - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
UInt32 start = 1 << (kNumBits - i - 1);
|
|
||||||
UInt32 end = 1 << (kNumBits - i);
|
|
||||||
for (UInt32 j = start; j < end; j++)
|
|
||||||
ProbPrices[j] = (i << kNumBitPriceShiftBits) +
|
|
||||||
(((end - j) << kNumBitPriceShiftBits) >> (kNumBits - i - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
// simplest: bad solution
|
|
||||||
for(UInt32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++)
|
|
||||||
ProbPrices[i] = kBitPrice;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
const double kDummyMultMid = (1.0 / kBitPrice) / 2;
|
|
||||||
const double kDummyMultMid = 0;
|
|
||||||
// float solution
|
|
||||||
double ln2 = log(double(2));
|
|
||||||
double lnAll = log(double(kBitModelTotal >> kNumMoveReducingBits));
|
|
||||||
for(UInt32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++)
|
|
||||||
ProbPrices[i] = UInt32((fabs(lnAll - log(double(i))) / ln2 + kDummyMultMid) * kBitPrice);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
// experimental, slow, solution:
|
|
||||||
for(UInt32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++)
|
|
||||||
{
|
|
||||||
const int kCyclesBits = 5;
|
|
||||||
const UInt32 kCycles = (1 << kCyclesBits);
|
|
||||||
|
|
||||||
UInt32 range = UInt32(-1);
|
|
||||||
UInt32 bitCount = 0;
|
|
||||||
for (UInt32 j = 0; j < kCycles; j++)
|
|
||||||
{
|
|
||||||
range >>= (kNumBitModelTotalBits - kNumMoveReducingBits);
|
|
||||||
range *= i;
|
|
||||||
while(range < (1 << 31))
|
|
||||||
{
|
|
||||||
range <<= 1;
|
|
||||||
bitCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bitCount <<= kNumBitPriceShiftBits;
|
|
||||||
range -= (1 << 31);
|
|
||||||
for (int k = kNumBitPriceShiftBits - 1; k >= 0; k--)
|
|
||||||
{
|
|
||||||
range <<= 1;
|
|
||||||
if (range > (1 << 31))
|
|
||||||
{
|
|
||||||
bitCount += (1 << k);
|
|
||||||
range -= (1 << 31);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ProbPrices[i] = (bitCount
|
|
||||||
// + (1 << (kCyclesBits - 1))
|
|
||||||
) >> kCyclesBits;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
}}
|
|
@ -1,120 +0,0 @@
|
|||||||
// Compress/RangeCoder/RangeCoderBit.h
|
|
||||||
|
|
||||||
#ifndef __COMPRESS_RANGECODER_BIT_H
|
|
||||||
#define __COMPRESS_RANGECODER_BIT_H
|
|
||||||
|
|
||||||
#include "RangeCoder.h"
|
|
||||||
|
|
||||||
namespace NCompress {
|
|
||||||
namespace NRangeCoder {
|
|
||||||
|
|
||||||
const int kNumBitModelTotalBits = 11;
|
|
||||||
const UInt32 kBitModelTotal = (1 << kNumBitModelTotalBits);
|
|
||||||
|
|
||||||
const int kNumMoveReducingBits = 2;
|
|
||||||
|
|
||||||
const int kNumBitPriceShiftBits = 6;
|
|
||||||
const UInt32 kBitPrice = 1 << kNumBitPriceShiftBits;
|
|
||||||
|
|
||||||
class CPriceTables
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
|
|
||||||
static void Init();
|
|
||||||
CPriceTables();
|
|
||||||
};
|
|
||||||
|
|
||||||
template <int numMoveBits>
|
|
||||||
class CBitModel
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
UInt32 Prob;
|
|
||||||
void UpdateModel(UInt32 symbol)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
Prob -= (Prob + ((symbol - 1) & ((1 << numMoveBits) - 1))) >> numMoveBits;
|
|
||||||
Prob += (1 - symbol) << (kNumBitModelTotalBits - numMoveBits);
|
|
||||||
*/
|
|
||||||
if (symbol == 0)
|
|
||||||
Prob += (kBitModelTotal - Prob) >> numMoveBits;
|
|
||||||
else
|
|
||||||
Prob -= (Prob) >> numMoveBits;
|
|
||||||
}
|
|
||||||
public:
|
|
||||||
void Init() { Prob = kBitModelTotal / 2; }
|
|
||||||
};
|
|
||||||
|
|
||||||
template <int numMoveBits>
|
|
||||||
class CBitEncoder: public CBitModel<numMoveBits>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
void Encode(CEncoder *encoder, UInt32 symbol)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
encoder->EncodeBit(this->Prob, kNumBitModelTotalBits, symbol);
|
|
||||||
this->UpdateModel(symbol);
|
|
||||||
*/
|
|
||||||
UInt32 newBound = (encoder->Range >> kNumBitModelTotalBits) * this->Prob;
|
|
||||||
if (symbol == 0)
|
|
||||||
{
|
|
||||||
encoder->Range = newBound;
|
|
||||||
this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
encoder->Low += newBound;
|
|
||||||
encoder->Range -= newBound;
|
|
||||||
this->Prob -= (this->Prob) >> numMoveBits;
|
|
||||||
}
|
|
||||||
if (encoder->Range < kTopValue)
|
|
||||||
{
|
|
||||||
encoder->Range <<= 8;
|
|
||||||
encoder->ShiftLow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UInt32 GetPrice(UInt32 symbol) const
|
|
||||||
{
|
|
||||||
return CPriceTables::ProbPrices[
|
|
||||||
(((this->Prob - symbol) ^ ((-(int)symbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits];
|
|
||||||
}
|
|
||||||
UInt32 GetPrice0() const { return CPriceTables::ProbPrices[this->Prob >> kNumMoveReducingBits]; }
|
|
||||||
UInt32 GetPrice1() const { return CPriceTables::ProbPrices[(kBitModelTotal - this->Prob) >> kNumMoveReducingBits]; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template <int numMoveBits>
|
|
||||||
class CBitDecoder: public CBitModel<numMoveBits>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
UInt32 Decode(CDecoder *decoder)
|
|
||||||
{
|
|
||||||
UInt32 newBound = (decoder->Range >> kNumBitModelTotalBits) * this->Prob;
|
|
||||||
if (decoder->Code < newBound)
|
|
||||||
{
|
|
||||||
decoder->Range = newBound;
|
|
||||||
this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits;
|
|
||||||
if (decoder->Range < kTopValue)
|
|
||||||
{
|
|
||||||
decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte();
|
|
||||||
decoder->Range <<= 8;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
decoder->Range -= newBound;
|
|
||||||
decoder->Code -= newBound;
|
|
||||||
this->Prob -= (this->Prob) >> numMoveBits;
|
|
||||||
if (decoder->Range < kTopValue)
|
|
||||||
{
|
|
||||||
decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte();
|
|
||||||
decoder->Range <<= 8;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,161 +0,0 @@
|
|||||||
// Compress/RangeCoder/RangeCoderBitTree.h
|
|
||||||
|
|
||||||
#ifndef __COMPRESS_RANGECODER_BIT_TREE_H
|
|
||||||
#define __COMPRESS_RANGECODER_BIT_TREE_H
|
|
||||||
|
|
||||||
#include "RangeCoderBit.h"
|
|
||||||
#include "RangeCoderOpt.h"
|
|
||||||
|
|
||||||
namespace NCompress {
|
|
||||||
namespace NRangeCoder {
|
|
||||||
|
|
||||||
template <int numMoveBits, int NumBitLevels>
|
|
||||||
class CBitTreeEncoder
|
|
||||||
{
|
|
||||||
CBitEncoder<numMoveBits> Models[1 << NumBitLevels];
|
|
||||||
public:
|
|
||||||
void Init()
|
|
||||||
{
|
|
||||||
for(UInt32 i = 1; i < (1 << NumBitLevels); i++)
|
|
||||||
Models[i].Init();
|
|
||||||
}
|
|
||||||
void Encode(CEncoder *rangeEncoder, UInt32 symbol)
|
|
||||||
{
|
|
||||||
UInt32 modelIndex = 1;
|
|
||||||
for (int bitIndex = NumBitLevels; bitIndex != 0 ;)
|
|
||||||
{
|
|
||||||
bitIndex--;
|
|
||||||
UInt32 bit = (symbol >> bitIndex) & 1;
|
|
||||||
Models[modelIndex].Encode(rangeEncoder, bit);
|
|
||||||
modelIndex = (modelIndex << 1) | bit;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
void ReverseEncode(CEncoder *rangeEncoder, UInt32 symbol)
|
|
||||||
{
|
|
||||||
UInt32 modelIndex = 1;
|
|
||||||
for (int i = 0; i < NumBitLevels; i++)
|
|
||||||
{
|
|
||||||
UInt32 bit = symbol & 1;
|
|
||||||
Models[modelIndex].Encode(rangeEncoder, bit);
|
|
||||||
modelIndex = (modelIndex << 1) | bit;
|
|
||||||
symbol >>= 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UInt32 GetPrice(UInt32 symbol) const
|
|
||||||
{
|
|
||||||
symbol |= (1 << NumBitLevels);
|
|
||||||
UInt32 price = 0;
|
|
||||||
while (symbol != 1)
|
|
||||||
{
|
|
||||||
price += Models[symbol >> 1].GetPrice(symbol & 1);
|
|
||||||
symbol >>= 1;
|
|
||||||
}
|
|
||||||
return price;
|
|
||||||
}
|
|
||||||
UInt32 ReverseGetPrice(UInt32 symbol) const
|
|
||||||
{
|
|
||||||
UInt32 price = 0;
|
|
||||||
UInt32 modelIndex = 1;
|
|
||||||
for (int i = NumBitLevels; i != 0; i--)
|
|
||||||
{
|
|
||||||
UInt32 bit = symbol & 1;
|
|
||||||
symbol >>= 1;
|
|
||||||
price += Models[modelIndex].GetPrice(bit);
|
|
||||||
modelIndex = (modelIndex << 1) | bit;
|
|
||||||
}
|
|
||||||
return price;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template <int numMoveBits, int NumBitLevels>
|
|
||||||
class CBitTreeDecoder
|
|
||||||
{
|
|
||||||
CBitDecoder<numMoveBits> Models[1 << NumBitLevels];
|
|
||||||
public:
|
|
||||||
void Init()
|
|
||||||
{
|
|
||||||
for(UInt32 i = 1; i < (1 << NumBitLevels); i++)
|
|
||||||
Models[i].Init();
|
|
||||||
}
|
|
||||||
UInt32 Decode(CDecoder *rangeDecoder)
|
|
||||||
{
|
|
||||||
UInt32 modelIndex = 1;
|
|
||||||
RC_INIT_VAR
|
|
||||||
for(int bitIndex = NumBitLevels; bitIndex != 0; bitIndex--)
|
|
||||||
{
|
|
||||||
// modelIndex = (modelIndex << 1) + Models[modelIndex].Decode(rangeDecoder);
|
|
||||||
RC_GETBIT(numMoveBits, Models[modelIndex].Prob, modelIndex)
|
|
||||||
}
|
|
||||||
RC_FLUSH_VAR
|
|
||||||
return modelIndex - (1 << NumBitLevels);
|
|
||||||
};
|
|
||||||
UInt32 ReverseDecode(CDecoder *rangeDecoder)
|
|
||||||
{
|
|
||||||
UInt32 modelIndex = 1;
|
|
||||||
UInt32 symbol = 0;
|
|
||||||
RC_INIT_VAR
|
|
||||||
for(int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)
|
|
||||||
{
|
|
||||||
// UInt32 bit = Models[modelIndex].Decode(rangeDecoder);
|
|
||||||
// modelIndex <<= 1;
|
|
||||||
// modelIndex += bit;
|
|
||||||
// symbol |= (bit << bitIndex);
|
|
||||||
RC_GETBIT2(numMoveBits, Models[modelIndex].Prob, modelIndex, ; , symbol |= (1 << bitIndex))
|
|
||||||
}
|
|
||||||
RC_FLUSH_VAR
|
|
||||||
return symbol;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template <int numMoveBits>
|
|
||||||
void ReverseBitTreeEncode(CBitEncoder<numMoveBits> *Models,
|
|
||||||
CEncoder *rangeEncoder, int NumBitLevels, UInt32 symbol)
|
|
||||||
{
|
|
||||||
UInt32 modelIndex = 1;
|
|
||||||
for (int i = 0; i < NumBitLevels; i++)
|
|
||||||
{
|
|
||||||
UInt32 bit = symbol & 1;
|
|
||||||
Models[modelIndex].Encode(rangeEncoder, bit);
|
|
||||||
modelIndex = (modelIndex << 1) | bit;
|
|
||||||
symbol >>= 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template <int numMoveBits>
|
|
||||||
UInt32 ReverseBitTreeGetPrice(CBitEncoder<numMoveBits> *Models,
|
|
||||||
UInt32 NumBitLevels, UInt32 symbol)
|
|
||||||
{
|
|
||||||
UInt32 price = 0;
|
|
||||||
UInt32 modelIndex = 1;
|
|
||||||
for (int i = NumBitLevels; i != 0; i--)
|
|
||||||
{
|
|
||||||
UInt32 bit = symbol & 1;
|
|
||||||
symbol >>= 1;
|
|
||||||
price += Models[modelIndex].GetPrice(bit);
|
|
||||||
modelIndex = (modelIndex << 1) | bit;
|
|
||||||
}
|
|
||||||
return price;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <int numMoveBits>
|
|
||||||
UInt32 ReverseBitTreeDecode(CBitDecoder<numMoveBits> *Models,
|
|
||||||
CDecoder *rangeDecoder, int NumBitLevels)
|
|
||||||
{
|
|
||||||
UInt32 modelIndex = 1;
|
|
||||||
UInt32 symbol = 0;
|
|
||||||
RC_INIT_VAR
|
|
||||||
for(int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)
|
|
||||||
{
|
|
||||||
// UInt32 bit = Models[modelIndex].Decode(rangeDecoder);
|
|
||||||
// modelIndex <<= 1;
|
|
||||||
// modelIndex += bit;
|
|
||||||
// symbol |= (bit << bitIndex);
|
|
||||||
RC_GETBIT2(numMoveBits, Models[modelIndex].Prob, modelIndex, ; , symbol |= (1 << bitIndex))
|
|
||||||
}
|
|
||||||
RC_FLUSH_VAR
|
|
||||||
return symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,31 +0,0 @@
|
|||||||
// Compress/RangeCoder/RangeCoderOpt.h
|
|
||||||
|
|
||||||
#ifndef __COMPRESS_RANGECODER_OPT_H
|
|
||||||
#define __COMPRESS_RANGECODER_OPT_H
|
|
||||||
|
|
||||||
#define RC_INIT_VAR \
|
|
||||||
UInt32 range = rangeDecoder->Range; \
|
|
||||||
UInt32 code = rangeDecoder->Code;
|
|
||||||
|
|
||||||
#define RC_FLUSH_VAR \
|
|
||||||
rangeDecoder->Range = range; \
|
|
||||||
rangeDecoder->Code = code;
|
|
||||||
|
|
||||||
#define RC_NORMALIZE \
|
|
||||||
if (range < NCompress::NRangeCoder::kTopValue) \
|
|
||||||
{ code = (code << 8) | rangeDecoder->Stream.ReadByte(); range <<= 8; }
|
|
||||||
|
|
||||||
#define RC_GETBIT2(numMoveBits, prob, mi, A0, A1) \
|
|
||||||
{ UInt32 bound = (range >> NCompress::NRangeCoder::kNumBitModelTotalBits) * prob; \
|
|
||||||
if (code < bound) \
|
|
||||||
{ A0; range = bound; \
|
|
||||||
prob += (NCompress::NRangeCoder::kBitModelTotal - prob) >> numMoveBits; \
|
|
||||||
mi <<= 1; } \
|
|
||||||
else \
|
|
||||||
{ A1; range -= bound; code -= bound; prob -= (prob) >> numMoveBits; \
|
|
||||||
mi = (mi + mi) + 1; }} \
|
|
||||||
RC_NORMALIZE
|
|
||||||
|
|
||||||
#define RC_GETBIT(numMoveBits, prob, mi) RC_GETBIT2(numMoveBits, prob, mi, ; , ;)
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,6 +0,0 @@
|
|||||||
// StdAfx.h
|
|
||||||
|
|
||||||
#ifndef __STDAFX_H
|
|
||||||
#define __STDAFX_H
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,588 +0,0 @@
|
|||||||
/*
|
|
||||||
LzmaDecode.c
|
|
||||||
LZMA Decoder (optimized for Speed version)
|
|
||||||
|
|
||||||
LZMA SDK 4.22 Copyright (c) 1999-2005 Igor Pavlov (2005-06-10)
|
|
||||||
http://www.7-zip.org/
|
|
||||||
|
|
||||||
LZMA SDK is licensed under two licenses:
|
|
||||||
1) GNU Lesser General Public License (GNU LGPL)
|
|
||||||
2) Common Public License (CPL)
|
|
||||||
It means that you can select one of these two licenses and
|
|
||||||
follow rules of that license.
|
|
||||||
|
|
||||||
SPECIAL EXCEPTION:
|
|
||||||
Igor Pavlov, as the author of this Code, expressly permits you to
|
|
||||||
statically or dynamically link your Code (or bind by name) to the
|
|
||||||
interfaces of this file without subjecting your linked Code to the
|
|
||||||
terms of the CPL or GNU LGPL. Any modifications or additions
|
|
||||||
to this file, however, are subject to the LGPL or CPL terms.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "LzmaDecode.h"
|
|
||||||
|
|
||||||
#ifndef Byte
|
|
||||||
#define Byte unsigned char
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define kNumTopBits 24
|
|
||||||
#define kTopValue ((UInt32)1 << kNumTopBits)
|
|
||||||
|
|
||||||
#define kNumBitModelTotalBits 11
|
|
||||||
#define kBitModelTotal (1 << kNumBitModelTotalBits)
|
|
||||||
#define kNumMoveBits 5
|
|
||||||
|
|
||||||
#define RC_READ_BYTE (*Buffer++)
|
|
||||||
|
|
||||||
#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \
|
|
||||||
{ int i; for(i = 0; i < 5; i++) { RC_TEST; Code = (Code << 8) | RC_READ_BYTE; }}
|
|
||||||
|
|
||||||
#ifdef _LZMA_IN_CB
|
|
||||||
|
|
||||||
#define RC_TEST { if (Buffer == BufferLim) \
|
|
||||||
{ SizeT size; int result = InCallback->Read(InCallback, &Buffer, &size); if (result != LZMA_RESULT_OK) return result; \
|
|
||||||
BufferLim = Buffer + size; if (size == 0) return LZMA_RESULT_DATA_ERROR; }}
|
|
||||||
|
|
||||||
#define RC_INIT Buffer = BufferLim = 0; RC_INIT2
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
|
|
||||||
|
|
||||||
#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
|
|
||||||
|
|
||||||
#define IfBit0(p) RC_NORMALIZE; bound = (Range >> kNumBitModelTotalBits) * *(p); if (Code < bound)
|
|
||||||
#define UpdateBit0(p) Range = bound; *(p) += (kBitModelTotal - *(p)) >> kNumMoveBits;
|
|
||||||
#define UpdateBit1(p) Range -= bound; Code -= bound; *(p) -= (*(p)) >> kNumMoveBits;
|
|
||||||
|
|
||||||
#define RC_GET_BIT2(p, mi, A0, A1) IfBit0(p) \
|
|
||||||
{ UpdateBit0(p); mi <<= 1; A0; } else \
|
|
||||||
{ UpdateBit1(p); mi = (mi + mi) + 1; A1; }
|
|
||||||
|
|
||||||
#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
|
|
||||||
|
|
||||||
#define RangeDecoderBitTreeDecode(probs, numLevels, res) \
|
|
||||||
{ int i = numLevels; res = 1; \
|
|
||||||
do { CProb *p = probs + res; RC_GET_BIT(p, res) } while(--i != 0); \
|
|
||||||
res -= (1 << numLevels); }
|
|
||||||
|
|
||||||
|
|
||||||
#define kNumPosBitsMax 4
|
|
||||||
#define kNumPosStatesMax (1 << kNumPosBitsMax)
|
|
||||||
|
|
||||||
#define kLenNumLowBits 3
|
|
||||||
#define kLenNumLowSymbols (1 << kLenNumLowBits)
|
|
||||||
#define kLenNumMidBits 3
|
|
||||||
#define kLenNumMidSymbols (1 << kLenNumMidBits)
|
|
||||||
#define kLenNumHighBits 8
|
|
||||||
#define kLenNumHighSymbols (1 << kLenNumHighBits)
|
|
||||||
|
|
||||||
#define LenChoice 0
|
|
||||||
#define LenChoice2 (LenChoice + 1)
|
|
||||||
#define LenLow (LenChoice2 + 1)
|
|
||||||
#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
|
|
||||||
#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
|
|
||||||
#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
|
|
||||||
|
|
||||||
|
|
||||||
#define kNumStates 12
|
|
||||||
#define kNumLitStates 7
|
|
||||||
|
|
||||||
#define kStartPosModelIndex 4
|
|
||||||
#define kEndPosModelIndex 14
|
|
||||||
#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
|
|
||||||
|
|
||||||
#define kNumPosSlotBits 6
|
|
||||||
#define kNumLenToPosStates 4
|
|
||||||
|
|
||||||
#define kNumAlignBits 4
|
|
||||||
#define kAlignTableSize (1 << kNumAlignBits)
|
|
||||||
|
|
||||||
#define kMatchMinLen 2
|
|
||||||
|
|
||||||
#define IsMatch 0
|
|
||||||
#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
|
|
||||||
#define IsRepG0 (IsRep + kNumStates)
|
|
||||||
#define IsRepG1 (IsRepG0 + kNumStates)
|
|
||||||
#define IsRepG2 (IsRepG1 + kNumStates)
|
|
||||||
#define IsRep0Long (IsRepG2 + kNumStates)
|
|
||||||
#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
|
|
||||||
#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
|
|
||||||
#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
|
|
||||||
#define LenCoder (Align + kAlignTableSize)
|
|
||||||
#define RepLenCoder (LenCoder + kNumLenProbs)
|
|
||||||
#define Literal (RepLenCoder + kNumLenProbs)
|
|
||||||
|
|
||||||
#if Literal != LZMA_BASE_SIZE
|
|
||||||
StopCompilingDueBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size)
|
|
||||||
{
|
|
||||||
unsigned char prop0;
|
|
||||||
if (size < LZMA_PROPERTIES_SIZE)
|
|
||||||
return LZMA_RESULT_DATA_ERROR;
|
|
||||||
prop0 = propsData[0];
|
|
||||||
if (prop0 >= (9 * 5 * 5))
|
|
||||||
return LZMA_RESULT_DATA_ERROR;
|
|
||||||
{
|
|
||||||
for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5));
|
|
||||||
for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9);
|
|
||||||
propsRes->lc = prop0;
|
|
||||||
/*
|
|
||||||
unsigned char remainder = (unsigned char)(prop0 / 9);
|
|
||||||
propsRes->lc = prop0 % 9;
|
|
||||||
propsRes->pb = remainder / 5;
|
|
||||||
propsRes->lp = remainder % 5;
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
propsRes->DictionarySize = 0;
|
|
||||||
for (i = 0; i < 4; i++)
|
|
||||||
propsRes->DictionarySize += (UInt32)(propsData[1 + i]) << (i * 8);
|
|
||||||
if (propsRes->DictionarySize == 0)
|
|
||||||
propsRes->DictionarySize = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return LZMA_RESULT_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define kLzmaStreamWasFinishedId (-1)
|
|
||||||
|
|
||||||
int LzmaDecode(CLzmaDecoderState *vs,
|
|
||||||
#ifdef _LZMA_IN_CB
|
|
||||||
ILzmaInCallback *InCallback,
|
|
||||||
#else
|
|
||||||
const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
|
|
||||||
#endif
|
|
||||||
unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed)
|
|
||||||
{
|
|
||||||
CProb *p = vs->Probs;
|
|
||||||
SizeT nowPos = 0;
|
|
||||||
Byte previousByte = 0;
|
|
||||||
UInt32 posStateMask = (1 << (vs->Properties.pb)) - 1;
|
|
||||||
UInt32 literalPosMask = (1 << (vs->Properties.lp)) - 1;
|
|
||||||
int lc = vs->Properties.lc;
|
|
||||||
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
|
|
||||||
UInt32 Range = vs->Range;
|
|
||||||
UInt32 Code = vs->Code;
|
|
||||||
#ifdef _LZMA_IN_CB
|
|
||||||
const Byte *Buffer = vs->Buffer;
|
|
||||||
const Byte *BufferLim = vs->BufferLim;
|
|
||||||
#else
|
|
||||||
const Byte *Buffer = inStream;
|
|
||||||
const Byte *BufferLim = inStream + inSize;
|
|
||||||
#endif
|
|
||||||
int state = vs->State;
|
|
||||||
UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
|
|
||||||
int len = vs->RemainLen;
|
|
||||||
UInt32 globalPos = vs->GlobalPos;
|
|
||||||
UInt32 distanceLimit = vs->DistanceLimit;
|
|
||||||
|
|
||||||
Byte *dictionary = vs->Dictionary;
|
|
||||||
UInt32 dictionarySize = vs->Properties.DictionarySize;
|
|
||||||
UInt32 dictionaryPos = vs->DictionaryPos;
|
|
||||||
|
|
||||||
Byte tempDictionary[4];
|
|
||||||
|
|
||||||
#ifndef _LZMA_IN_CB
|
|
||||||
*inSizeProcessed = 0;
|
|
||||||
#endif
|
|
||||||
*outSizeProcessed = 0;
|
|
||||||
if (len == kLzmaStreamWasFinishedId)
|
|
||||||
return LZMA_RESULT_OK;
|
|
||||||
|
|
||||||
if (dictionarySize == 0)
|
|
||||||
{
|
|
||||||
dictionary = tempDictionary;
|
|
||||||
dictionarySize = 1;
|
|
||||||
tempDictionary[0] = vs->TempDictionary[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (len == kLzmaNeedInitId)
|
|
||||||
{
|
|
||||||
{
|
|
||||||
UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
|
|
||||||
UInt32 i;
|
|
||||||
for (i = 0; i < numProbs; i++)
|
|
||||||
p[i] = kBitModelTotal >> 1;
|
|
||||||
rep0 = rep1 = rep2 = rep3 = 1;
|
|
||||||
state = 0;
|
|
||||||
globalPos = 0;
|
|
||||||
distanceLimit = 0;
|
|
||||||
dictionaryPos = 0;
|
|
||||||
dictionary[dictionarySize - 1] = 0;
|
|
||||||
#ifdef _LZMA_IN_CB
|
|
||||||
RC_INIT;
|
|
||||||
#else
|
|
||||||
RC_INIT(inStream, inSize);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
len = 0;
|
|
||||||
}
|
|
||||||
while(len != 0 && nowPos < outSize)
|
|
||||||
{
|
|
||||||
UInt32 pos = dictionaryPos - rep0;
|
|
||||||
if (pos >= dictionarySize)
|
|
||||||
pos += dictionarySize;
|
|
||||||
outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
|
|
||||||
if (++dictionaryPos == dictionarySize)
|
|
||||||
dictionaryPos = 0;
|
|
||||||
len--;
|
|
||||||
}
|
|
||||||
if (dictionaryPos == 0)
|
|
||||||
previousByte = dictionary[dictionarySize - 1];
|
|
||||||
else
|
|
||||||
previousByte = dictionary[dictionaryPos - 1];
|
|
||||||
|
|
||||||
#else /* if !_LZMA_OUT_READ */
|
|
||||||
|
|
||||||
int state = 0;
|
|
||||||
UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
|
|
||||||
int len = 0;
|
|
||||||
const Byte *Buffer;
|
|
||||||
const Byte *BufferLim;
|
|
||||||
UInt32 Range;
|
|
||||||
UInt32 Code;
|
|
||||||
|
|
||||||
#ifndef _LZMA_IN_CB
|
|
||||||
*inSizeProcessed = 0;
|
|
||||||
#endif
|
|
||||||
*outSizeProcessed = 0;
|
|
||||||
|
|
||||||
{
|
|
||||||
UInt32 i;
|
|
||||||
UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
|
|
||||||
for (i = 0; i < numProbs; i++)
|
|
||||||
p[i] = kBitModelTotal >> 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _LZMA_IN_CB
|
|
||||||
RC_INIT;
|
|
||||||
#else
|
|
||||||
RC_INIT(inStream, inSize);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _LZMA_OUT_READ */
|
|
||||||
|
|
||||||
while(nowPos < outSize)
|
|
||||||
{
|
|
||||||
CProb *prob;
|
|
||||||
UInt32 bound;
|
|
||||||
int posState = (int)(
|
|
||||||
(nowPos
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
+ globalPos
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
& posStateMask);
|
|
||||||
|
|
||||||
prob = p + IsMatch + (state << kNumPosBitsMax) + posState;
|
|
||||||
IfBit0(prob)
|
|
||||||
{
|
|
||||||
int symbol = 1;
|
|
||||||
UpdateBit0(prob)
|
|
||||||
prob = p + Literal + (LZMA_LIT_SIZE *
|
|
||||||
(((
|
|
||||||
(nowPos
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
+ globalPos
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
& literalPosMask) << lc) + (previousByte >> (8 - lc))));
|
|
||||||
|
|
||||||
if (state >= kNumLitStates)
|
|
||||||
{
|
|
||||||
int matchByte;
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
UInt32 pos = dictionaryPos - rep0;
|
|
||||||
if (pos >= dictionarySize)
|
|
||||||
pos += dictionarySize;
|
|
||||||
matchByte = dictionary[pos];
|
|
||||||
#else
|
|
||||||
matchByte = outStream[nowPos - rep0];
|
|
||||||
#endif
|
|
||||||
do
|
|
||||||
{
|
|
||||||
int bit;
|
|
||||||
CProb *probLit;
|
|
||||||
matchByte <<= 1;
|
|
||||||
bit = (matchByte & 0x100);
|
|
||||||
probLit = prob + 0x100 + bit + symbol;
|
|
||||||
RC_GET_BIT2(probLit, symbol, if (bit != 0) break, if (bit == 0) break)
|
|
||||||
}
|
|
||||||
while (symbol < 0x100);
|
|
||||||
}
|
|
||||||
while (symbol < 0x100)
|
|
||||||
{
|
|
||||||
CProb *probLit = prob + symbol;
|
|
||||||
RC_GET_BIT(probLit, symbol)
|
|
||||||
}
|
|
||||||
previousByte = (Byte)symbol;
|
|
||||||
|
|
||||||
outStream[nowPos++] = previousByte;
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
if (distanceLimit < dictionarySize)
|
|
||||||
distanceLimit++;
|
|
||||||
|
|
||||||
dictionary[dictionaryPos] = previousByte;
|
|
||||||
if (++dictionaryPos == dictionarySize)
|
|
||||||
dictionaryPos = 0;
|
|
||||||
#endif
|
|
||||||
if (state < 4) state = 0;
|
|
||||||
else if (state < 10) state -= 3;
|
|
||||||
else state -= 6;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdateBit1(prob);
|
|
||||||
prob = p + IsRep + state;
|
|
||||||
IfBit0(prob)
|
|
||||||
{
|
|
||||||
UpdateBit0(prob);
|
|
||||||
rep3 = rep2;
|
|
||||||
rep2 = rep1;
|
|
||||||
rep1 = rep0;
|
|
||||||
state = state < kNumLitStates ? 0 : 3;
|
|
||||||
prob = p + LenCoder;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdateBit1(prob);
|
|
||||||
prob = p + IsRepG0 + state;
|
|
||||||
IfBit0(prob)
|
|
||||||
{
|
|
||||||
UpdateBit0(prob);
|
|
||||||
prob = p + IsRep0Long + (state << kNumPosBitsMax) + posState;
|
|
||||||
IfBit0(prob)
|
|
||||||
{
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
UInt32 pos;
|
|
||||||
#endif
|
|
||||||
UpdateBit0(prob);
|
|
||||||
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
if (distanceLimit == 0)
|
|
||||||
#else
|
|
||||||
if (nowPos == 0)
|
|
||||||
#endif
|
|
||||||
return LZMA_RESULT_DATA_ERROR;
|
|
||||||
|
|
||||||
state = state < kNumLitStates ? 9 : 11;
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
pos = dictionaryPos - rep0;
|
|
||||||
if (pos >= dictionarySize)
|
|
||||||
pos += dictionarySize;
|
|
||||||
previousByte = dictionary[pos];
|
|
||||||
dictionary[dictionaryPos] = previousByte;
|
|
||||||
if (++dictionaryPos == dictionarySize)
|
|
||||||
dictionaryPos = 0;
|
|
||||||
#else
|
|
||||||
previousByte = outStream[nowPos - rep0];
|
|
||||||
#endif
|
|
||||||
outStream[nowPos++] = previousByte;
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
if (distanceLimit < dictionarySize)
|
|
||||||
distanceLimit++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdateBit1(prob);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UInt32 distance;
|
|
||||||
UpdateBit1(prob);
|
|
||||||
prob = p + IsRepG1 + state;
|
|
||||||
IfBit0(prob)
|
|
||||||
{
|
|
||||||
UpdateBit0(prob);
|
|
||||||
distance = rep1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdateBit1(prob);
|
|
||||||
prob = p + IsRepG2 + state;
|
|
||||||
IfBit0(prob)
|
|
||||||
{
|
|
||||||
UpdateBit0(prob);
|
|
||||||
distance = rep2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdateBit1(prob);
|
|
||||||
distance = rep3;
|
|
||||||
rep3 = rep2;
|
|
||||||
}
|
|
||||||
rep2 = rep1;
|
|
||||||
}
|
|
||||||
rep1 = rep0;
|
|
||||||
rep0 = distance;
|
|
||||||
}
|
|
||||||
state = state < kNumLitStates ? 8 : 11;
|
|
||||||
prob = p + RepLenCoder;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
int numBits, offset;
|
|
||||||
CProb *probLen = prob + LenChoice;
|
|
||||||
IfBit0(probLen)
|
|
||||||
{
|
|
||||||
UpdateBit0(probLen);
|
|
||||||
probLen = prob + LenLow + (posState << kLenNumLowBits);
|
|
||||||
offset = 0;
|
|
||||||
numBits = kLenNumLowBits;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdateBit1(probLen);
|
|
||||||
probLen = prob + LenChoice2;
|
|
||||||
IfBit0(probLen)
|
|
||||||
{
|
|
||||||
UpdateBit0(probLen);
|
|
||||||
probLen = prob + LenMid + (posState << kLenNumMidBits);
|
|
||||||
offset = kLenNumLowSymbols;
|
|
||||||
numBits = kLenNumMidBits;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdateBit1(probLen);
|
|
||||||
probLen = prob + LenHigh;
|
|
||||||
offset = kLenNumLowSymbols + kLenNumMidSymbols;
|
|
||||||
numBits = kLenNumHighBits;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RangeDecoderBitTreeDecode(probLen, numBits, len);
|
|
||||||
len += offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state < 4)
|
|
||||||
{
|
|
||||||
int posSlot;
|
|
||||||
state += kNumLitStates;
|
|
||||||
prob = p + PosSlot +
|
|
||||||
((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
|
|
||||||
kNumPosSlotBits);
|
|
||||||
RangeDecoderBitTreeDecode(prob, kNumPosSlotBits, posSlot);
|
|
||||||
if (posSlot >= kStartPosModelIndex)
|
|
||||||
{
|
|
||||||
int numDirectBits = ((posSlot >> 1) - 1);
|
|
||||||
rep0 = (2 | ((UInt32)posSlot & 1));
|
|
||||||
if (posSlot < kEndPosModelIndex)
|
|
||||||
{
|
|
||||||
rep0 <<= numDirectBits;
|
|
||||||
prob = p + SpecPos + rep0 - posSlot - 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
numDirectBits -= kNumAlignBits;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
RC_NORMALIZE
|
|
||||||
Range >>= 1;
|
|
||||||
rep0 <<= 1;
|
|
||||||
if (Code >= Range)
|
|
||||||
{
|
|
||||||
Code -= Range;
|
|
||||||
rep0 |= 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (--numDirectBits != 0);
|
|
||||||
prob = p + Align;
|
|
||||||
rep0 <<= kNumAlignBits;
|
|
||||||
numDirectBits = kNumAlignBits;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
int i = 1;
|
|
||||||
int mi = 1;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
CProb *prob3 = prob + mi;
|
|
||||||
RC_GET_BIT2(prob3, mi, ; , rep0 |= i);
|
|
||||||
i <<= 1;
|
|
||||||
}
|
|
||||||
while(--numDirectBits != 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
rep0 = posSlot;
|
|
||||||
if (++rep0 == (UInt32)(0))
|
|
||||||
{
|
|
||||||
/* it's for stream version */
|
|
||||||
len = kLzmaStreamWasFinishedId;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
len += kMatchMinLen;
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
if (rep0 > distanceLimit)
|
|
||||||
#else
|
|
||||||
if (rep0 > nowPos)
|
|
||||||
#endif
|
|
||||||
return LZMA_RESULT_DATA_ERROR;
|
|
||||||
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
if (dictionarySize - distanceLimit > (UInt32)len)
|
|
||||||
distanceLimit += len;
|
|
||||||
else
|
|
||||||
distanceLimit = dictionarySize;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
UInt32 pos = dictionaryPos - rep0;
|
|
||||||
if (pos >= dictionarySize)
|
|
||||||
pos += dictionarySize;
|
|
||||||
previousByte = dictionary[pos];
|
|
||||||
dictionary[dictionaryPos] = previousByte;
|
|
||||||
if (++dictionaryPos == dictionarySize)
|
|
||||||
dictionaryPos = 0;
|
|
||||||
#else
|
|
||||||
previousByte = outStream[nowPos - rep0];
|
|
||||||
#endif
|
|
||||||
len--;
|
|
||||||
outStream[nowPos++] = previousByte;
|
|
||||||
}
|
|
||||||
while(len != 0 && nowPos < outSize);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RC_NORMALIZE;
|
|
||||||
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
vs->Range = Range;
|
|
||||||
vs->Code = Code;
|
|
||||||
vs->DictionaryPos = dictionaryPos;
|
|
||||||
vs->GlobalPos = globalPos + (UInt32)nowPos;
|
|
||||||
vs->DistanceLimit = distanceLimit;
|
|
||||||
vs->Reps[0] = rep0;
|
|
||||||
vs->Reps[1] = rep1;
|
|
||||||
vs->Reps[2] = rep2;
|
|
||||||
vs->Reps[3] = rep3;
|
|
||||||
vs->State = state;
|
|
||||||
vs->RemainLen = len;
|
|
||||||
vs->TempDictionary[0] = tempDictionary[0];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LZMA_IN_CB
|
|
||||||
vs->Buffer = Buffer;
|
|
||||||
vs->BufferLim = BufferLim;
|
|
||||||
#else
|
|
||||||
*inSizeProcessed = (SizeT)(Buffer - inStream);
|
|
||||||
#endif
|
|
||||||
*outSizeProcessed = nowPos;
|
|
||||||
return LZMA_RESULT_OK;
|
|
||||||
}
|
|
@ -1,131 +0,0 @@
|
|||||||
/*
|
|
||||||
LzmaDecode.h
|
|
||||||
LZMA Decoder interface
|
|
||||||
|
|
||||||
LZMA SDK 4.21 Copyright (c) 1999-2005 Igor Pavlov (2005-06-08)
|
|
||||||
http://www.7-zip.org/
|
|
||||||
|
|
||||||
LZMA SDK is licensed under two licenses:
|
|
||||||
1) GNU Lesser General Public License (GNU LGPL)
|
|
||||||
2) Common Public License (CPL)
|
|
||||||
It means that you can select one of these two licenses and
|
|
||||||
follow rules of that license.
|
|
||||||
|
|
||||||
SPECIAL EXCEPTION:
|
|
||||||
Igor Pavlov, as the author of this code, expressly permits you to
|
|
||||||
statically or dynamically link your code (or bind by name) to the
|
|
||||||
interfaces of this file without subjecting your linked code to the
|
|
||||||
terms of the CPL or GNU LGPL. Any modifications or additions
|
|
||||||
to this file, however, are subject to the LGPL or CPL terms.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __LZMADECODE_H
|
|
||||||
#define __LZMADECODE_H
|
|
||||||
|
|
||||||
/* #define _LZMA_IN_CB */
|
|
||||||
/* Use callback for input data */
|
|
||||||
|
|
||||||
/* #define _LZMA_OUT_READ */
|
|
||||||
/* Use read function for output data */
|
|
||||||
|
|
||||||
/* #define _LZMA_PROB32 */
|
|
||||||
/* It can increase speed on some 32-bit CPUs,
|
|
||||||
but memory usage will be doubled in that case */
|
|
||||||
|
|
||||||
/* #define _LZMA_LOC_OPT */
|
|
||||||
/* Enable local speed optimizations inside code */
|
|
||||||
|
|
||||||
/* #define _LZMA_SYSTEM_SIZE_T */
|
|
||||||
/* Use system's size_t. You can use it to enable 64-bit sizes supporting*/
|
|
||||||
|
|
||||||
#ifndef UInt32
|
|
||||||
#ifdef _LZMA_UINT32_IS_ULONG
|
|
||||||
#define UInt32 unsigned long
|
|
||||||
#else
|
|
||||||
#define UInt32 unsigned int
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SizeT
|
|
||||||
#ifdef _LZMA_SYSTEM_SIZE_T
|
|
||||||
#include <stddef.h>
|
|
||||||
#define SizeT size_t
|
|
||||||
#else
|
|
||||||
#define SizeT UInt32
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LZMA_PROB32
|
|
||||||
#define CProb UInt32
|
|
||||||
#else
|
|
||||||
#define CProb unsigned short
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LZMA_RESULT_OK 0
|
|
||||||
#define LZMA_RESULT_DATA_ERROR 1
|
|
||||||
|
|
||||||
#ifdef _LZMA_IN_CB
|
|
||||||
typedef struct _ILzmaInCallback
|
|
||||||
{
|
|
||||||
int (*Read)(void *object, const unsigned char **buffer, SizeT *bufferSize);
|
|
||||||
} ILzmaInCallback;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LZMA_BASE_SIZE 1846
|
|
||||||
#define LZMA_LIT_SIZE 768
|
|
||||||
|
|
||||||
#define LZMA_PROPERTIES_SIZE 5
|
|
||||||
|
|
||||||
typedef struct _CLzmaProperties
|
|
||||||
{
|
|
||||||
int lc;
|
|
||||||
int lp;
|
|
||||||
int pb;
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
UInt32 DictionarySize;
|
|
||||||
#endif
|
|
||||||
}CLzmaProperties;
|
|
||||||
|
|
||||||
int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size);
|
|
||||||
|
|
||||||
#define LzmaGetNumProbs(Properties) (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((Properties)->lc + (Properties)->lp)))
|
|
||||||
|
|
||||||
#define kLzmaNeedInitId (-2)
|
|
||||||
|
|
||||||
typedef struct _CLzmaDecoderState
|
|
||||||
{
|
|
||||||
CLzmaProperties Properties;
|
|
||||||
CProb *Probs;
|
|
||||||
|
|
||||||
#ifdef _LZMA_IN_CB
|
|
||||||
const unsigned char *Buffer;
|
|
||||||
const unsigned char *BufferLim;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
unsigned char *Dictionary;
|
|
||||||
UInt32 Range;
|
|
||||||
UInt32 Code;
|
|
||||||
UInt32 DictionaryPos;
|
|
||||||
UInt32 GlobalPos;
|
|
||||||
UInt32 DistanceLimit;
|
|
||||||
UInt32 Reps[4];
|
|
||||||
int State;
|
|
||||||
int RemainLen;
|
|
||||||
unsigned char TempDictionary[4];
|
|
||||||
#endif
|
|
||||||
} CLzmaDecoderState;
|
|
||||||
|
|
||||||
#ifdef _LZMA_OUT_READ
|
|
||||||
#define LzmaDecoderInit(vs) { (vs)->RemainLen = kLzmaNeedInitId; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int LzmaDecode(CLzmaDecoderState *vs,
|
|
||||||
#ifdef _LZMA_IN_CB
|
|
||||||
ILzmaInCallback *inCallback,
|
|
||||||
#else
|
|
||||||
const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
|
|
||||||
#endif
|
|
||||||
unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,163 +0,0 @@
|
|||||||
// ICoder.h
|
|
||||||
|
|
||||||
#ifndef __ICODER_H
|
|
||||||
#define __ICODER_H
|
|
||||||
|
|
||||||
#include "IStream.h"
|
|
||||||
|
|
||||||
// "23170F69-40C1-278A-0000-000400xx0000"
|
|
||||||
#define CODER_INTERFACE(i, x) \
|
|
||||||
DEFINE_GUID(IID_ ## i, \
|
|
||||||
0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x04, 0x00, x, 0x00, 0x00); \
|
|
||||||
struct i: public IUnknown
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressProgressInfo, 0x04)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressCoder, 0x05)
|
|
||||||
{
|
|
||||||
STDMETHOD(Code)(ISequentialInStream *inStream,
|
|
||||||
ISequentialOutStream *outStream,
|
|
||||||
const UInt64 *inSize,
|
|
||||||
const UInt64 *outSize,
|
|
||||||
ICompressProgressInfo *progress) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressCoder2, 0x18)
|
|
||||||
{
|
|
||||||
STDMETHOD(Code)(ISequentialInStream **inStreams,
|
|
||||||
const UInt64 **inSizes,
|
|
||||||
UInt32 numInStreams,
|
|
||||||
ISequentialOutStream **outStreams,
|
|
||||||
const UInt64 **outSizes,
|
|
||||||
UInt32 numOutStreams,
|
|
||||||
ICompressProgressInfo *progress) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace NCoderPropID
|
|
||||||
{
|
|
||||||
enum EEnum
|
|
||||||
{
|
|
||||||
kDictionarySize = 0x400,
|
|
||||||
kUsedMemorySize,
|
|
||||||
kOrder,
|
|
||||||
kPosStateBits = 0x440,
|
|
||||||
kLitContextBits,
|
|
||||||
kLitPosBits,
|
|
||||||
kNumFastBytes = 0x450,
|
|
||||||
kMatchFinder,
|
|
||||||
kMatchFinderCycles,
|
|
||||||
kNumPasses = 0x460,
|
|
||||||
kAlgorithm = 0x470,
|
|
||||||
kMultiThread = 0x480,
|
|
||||||
kNumThreads,
|
|
||||||
kEndMarker = 0x490
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressSetCoderProperties, 0x20)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
|
|
||||||
const PROPVARIANT *properties, UInt32 numProperties) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
CODER_INTERFACE(ICompressSetCoderProperties, 0x21)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressWriteCoderProperties, 0x23)
|
|
||||||
{
|
|
||||||
STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStreams) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24)
|
|
||||||
{
|
|
||||||
STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressSetCoderMt, 0x25)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressGetSubStreamSize, 0x30)
|
|
||||||
{
|
|
||||||
STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressSetInStream, 0x31)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE;
|
|
||||||
STDMETHOD(ReleaseInStream)() PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressSetOutStream, 0x32)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE;
|
|
||||||
STDMETHOD(ReleaseOutStream)() PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressSetInStreamSize, 0x33)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressSetOutStreamSize, 0x34)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICompressFilter, 0x40)
|
|
||||||
{
|
|
||||||
STDMETHOD(Init)() PURE;
|
|
||||||
STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE;
|
|
||||||
// Filter return outSize (UInt32)
|
|
||||||
// if (outSize <= size): Filter have converted outSize bytes
|
|
||||||
// if (outSize > size): Filter have not converted anything.
|
|
||||||
// and it needs at least outSize bytes to convert one block
|
|
||||||
// (it's for crypto block algorithms).
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICryptoProperties, 0x80)
|
|
||||||
{
|
|
||||||
STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE;
|
|
||||||
STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICryptoSetPassword, 0x90)
|
|
||||||
{
|
|
||||||
STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
CODER_INTERFACE(ICryptoSetCRC, 0xA0)
|
|
||||||
{
|
|
||||||
STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////
|
|
||||||
// It's for DLL file
|
|
||||||
namespace NMethodPropID
|
|
||||||
{
|
|
||||||
enum EEnum
|
|
||||||
{
|
|
||||||
kID,
|
|
||||||
kName,
|
|
||||||
kDecoder,
|
|
||||||
kEncoder,
|
|
||||||
kInStreams,
|
|
||||||
kOutStreams,
|
|
||||||
kDescription
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,62 +0,0 @@
|
|||||||
// IStream.h
|
|
||||||
|
|
||||||
#ifndef __ISTREAM_H
|
|
||||||
#define __ISTREAM_H
|
|
||||||
|
|
||||||
#include "../Common/MyUnknown.h"
|
|
||||||
#include "../Common/Types.h"
|
|
||||||
|
|
||||||
// "23170F69-40C1-278A-0000-000300xx0000"
|
|
||||||
|
|
||||||
#define STREAM_INTERFACE_SUB(i, b, x) \
|
|
||||||
DEFINE_GUID(IID_ ## i, \
|
|
||||||
0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, x, 0x00, 0x00); \
|
|
||||||
struct i: public b
|
|
||||||
|
|
||||||
#define STREAM_INTERFACE(i, x) STREAM_INTERFACE_SUB(i, IUnknown, x)
|
|
||||||
|
|
||||||
STREAM_INTERFACE(ISequentialInStream, 0x01)
|
|
||||||
{
|
|
||||||
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) PURE;
|
|
||||||
/*
|
|
||||||
Out: if size != 0, return_value = S_OK and (*processedSize == 0),
|
|
||||||
then there are no more bytes in stream.
|
|
||||||
if (size > 0) && there are bytes in stream,
|
|
||||||
this function must read at least 1 byte.
|
|
||||||
This function is allowed to read less than number of remaining bytes in stream.
|
|
||||||
You must call Read function in loop, if you need exact amount of data
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
STREAM_INTERFACE(ISequentialOutStream, 0x02)
|
|
||||||
{
|
|
||||||
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) PURE;
|
|
||||||
/*
|
|
||||||
if (size > 0) this function must write at least 1 byte.
|
|
||||||
This function is allowed to write less than "size".
|
|
||||||
You must call Write function in loop, if you need to write exact amount of data
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
STREAM_INTERFACE_SUB(IInStream, ISequentialInStream, 0x03)
|
|
||||||
{
|
|
||||||
STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
STREAM_INTERFACE_SUB(IOutStream, ISequentialOutStream, 0x04)
|
|
||||||
{
|
|
||||||
STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE;
|
|
||||||
STDMETHOD(SetSize)(Int64 newSize) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
STREAM_INTERFACE(IStreamGetSize, 0x06)
|
|
||||||
{
|
|
||||||
STDMETHOD(GetSize)(UInt64 *size) PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
STREAM_INTERFACE(IOutStreamFlush, 0x07)
|
|
||||||
{
|
|
||||||
STDMETHOD(Flush)() PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,118 +0,0 @@
|
|||||||
// Common/Alloc.cpp
|
|
||||||
|
|
||||||
#include "StdAfx.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include "MyWindows.h"
|
|
||||||
#else
|
|
||||||
#include <stdlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "Alloc.h"
|
|
||||||
|
|
||||||
/* #define _SZ_ALLOC_DEBUG */
|
|
||||||
/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */
|
|
||||||
#ifdef _SZ_ALLOC_DEBUG
|
|
||||||
#include <stdio.h>
|
|
||||||
int g_allocCount = 0;
|
|
||||||
int g_allocCountMid = 0;
|
|
||||||
int g_allocCountBig = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void *MyAlloc(size_t size) throw()
|
|
||||||
{
|
|
||||||
if (size == 0)
|
|
||||||
return 0;
|
|
||||||
#ifdef _SZ_ALLOC_DEBUG
|
|
||||||
fprintf(stderr, "\nAlloc %10d bytes; count = %10d", size, g_allocCount++);
|
|
||||||
#endif
|
|
||||||
return ::malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFree(void *address) throw()
|
|
||||||
{
|
|
||||||
#ifdef _SZ_ALLOC_DEBUG
|
|
||||||
if (address != 0)
|
|
||||||
fprintf(stderr, "\nFree; count = %10d", --g_allocCount);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
::free(address);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
void *MidAlloc(size_t size) throw()
|
|
||||||
{
|
|
||||||
if (size == 0)
|
|
||||||
return 0;
|
|
||||||
#ifdef _SZ_ALLOC_DEBUG
|
|
||||||
fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++);
|
|
||||||
#endif
|
|
||||||
return ::VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MidFree(void *address) throw()
|
|
||||||
{
|
|
||||||
#ifdef _SZ_ALLOC_DEBUG
|
|
||||||
if (address != 0)
|
|
||||||
fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid);
|
|
||||||
#endif
|
|
||||||
if (address == 0)
|
|
||||||
return;
|
|
||||||
::VirtualFree(address, 0, MEM_RELEASE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static SIZE_T g_LargePageSize =
|
|
||||||
#ifdef _WIN64
|
|
||||||
(1 << 21);
|
|
||||||
#else
|
|
||||||
(1 << 22);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef SIZE_T (WINAPI *GetLargePageMinimumP)();
|
|
||||||
|
|
||||||
bool SetLargePageSize()
|
|
||||||
{
|
|
||||||
GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP)
|
|
||||||
::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum");
|
|
||||||
if (largePageMinimum == 0)
|
|
||||||
return false;
|
|
||||||
SIZE_T size = largePageMinimum();
|
|
||||||
if (size == 0 || (size & (size - 1)) != 0)
|
|
||||||
return false;
|
|
||||||
g_LargePageSize = size;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void *BigAlloc(size_t size) throw()
|
|
||||||
{
|
|
||||||
if (size == 0)
|
|
||||||
return 0;
|
|
||||||
#ifdef _SZ_ALLOC_DEBUG
|
|
||||||
fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (size >= (1 << 18))
|
|
||||||
{
|
|
||||||
void *res = ::VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)),
|
|
||||||
MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE);
|
|
||||||
if (res != 0)
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
return ::VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BigFree(void *address) throw()
|
|
||||||
{
|
|
||||||
#ifdef _SZ_ALLOC_DEBUG
|
|
||||||
if (address != 0)
|
|
||||||
fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (address == 0)
|
|
||||||
return;
|
|
||||||
::VirtualFree(address, 0, MEM_RELEASE);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,29 +0,0 @@
|
|||||||
// Common/Alloc.h
|
|
||||||
|
|
||||||
#ifndef __COMMON_ALLOC_H
|
|
||||||
#define __COMMON_ALLOC_H
|
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
void *MyAlloc(size_t size) throw();
|
|
||||||
void MyFree(void *address) throw();
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
bool SetLargePageSize();
|
|
||||||
|
|
||||||
void *MidAlloc(size_t size) throw();
|
|
||||||
void MidFree(void *address) throw();
|
|
||||||
void *BigAlloc(size_t size) throw();
|
|
||||||
void BigFree(void *address) throw();
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define MidAlloc(size) MyAlloc(size)
|
|
||||||
#define MidFree(address) MyFree(address)
|
|
||||||
#define BigAlloc(size) MyAlloc(size)
|
|
||||||
#define BigFree(address) MyFree(address)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,61 +0,0 @@
|
|||||||
// Common/CRC.cpp
|
|
||||||
|
|
||||||
#include "StdAfx.h"
|
|
||||||
|
|
||||||
#include "CRC.h"
|
|
||||||
|
|
||||||
static const UInt32 kCRCPoly = 0xEDB88320;
|
|
||||||
|
|
||||||
UInt32 CCRC::Table[256];
|
|
||||||
|
|
||||||
void CCRC::InitTable()
|
|
||||||
{
|
|
||||||
for (UInt32 i = 0; i < 256; i++)
|
|
||||||
{
|
|
||||||
UInt32 r = i;
|
|
||||||
for (int j = 0; j < 8; j++)
|
|
||||||
if (r & 1)
|
|
||||||
r = (r >> 1) ^ kCRCPoly;
|
|
||||||
else
|
|
||||||
r >>= 1;
|
|
||||||
CCRC::Table[i] = r;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class CCRCTableInit
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CCRCTableInit() { CCRC::InitTable(); }
|
|
||||||
} g_CRCTableInit;
|
|
||||||
|
|
||||||
void CCRC::UpdateByte(Byte b)
|
|
||||||
{
|
|
||||||
_value = Table[((Byte)(_value)) ^ b] ^ (_value >> 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCRC::UpdateUInt16(UInt16 v)
|
|
||||||
{
|
|
||||||
UpdateByte(Byte(v));
|
|
||||||
UpdateByte(Byte(v >> 8));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCRC::UpdateUInt32(UInt32 v)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 4; i++)
|
|
||||||
UpdateByte((Byte)(v >> (8 * i)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCRC::UpdateUInt64(UInt64 v)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 8; i++)
|
|
||||||
UpdateByte((Byte)(v >> (8 * i)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCRC::Update(const void *data, size_t size)
|
|
||||||
{
|
|
||||||
UInt32 v = _value;
|
|
||||||
const Byte *p = (const Byte *)data;
|
|
||||||
for (; size > 0 ; size--, p++)
|
|
||||||
v = Table[((Byte)(v)) ^ *p] ^ (v >> 8);
|
|
||||||
_value = v;
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
// Common/CRC.h
|
|
||||||
|
|
||||||
#ifndef __COMMON_CRC_H
|
|
||||||
#define __COMMON_CRC_H
|
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#include "Types.h"
|
|
||||||
|
|
||||||
class CCRC
|
|
||||||
{
|
|
||||||
UInt32 _value;
|
|
||||||
public:
|
|
||||||
static UInt32 Table[256];
|
|
||||||
static void InitTable();
|
|
||||||
|
|
||||||
CCRC(): _value(0xFFFFFFFF){};
|
|
||||||
void Init() { _value = 0xFFFFFFFF; }
|
|
||||||
void UpdateByte(Byte v);
|
|
||||||
void UpdateUInt16(UInt16 v);
|
|
||||||
void UpdateUInt32(UInt32 v);
|
|
||||||
void UpdateUInt64(UInt64 v);
|
|
||||||
void Update(const void *data, size_t size);
|
|
||||||
UInt32 GetDigest() const { return _value ^ 0xFFFFFFFF; }
|
|
||||||
static UInt32 CalculateDigest(const void *data, size_t size)
|
|
||||||
{
|
|
||||||
CCRC crc;
|
|
||||||
crc.Update(data, size);
|
|
||||||
return crc.GetDigest();
|
|
||||||
}
|
|
||||||
static bool VerifyDigest(UInt32 digest, const void *data, size_t size)
|
|
||||||
{
|
|
||||||
return (CalculateDigest(data, size) == digest);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,20 +0,0 @@
|
|||||||
// Common/Defs.h
|
|
||||||
|
|
||||||
#ifndef __COMMON_DEFS_H
|
|
||||||
#define __COMMON_DEFS_H
|
|
||||||
|
|
||||||
template <class T> inline T MyMin(T a, T b)
|
|
||||||
{ return a < b ? a : b; }
|
|
||||||
template <class T> inline T MyMax(T a, T b)
|
|
||||||
{ return a > b ? a : b; }
|
|
||||||
|
|
||||||
template <class T> inline int MyCompare(T a, T b)
|
|
||||||
{ return a < b ? -1 : (a == b ? 0 : 1); }
|
|
||||||
|
|
||||||
inline int BoolToInt(bool value)
|
|
||||||
{ return (value ? 1: 0); }
|
|
||||||
|
|
||||||
inline bool IntToBool(int value)
|
|
||||||
{ return (value != 0); }
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,203 +0,0 @@
|
|||||||
// MyCom.h
|
|
||||||
|
|
||||||
#ifndef __MYCOM_H
|
|
||||||
#define __MYCOM_H
|
|
||||||
|
|
||||||
#include "MyWindows.h"
|
|
||||||
|
|
||||||
#define RINOK(x) { HRESULT __result_ = (x); if(__result_ != S_OK) return __result_; }
|
|
||||||
|
|
||||||
template <class T>
|
|
||||||
class CMyComPtr
|
|
||||||
{
|
|
||||||
T* _p;
|
|
||||||
public:
|
|
||||||
// typedef T _PtrClass;
|
|
||||||
CMyComPtr() { _p = NULL;}
|
|
||||||
CMyComPtr(T* p) {if ((_p = p) != NULL) p->AddRef(); }
|
|
||||||
CMyComPtr(const CMyComPtr<T>& lp)
|
|
||||||
{
|
|
||||||
if ((_p = lp._p) != NULL)
|
|
||||||
_p->AddRef();
|
|
||||||
}
|
|
||||||
~CMyComPtr() { if (_p) _p->Release(); }
|
|
||||||
void Release() { if (_p) { _p->Release(); _p = NULL; } }
|
|
||||||
operator T*() const { return (T*)_p; }
|
|
||||||
// T& operator*() const { return *_p; }
|
|
||||||
T** operator&() { return &_p; }
|
|
||||||
T* operator->() const { return _p; }
|
|
||||||
T* operator=(T* p)
|
|
||||||
{
|
|
||||||
if (p != 0)
|
|
||||||
p->AddRef();
|
|
||||||
if (_p)
|
|
||||||
_p->Release();
|
|
||||||
_p = p;
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
T* operator=(const CMyComPtr<T>& lp) { return (*this = lp._p); }
|
|
||||||
bool operator!() const { return (_p == NULL); }
|
|
||||||
// bool operator==(T* pT) const { return _p == pT; }
|
|
||||||
// Compare two objects for equivalence
|
|
||||||
void Attach(T* p2)
|
|
||||||
{
|
|
||||||
Release();
|
|
||||||
_p = p2;
|
|
||||||
}
|
|
||||||
T* Detach()
|
|
||||||
{
|
|
||||||
T* pt = _p;
|
|
||||||
_p = NULL;
|
|
||||||
return pt;
|
|
||||||
}
|
|
||||||
#ifdef _WIN32
|
|
||||||
HRESULT CoCreateInstance(REFCLSID rclsid, REFIID iid, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
|
|
||||||
{
|
|
||||||
return ::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, (void**)&_p);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/*
|
|
||||||
HRESULT CoCreateInstance(LPCOLESTR szProgID, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
|
|
||||||
{
|
|
||||||
CLSID clsid;
|
|
||||||
HRESULT hr = CLSIDFromProgID(szProgID, &clsid);
|
|
||||||
ATLASSERT(_p == NULL);
|
|
||||||
if (SUCCEEDED(hr))
|
|
||||||
hr = ::CoCreateInstance(clsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&_p);
|
|
||||||
return hr;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
template <class Q>
|
|
||||||
HRESULT QueryInterface(REFGUID iid, Q** pp) const
|
|
||||||
{
|
|
||||||
return _p->QueryInterface(iid, (void**)pp);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
class CMyComBSTR
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
BSTR m_str;
|
|
||||||
CMyComBSTR() { m_str = NULL; }
|
|
||||||
CMyComBSTR(LPCOLESTR pSrc) { m_str = ::SysAllocString(pSrc); }
|
|
||||||
// CMyComBSTR(int nSize) { m_str = ::SysAllocStringLen(NULL, nSize); }
|
|
||||||
// CMyComBSTR(int nSize, LPCOLESTR sz) { m_str = ::SysAllocStringLen(sz, nSize); }
|
|
||||||
CMyComBSTR(const CMyComBSTR& src) { m_str = src.MyCopy(); }
|
|
||||||
/*
|
|
||||||
CMyComBSTR(REFGUID src)
|
|
||||||
{
|
|
||||||
LPOLESTR szGuid;
|
|
||||||
StringFromCLSID(src, &szGuid);
|
|
||||||
m_str = ::SysAllocString(szGuid);
|
|
||||||
CoTaskMemFree(szGuid);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
~CMyComBSTR() { ::SysFreeString(m_str); }
|
|
||||||
CMyComBSTR& operator=(const CMyComBSTR& src)
|
|
||||||
{
|
|
||||||
if (m_str != src.m_str)
|
|
||||||
{
|
|
||||||
if (m_str)
|
|
||||||
::SysFreeString(m_str);
|
|
||||||
m_str = src.MyCopy();
|
|
||||||
}
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
CMyComBSTR& operator=(LPCOLESTR pSrc)
|
|
||||||
{
|
|
||||||
::SysFreeString(m_str);
|
|
||||||
m_str = ::SysAllocString(pSrc);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
unsigned int Length() const { return ::SysStringLen(m_str); }
|
|
||||||
operator BSTR() const { return m_str; }
|
|
||||||
BSTR* operator&() { return &m_str; }
|
|
||||||
BSTR MyCopy() const
|
|
||||||
{
|
|
||||||
int byteLen = ::SysStringByteLen(m_str);
|
|
||||||
BSTR res = ::SysAllocStringByteLen(NULL, byteLen);
|
|
||||||
memmove(res, m_str, byteLen);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
void Attach(BSTR src) { m_str = src; }
|
|
||||||
BSTR Detach()
|
|
||||||
{
|
|
||||||
BSTR s = m_str;
|
|
||||||
m_str = NULL;
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
void Empty()
|
|
||||||
{
|
|
||||||
::SysFreeString(m_str);
|
|
||||||
m_str = NULL;
|
|
||||||
}
|
|
||||||
bool operator!() const { return (m_str == NULL); }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
class CMyUnknownImp
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ULONG __m_RefCount;
|
|
||||||
CMyUnknownImp(): __m_RefCount(0) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
#define MY_QUERYINTERFACE_BEGIN STDMETHOD(QueryInterface) \
|
|
||||||
(REFGUID iid, void **outObject) {
|
|
||||||
|
|
||||||
#define MY_QUERYINTERFACE_ENTRY(i) if (iid == IID_ ## i) \
|
|
||||||
{ *outObject = (void *)(i *)this; AddRef(); return S_OK; }
|
|
||||||
|
|
||||||
#define MY_QUERYINTERFACE_END return E_NOINTERFACE; }
|
|
||||||
|
|
||||||
#define MY_ADDREF_RELEASE \
|
|
||||||
STDMETHOD_(ULONG, AddRef)() { return ++__m_RefCount; } \
|
|
||||||
STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) \
|
|
||||||
return __m_RefCount; delete this; return 0; }
|
|
||||||
|
|
||||||
#define MY_UNKNOWN_IMP_SPEC(i) \
|
|
||||||
MY_QUERYINTERFACE_BEGIN \
|
|
||||||
i \
|
|
||||||
MY_QUERYINTERFACE_END \
|
|
||||||
MY_ADDREF_RELEASE
|
|
||||||
|
|
||||||
|
|
||||||
#define MY_UNKNOWN_IMP STDMETHOD(QueryInterface)(REFGUID, void **) { \
|
|
||||||
MY_QUERYINTERFACE_END \
|
|
||||||
MY_ADDREF_RELEASE
|
|
||||||
|
|
||||||
#define MY_UNKNOWN_IMP1(i) MY_UNKNOWN_IMP_SPEC( \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define MY_UNKNOWN_IMP2(i1, i2) MY_UNKNOWN_IMP_SPEC( \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i1) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i2) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define MY_UNKNOWN_IMP3(i1, i2, i3) MY_UNKNOWN_IMP_SPEC( \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i1) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i2) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i3) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define MY_UNKNOWN_IMP4(i1, i2, i3, i4) MY_UNKNOWN_IMP_SPEC( \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i1) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i2) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i3) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i4) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#define MY_UNKNOWN_IMP5(i1, i2, i3, i4, i5) MY_UNKNOWN_IMP_SPEC( \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i1) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i2) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i3) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i4) \
|
|
||||||
MY_QUERYINTERFACE_ENTRY(i5) \
|
|
||||||
)
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,54 +0,0 @@
|
|||||||
// Common/MyGuidDef.h
|
|
||||||
|
|
||||||
#ifndef GUID_DEFINED
|
|
||||||
#define GUID_DEFINED
|
|
||||||
|
|
||||||
#include "Types.h"
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UInt32 Data1;
|
|
||||||
UInt16 Data2;
|
|
||||||
UInt16 Data3;
|
|
||||||
unsigned char Data4[8];
|
|
||||||
} GUID;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#define REFGUID const GUID &
|
|
||||||
#else
|
|
||||||
#define REFGUID const GUID *
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define REFCLSID REFGUID
|
|
||||||
#define REFIID REFGUID
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
inline bool operator==(REFGUID g1, REFGUID g2)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < (int)sizeof(g1); i++)
|
|
||||||
if (((const unsigned char *)&g1)[i] != ((const unsigned char *)&g2)[i])
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
inline bool operator!=(REFGUID g1, REFGUID g2) { return !(g1 == g2); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#define MY_EXTERN_C extern "C"
|
|
||||||
#else
|
|
||||||
#define MY_EXTERN_C extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // GUID_DEFINED
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEFINE_GUID
|
|
||||||
#undef DEFINE_GUID
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef INITGUID
|
|
||||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
|
||||||
MY_EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
|
||||||
#else
|
|
||||||
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
|
||||||
MY_EXTERN_C const GUID name
|
|
||||||
#endif
|
|
@ -1,13 +0,0 @@
|
|||||||
// Common/MyInitGuid.h
|
|
||||||
|
|
||||||
#ifndef __COMMON_MYINITGUID_H
|
|
||||||
#define __COMMON_MYINITGUID_H
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <initguid.h>
|
|
||||||
#else
|
|
||||||
#define INITGUID
|
|
||||||
#include "MyGuidDef.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,24 +0,0 @@
|
|||||||
// MyUnknown.h
|
|
||||||
|
|
||||||
#ifndef __MYUNKNOWN_H
|
|
||||||
#define __MYUNKNOWN_H
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
#ifdef _WIN32_WCE
|
|
||||||
#if (_WIN32_WCE > 300)
|
|
||||||
#include <basetyps.h>
|
|
||||||
#else
|
|
||||||
#define MIDL_INTERFACE(x) struct
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#include <basetyps.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <unknwn.h>
|
|
||||||
|
|
||||||
#else
|
|
||||||
#include "MyWindows.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,201 +0,0 @@
|
|||||||
// MyWindows.h
|
|
||||||
|
|
||||||
#ifndef __MYWINDOWS_H
|
|
||||||
#define __MYWINDOWS_H
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
#define CHAR_PATH_SEPARATOR '\\'
|
|
||||||
#define WCHAR_PATH_SEPARATOR L'\\'
|
|
||||||
#define STRING_PATH_SEPARATOR "\\"
|
|
||||||
#define WSTRING_PATH_SEPARATOR L"\\"
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define CHAR_PATH_SEPARATOR '/'
|
|
||||||
#define WCHAR_PATH_SEPARATOR L'/'
|
|
||||||
#define STRING_PATH_SEPARATOR "/"
|
|
||||||
#define WSTRING_PATH_SEPARATOR L"/"
|
|
||||||
|
|
||||||
#include <stddef.h> // for wchar_t
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "MyGuidDef.h"
|
|
||||||
|
|
||||||
typedef char CHAR;
|
|
||||||
typedef unsigned char UCHAR;
|
|
||||||
|
|
||||||
#undef BYTE
|
|
||||||
typedef unsigned char BYTE;
|
|
||||||
|
|
||||||
typedef short SHORT;
|
|
||||||
typedef unsigned short USHORT;
|
|
||||||
|
|
||||||
#undef WORD
|
|
||||||
typedef unsigned short WORD;
|
|
||||||
typedef short VARIANT_BOOL;
|
|
||||||
|
|
||||||
typedef int INT;
|
|
||||||
typedef Int32 INT32;
|
|
||||||
typedef unsigned int UINT;
|
|
||||||
typedef UInt32 UINT32;
|
|
||||||
typedef INT32 LONG; // LONG, ULONG and DWORD must be 32-bit
|
|
||||||
typedef UINT32 ULONG;
|
|
||||||
|
|
||||||
#undef DWORD
|
|
||||||
typedef UINT32 DWORD;
|
|
||||||
|
|
||||||
typedef Int64 LONGLONG;
|
|
||||||
typedef UInt64 ULONGLONG;
|
|
||||||
|
|
||||||
typedef struct LARGE_INTEGER { LONGLONG QuadPart; }LARGE_INTEGER;
|
|
||||||
typedef struct _ULARGE_INTEGER { ULONGLONG QuadPart;} ULARGE_INTEGER;
|
|
||||||
|
|
||||||
typedef const CHAR *LPCSTR;
|
|
||||||
typedef CHAR TCHAR;
|
|
||||||
typedef const TCHAR *LPCTSTR;
|
|
||||||
typedef wchar_t WCHAR;
|
|
||||||
typedef WCHAR OLECHAR;
|
|
||||||
typedef const WCHAR *LPCWSTR;
|
|
||||||
typedef OLECHAR *BSTR;
|
|
||||||
typedef const OLECHAR *LPCOLESTR;
|
|
||||||
typedef OLECHAR *LPOLESTR;
|
|
||||||
|
|
||||||
typedef struct _FILETIME
|
|
||||||
{
|
|
||||||
DWORD dwLowDateTime;
|
|
||||||
DWORD dwHighDateTime;
|
|
||||||
}FILETIME;
|
|
||||||
|
|
||||||
#define HRESULT LONG
|
|
||||||
#define FAILED(Status) ((HRESULT)(Status)<0)
|
|
||||||
typedef ULONG PROPID;
|
|
||||||
typedef LONG SCODE;
|
|
||||||
|
|
||||||
#define S_OK ((HRESULT)0x00000000L)
|
|
||||||
#define S_FALSE ((HRESULT)0x00000001L)
|
|
||||||
#define E_NOTIMPL ((HRESULT)0x80004001L)
|
|
||||||
#define E_NOINTERFACE ((HRESULT)0x80004002L)
|
|
||||||
#define E_ABORT ((HRESULT)0x80004004L)
|
|
||||||
#define E_FAIL ((HRESULT)0x80004005L)
|
|
||||||
#define STG_E_INVALIDFUNCTION ((HRESULT)0x80030001L)
|
|
||||||
#define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
|
|
||||||
#define E_INVALIDARG ((HRESULT)0x80070057L)
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define STDMETHODCALLTYPE __stdcall
|
|
||||||
#else
|
|
||||||
#define STDMETHODCALLTYPE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define STDMETHOD_(t, f) virtual t STDMETHODCALLTYPE f
|
|
||||||
#define STDMETHOD(f) STDMETHOD_(HRESULT, f)
|
|
||||||
#define STDMETHODIMP_(type) type STDMETHODCALLTYPE
|
|
||||||
#define STDMETHODIMP STDMETHODIMP_(HRESULT)
|
|
||||||
|
|
||||||
#define PURE = 0
|
|
||||||
|
|
||||||
#define MIDL_INTERFACE(x) struct
|
|
||||||
|
|
||||||
struct IUnknown
|
|
||||||
{
|
|
||||||
//virtual ~IUnknown() {}
|
|
||||||
STDMETHOD(QueryInterface) (REFIID iid, void **outObject) PURE;
|
|
||||||
STDMETHOD_(ULONG, AddRef)() PURE;
|
|
||||||
STDMETHOD_(ULONG, Release)() PURE;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef IUnknown *LPUNKNOWN;
|
|
||||||
|
|
||||||
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
|
|
||||||
#define VARIANT_FALSE ((VARIANT_BOOL)0)
|
|
||||||
|
|
||||||
enum VARENUM
|
|
||||||
{
|
|
||||||
VT_EMPTY = 0,
|
|
||||||
VT_NULL = 1,
|
|
||||||
VT_I2 = 2,
|
|
||||||
VT_I4 = 3,
|
|
||||||
VT_R4 = 4,
|
|
||||||
VT_R8 = 5,
|
|
||||||
VT_CY = 6,
|
|
||||||
VT_DATE = 7,
|
|
||||||
VT_BSTR = 8,
|
|
||||||
VT_DISPATCH = 9,
|
|
||||||
VT_ERROR = 10,
|
|
||||||
VT_BOOL = 11,
|
|
||||||
VT_VARIANT = 12,
|
|
||||||
VT_UNKNOWN = 13,
|
|
||||||
VT_DECIMAL = 14,
|
|
||||||
VT_I1 = 16,
|
|
||||||
VT_UI1 = 17,
|
|
||||||
VT_UI2 = 18,
|
|
||||||
VT_UI4 = 19,
|
|
||||||
VT_I8 = 20,
|
|
||||||
VT_UI8 = 21,
|
|
||||||
VT_INT = 22,
|
|
||||||
VT_UINT = 23,
|
|
||||||
VT_VOID = 24,
|
|
||||||
VT_HRESULT = 25,
|
|
||||||
VT_FILETIME = 64
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef unsigned short VARTYPE;
|
|
||||||
typedef WORD PROPVAR_PAD1;
|
|
||||||
typedef WORD PROPVAR_PAD2;
|
|
||||||
typedef WORD PROPVAR_PAD3;
|
|
||||||
|
|
||||||
typedef struct tagPROPVARIANT
|
|
||||||
{
|
|
||||||
VARTYPE vt;
|
|
||||||
PROPVAR_PAD1 wReserved1;
|
|
||||||
PROPVAR_PAD2 wReserved2;
|
|
||||||
PROPVAR_PAD3 wReserved3;
|
|
||||||
union
|
|
||||||
{
|
|
||||||
CHAR cVal;
|
|
||||||
UCHAR bVal;
|
|
||||||
SHORT iVal;
|
|
||||||
USHORT uiVal;
|
|
||||||
LONG lVal;
|
|
||||||
ULONG ulVal;
|
|
||||||
INT intVal;
|
|
||||||
UINT uintVal;
|
|
||||||
LARGE_INTEGER hVal;
|
|
||||||
ULARGE_INTEGER uhVal;
|
|
||||||
VARIANT_BOOL boolVal;
|
|
||||||
SCODE scode;
|
|
||||||
FILETIME filetime;
|
|
||||||
BSTR bstrVal;
|
|
||||||
};
|
|
||||||
} PROPVARIANT;
|
|
||||||
|
|
||||||
typedef PROPVARIANT tagVARIANT;
|
|
||||||
typedef tagVARIANT VARIANT;
|
|
||||||
typedef VARIANT VARIANTARG;
|
|
||||||
|
|
||||||
MY_EXTERN_C BSTR SysAllocStringByteLen(LPCSTR psz, UINT len);
|
|
||||||
MY_EXTERN_C BSTR SysAllocString(const OLECHAR *sz);
|
|
||||||
MY_EXTERN_C void SysFreeString(BSTR bstr);
|
|
||||||
MY_EXTERN_C UINT SysStringByteLen(BSTR bstr);
|
|
||||||
MY_EXTERN_C UINT SysStringLen(BSTR bstr);
|
|
||||||
|
|
||||||
MY_EXTERN_C DWORD GetLastError();
|
|
||||||
MY_EXTERN_C HRESULT VariantClear(VARIANTARG *prop);
|
|
||||||
MY_EXTERN_C HRESULT VariantCopy(VARIANTARG *dest, VARIANTARG *src);
|
|
||||||
MY_EXTERN_C LONG CompareFileTime(const FILETIME* ft1, const FILETIME* ft2);
|
|
||||||
|
|
||||||
#define CP_ACP 0
|
|
||||||
#define CP_OEMCP 1
|
|
||||||
|
|
||||||
typedef enum tagSTREAM_SEEK
|
|
||||||
{
|
|
||||||
STREAM_SEEK_SET = 0,
|
|
||||||
STREAM_SEEK_CUR = 1,
|
|
||||||
STREAM_SEEK_END = 2
|
|
||||||
} STREAM_SEEK;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
|
@ -1,16 +0,0 @@
|
|||||||
// Common/NewHandler.h
|
|
||||||
|
|
||||||
#ifndef __COMMON_NEWHANDLER_H
|
|
||||||
#define __COMMON_NEWHANDLER_H
|
|
||||||
|
|
||||||
class CNewException {};
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
void
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
__cdecl
|
|
||||||
#endif
|
|
||||||
operator delete(void *p) throw();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,9 +0,0 @@
|
|||||||
// StdAfx.h
|
|
||||||
|
|
||||||
#ifndef __STDAFX_H
|
|
||||||
#define __STDAFX_H
|
|
||||||
|
|
||||||
// #include "MyWindows.h"
|
|
||||||
#include "NewHandler.h"
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,19 +0,0 @@
|
|||||||
// Common/Types.h
|
|
||||||
|
|
||||||
#ifndef __COMMON_TYPES_H
|
|
||||||
#define __COMMON_TYPES_H
|
|
||||||
|
|
||||||
typedef unsigned char Byte;
|
|
||||||
typedef short Int16;
|
|
||||||
typedef unsigned short UInt16;
|
|
||||||
typedef int Int32;
|
|
||||||
typedef unsigned int UInt32;
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
typedef __int64 Int64;
|
|
||||||
typedef unsigned __int64 UInt64;
|
|
||||||
#else
|
|
||||||
typedef long long int Int64;
|
|
||||||
typedef unsigned long long int UInt64;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,504 +0,0 @@
|
|||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 2.1, February 1999
|
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
[This is the first released version of the Lesser GPL. It also counts
|
|
||||||
as the successor of the GNU Library Public License, version 2, hence
|
|
||||||
the version number 2.1.]
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Lesser General Public License, applies to some
|
|
||||||
specially designated software packages--typically libraries--of the
|
|
||||||
Free Software Foundation and other authors who decide to use it. You
|
|
||||||
can use it too, but we suggest you first think carefully about whether
|
|
||||||
this license or the ordinary General Public License is the better
|
|
||||||
strategy to use in any particular case, based on the explanations below.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom of use,
|
|
||||||
not price. Our General Public Licenses are designed to make sure that
|
|
||||||
you have the freedom to distribute copies of free software (and charge
|
|
||||||
for this service if you wish); that you receive source code or can get
|
|
||||||
it if you want it; that you can change the software and use pieces of
|
|
||||||
it in new free programs; and that you are informed that you can do
|
|
||||||
these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
distributors to deny you these rights or to ask you to surrender these
|
|
||||||
rights. These restrictions translate to certain responsibilities for
|
|
||||||
you if you distribute copies of the library or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
|
||||||
you. You must make sure that they, too, receive or can get the source
|
|
||||||
code. If you link other code with the library, you must provide
|
|
||||||
complete object files to the recipients, so that they can relink them
|
|
||||||
with the library after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
We protect your rights with a two-step method: (1) we copyright the
|
|
||||||
library, and (2) we offer you this license, which gives you legal
|
|
||||||
permission to copy, distribute and/or modify the library.
|
|
||||||
|
|
||||||
To protect each distributor, we want to make it very clear that
|
|
||||||
there is no warranty for the free library. Also, if the library is
|
|
||||||
modified by someone else and passed on, the recipients should know
|
|
||||||
that what they have is not the original version, so that the original
|
|
||||||
author's reputation will not be affected by problems that might be
|
|
||||||
introduced by others.
|
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
|
||||||
any free program. We wish to make sure that a company cannot
|
|
||||||
effectively restrict the users of a free program by obtaining a
|
|
||||||
restrictive license from a patent holder. Therefore, we insist that
|
|
||||||
any patent license obtained for a version of the library must be
|
|
||||||
consistent with the full freedom of use specified in this license.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the
|
|
||||||
ordinary GNU General Public License. This license, the GNU Lesser
|
|
||||||
General Public License, applies to certain designated libraries, and
|
|
||||||
is quite different from the ordinary General Public License. We use
|
|
||||||
this license for certain libraries in order to permit linking those
|
|
||||||
libraries into non-free programs.
|
|
||||||
|
|
||||||
When a program is linked with a library, whether statically or using
|
|
||||||
a shared library, the combination of the two is legally speaking a
|
|
||||||
combined work, a derivative of the original library. The ordinary
|
|
||||||
General Public License therefore permits such linking only if the
|
|
||||||
entire combination fits its criteria of freedom. The Lesser General
|
|
||||||
Public License permits more lax criteria for linking other code with
|
|
||||||
the library.
|
|
||||||
|
|
||||||
We call this license the "Lesser" General Public License because it
|
|
||||||
does Less to protect the user's freedom than the ordinary General
|
|
||||||
Public License. It also provides other free software developers Less
|
|
||||||
of an advantage over competing non-free programs. These disadvantages
|
|
||||||
are the reason we use the ordinary General Public License for many
|
|
||||||
libraries. However, the Lesser license provides advantages in certain
|
|
||||||
special circumstances.
|
|
||||||
|
|
||||||
For example, on rare occasions, there may be a special need to
|
|
||||||
encourage the widest possible use of a certain library, so that it becomes
|
|
||||||
a de-facto standard. To achieve this, non-free programs must be
|
|
||||||
allowed to use the library. A more frequent case is that a free
|
|
||||||
library does the same job as widely used non-free libraries. In this
|
|
||||||
case, there is little to gain by limiting the free library to free
|
|
||||||
software only, so we use the Lesser General Public License.
|
|
||||||
|
|
||||||
In other cases, permission to use a particular library in non-free
|
|
||||||
programs enables a greater number of people to use a large body of
|
|
||||||
free software. For example, permission to use the GNU C Library in
|
|
||||||
non-free programs enables many more people to use the whole GNU
|
|
||||||
operating system, as well as its variant, the GNU/Linux operating
|
|
||||||
system.
|
|
||||||
|
|
||||||
Although the Lesser General Public License is Less protective of the
|
|
||||||
users' freedom, it does ensure that the user of a program that is
|
|
||||||
linked with the Library has the freedom and the wherewithal to run
|
|
||||||
that program using a modified version of the Library.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, whereas the latter must
|
|
||||||
be combined with the library in order to run.
|
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
|
||||||
program which contains a notice placed by the copyright holder or
|
|
||||||
other authorized party saying it may be distributed under the terms of
|
|
||||||
this Lesser General Public License (also called "this License").
|
|
||||||
Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, complete source code means
|
|
||||||
all the source code for all modules it contains, plus any associated
|
|
||||||
interface definition files, plus the scripts used to control compilation
|
|
||||||
and installation of the library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete source code as you receive it, in any medium, provided that
|
|
||||||
you conspicuously and appropriately publish on each copy an
|
|
||||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
|
||||||
all the notices that refer to this License and to the absence of any
|
|
||||||
warranty; and distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy,
|
|
||||||
and you may at your option offer warranty protection in exchange for a
|
|
||||||
fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Library, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote
|
|
||||||
it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you accompany
|
|
||||||
it with the complete corresponding machine-readable source code, which
|
|
||||||
must be distributed under the terms of Sections 1 and 2 above on a
|
|
||||||
medium customarily used for software interchange.
|
|
||||||
|
|
||||||
If distribution of object code is made by offering access to copy
|
|
||||||
from a designated place, then offering equivalent access to copy the
|
|
||||||
source code from the same place satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (1) uses at run time a
|
|
||||||
copy of the library already present on the user's computer system,
|
|
||||||
rather than copying library functions into the executable, and (2)
|
|
||||||
will operate properly with a modified version of the library, if
|
|
||||||
the user installs one, as long as the modified version is
|
|
||||||
interface-compatible with the version that the work was made with.
|
|
||||||
|
|
||||||
c) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
d) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
e) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. However, as a special exception,
|
|
||||||
the materials to be distributed need not include anything that is
|
|
||||||
normally distributed (in either source or binary form) with the major
|
|
||||||
components (compiler, kernel, and so on) of the operating system on
|
|
||||||
which the executable runs, unless that component itself accompanies
|
|
||||||
the executable.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library is void, and will automatically terminate your
|
|
||||||
rights under this License. However, parties who have received copies,
|
|
||||||
or rights, from you under this License will not have their licenses
|
|
||||||
terminated so long as such parties remain in full compliance.
|
|
||||||
|
|
||||||
9. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
subject to these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties with
|
|
||||||
this License.
|
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Library.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under any
|
|
||||||
particular circumstance, the balance of the section is intended to apply,
|
|
||||||
and the section as a whole is intended to apply in other circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library under this License may add
|
|
||||||
an explicit geographical distribution limitation excluding those countries,
|
|
||||||
so that distribution is permitted only in or among countries not thus
|
|
||||||
excluded. In such case, this License incorporates the limitation as if
|
|
||||||
written in the body of this License.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Lesser General Public License from time to time.
|
|
||||||
Such new versions will be similar in spirit to the present version,
|
|
||||||
but may differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Library
|
|
||||||
specifies a version number of this License which applies to it and
|
|
||||||
"any later version", you have the option of following the terms and
|
|
||||||
conditions either of that version or of any later version published by
|
|
||||||
the Free Software Foundation. If the Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
write to the author to ask for permission. For software which is
|
|
||||||
copyrighted by the Free Software Foundation, write to the Free
|
|
||||||
Software Foundation; we sometimes make exceptions for this. Our
|
|
||||||
decision will be guided by the two goals of preserving the free status
|
|
||||||
of all derivatives of our free software and of promoting the sharing
|
|
||||||
and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
|
||||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
|
||||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
|
||||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
|
||||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
|
||||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
|
||||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
|
||||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
|
||||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
|
||||||
possible use to the public, we recommend making it free software that
|
|
||||||
everyone can redistribute and change. You can do so by permitting
|
|
||||||
redistribution under these terms (or, alternatively, under the terms of the
|
|
||||||
ordinary General Public License).
|
|
||||||
|
|
||||||
To apply these terms, attach the following notices to the library. It is
|
|
||||||
safest to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the library's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1990
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
||||||
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
The contents of this directory are extracted from
|
|
||||||
the official LZMA SDK, version lzma442.tar.bz2 ,
|
|
||||||
for the use in mkcromfs.
|
|
@ -1,62 +0,0 @@
|
|||||||
##
|
|
||||||
## This file is part of the coreboot project.
|
|
||||||
##
|
|
||||||
## Copyright (C) 2007 coresystems GmbH
|
|
||||||
##
|
|
||||||
## This program is free software; you can redistribute it and/or modify
|
|
||||||
## it under the terms of the GNU General Public License as published by
|
|
||||||
## the Free Software Foundation; either version 2 of the License, or
|
|
||||||
## (at your option) any later version.
|
|
||||||
##
|
|
||||||
## This program is distributed in the hope that it will be useful,
|
|
||||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
## GNU General Public License for more details.
|
|
||||||
##
|
|
||||||
## You should have received a copy of the GNU General Public License
|
|
||||||
## along with this program; if not, write to the Free Software
|
|
||||||
## Foundation, Inc.
|
|
||||||
##
|
|
||||||
|
|
||||||
LZMA_OBJ := $(obj)/util/lzma/LZMAEncoder.o $(obj)/util/lzma/LZInWindow.o
|
|
||||||
LZMA_OBJ += $(obj)/util/lzma/RangeCoderBit.o $(obj)/util/lzma/StreamUtils.o
|
|
||||||
LZMA_OBJ += $(obj)/util/lzma/OutBuffer.o $(obj)/util/lzma/Alloc.o
|
|
||||||
LZMA_OBJ += $(obj)/util/lzma/CRC.o
|
|
||||||
|
|
||||||
$(obj)/util/lzma/lzma: $(obj)/util/lzma/ $(LZMA_OBJ) $(obj)/util/lzma/minilzma.o
|
|
||||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $(LZMA_OBJ) $(obj)/util/lzma/minilzma.o
|
|
||||||
|
|
||||||
$(obj)/util/lzma/lzma-compress.o: $(src)/util/lzma/minilzma.cc
|
|
||||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c -DCOMPACT $<
|
|
||||||
|
|
||||||
$(obj)/util/lzma/:
|
|
||||||
$(Q)printf " BUILD LZMA\n"
|
|
||||||
$(Q)mkdir -p $(obj)/util/lzma/
|
|
||||||
|
|
||||||
$(obj)/util/lzma/%.o: $(src)/util/lzma/C/7zip/Compress/LZMA/%.cpp
|
|
||||||
$(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
|
|
||||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
$(obj)/util/lzma/%.o: $(src)/util/lzma/C/7zip/Compress/LZ/%.cpp
|
|
||||||
$(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
|
|
||||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
$(obj)/util/lzma/%.o: $(src)/util/lzma/C/7zip/Compress/RangeCoder/%.cpp
|
|
||||||
$(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
|
|
||||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
$(obj)/util/lzma/%.o: $(src)/util/lzma/C/7zip/Decompress/%.cpp
|
|
||||||
$(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
|
|
||||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
$(obj)/util/lzma/%.o: $(src)/util/lzma/C/7zip/Common/%.cpp
|
|
||||||
$(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
|
|
||||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
$(obj)/util/lzma/%.o: $(src)/util/lzma/C/Common/%.cpp
|
|
||||||
$(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
|
|
||||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
$(obj)/util/lzma/%.o: $(src)/util/lzma/%.cc
|
|
||||||
$(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
|
|
||||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
|
|
@ -1,317 +0,0 @@
|
|||||||
/*
|
|
||||||
* minimal lzma implementation
|
|
||||||
*
|
|
||||||
* Copyright (C) 2002 Eric Biederman
|
|
||||||
* Copyright (C) 2005 Joel Yliluoma
|
|
||||||
* Copyright (C) 2007 coresystems GmbH
|
|
||||||
* (Adapted by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH)
|
|
||||||
* Copyright (C) 2007 Patrick Georgi <patrick@georgi-clan.de>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "C/Common/MyInitGuid.h"
|
|
||||||
#include "C/7zip/Compress/LZMA/LZMAEncoder.h"
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <cstring>
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cctype>
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <algorithm>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
const std::vector<unsigned char> LZMACompress
|
|
||||||
(const std::vector<unsigned char>& buf);
|
|
||||||
|
|
||||||
const std::vector<unsigned char> LZMADeCompress
|
|
||||||
(const std::vector<unsigned char>& buf);
|
|
||||||
|
|
||||||
static inline uint16_t R16(const void* p)
|
|
||||||
{
|
|
||||||
const unsigned char* data = (const unsigned char*)p;
|
|
||||||
return (data[0] << 0) | (data[1] << 8);
|
|
||||||
}
|
|
||||||
static inline uint32_t R32(const void* p)
|
|
||||||
{
|
|
||||||
const unsigned char* data = (const unsigned char*)p;
|
|
||||||
return R16(data) | (R16(data+2) << 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define L (uint64_t)
|
|
||||||
|
|
||||||
static inline uint64_t R64(const void* p)
|
|
||||||
{
|
|
||||||
const unsigned char* data = (const unsigned char*)p;
|
|
||||||
return (L R32(data)) | ((L R32(data+4)) << 32);
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef L
|
|
||||||
|
|
||||||
static UInt32 SelectDictionarySizeFor(unsigned datasize)
|
|
||||||
{
|
|
||||||
#if 1
|
|
||||||
return datasize;
|
|
||||||
#else
|
|
||||||
#ifdef __GNUC__
|
|
||||||
/* gnu c can optimize this switch statement into a fast binary
|
|
||||||
* search, but it cannot do so for the list of the if statements.
|
|
||||||
*/
|
|
||||||
switch(datasize)
|
|
||||||
{
|
|
||||||
case 0 ... 512 : return 512;
|
|
||||||
case 513 ... 1024: return 2048;
|
|
||||||
case 1025 ... 4096: return 8192;
|
|
||||||
case 4097 ... 16384: return 32768;
|
|
||||||
case 16385 ... 65536: return 528288;
|
|
||||||
case 65537 ... 528288: return 1048576*4;
|
|
||||||
case 528289 ... 786432: return 1048576*16;
|
|
||||||
default: return 1048576*32;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if(datasize <= 512) return 512;
|
|
||||||
if(datasize <= 1024) return 1024;
|
|
||||||
if(datasize <= 4096) return 4096;
|
|
||||||
if(datasize <= 16384) return 32768;
|
|
||||||
if(datasize <= 65536) return 528288;
|
|
||||||
if(datasize <= 528288) return 1048576*4;
|
|
||||||
if(datasize <= 786432) reutrn 1048576*16;
|
|
||||||
return 32*1048576;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class CInStreamRam: public ISequentialInStream, public CMyUnknownImp
|
|
||||||
{
|
|
||||||
const std::vector<unsigned char>& input;
|
|
||||||
size_t Pos;
|
|
||||||
public:
|
|
||||||
MY_UNKNOWN_IMP
|
|
||||||
|
|
||||||
CInStreamRam(const std::vector<unsigned char>& buf) : input(buf), Pos(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
virtual ~CInStreamRam() {}
|
|
||||||
|
|
||||||
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
|
|
||||||
};
|
|
||||||
|
|
||||||
STDMETHODIMP CInStreamRam::Read(void *data, UInt32 size, UInt32 *processedSize)
|
|
||||||
{
|
|
||||||
UInt32 remain = input.size() - Pos;
|
|
||||||
if (size > remain) size = remain;
|
|
||||||
|
|
||||||
std::memcpy(data, &input[Pos], size);
|
|
||||||
Pos += size;
|
|
||||||
|
|
||||||
if(processedSize != NULL) *processedSize = size;
|
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
class COutStreamRam: public ISequentialOutStream, public CMyUnknownImp
|
|
||||||
{
|
|
||||||
std::vector<Byte> result;
|
|
||||||
size_t Pos;
|
|
||||||
public:
|
|
||||||
MY_UNKNOWN_IMP
|
|
||||||
|
|
||||||
COutStreamRam(): result(), Pos(0) { }
|
|
||||||
virtual ~COutStreamRam() { }
|
|
||||||
|
|
||||||
void Reserve(unsigned n) { result.reserve(n); }
|
|
||||||
const std::vector<Byte>& Get() const { return result; }
|
|
||||||
|
|
||||||
HRESULT WriteByte(Byte b)
|
|
||||||
{
|
|
||||||
if(Pos >= result.size()) result.resize(Pos+1);
|
|
||||||
result[Pos++] = b;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
|
|
||||||
};
|
|
||||||
|
|
||||||
STDMETHODIMP COutStreamRam::Write(const void *data, UInt32 size, UInt32 *processedSize)
|
|
||||||
{
|
|
||||||
if(Pos+size > result.size()) result.resize(Pos+size);
|
|
||||||
|
|
||||||
std::memcpy(&result[Pos], data, size);
|
|
||||||
if(processedSize != NULL) *processedSize = size;
|
|
||||||
Pos += size;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<unsigned char> LZMACompress(const std::vector<unsigned char>& buf)
|
|
||||||
{
|
|
||||||
if(buf.empty()) return buf;
|
|
||||||
|
|
||||||
const UInt32 dictionarysize = SelectDictionarySizeFor(buf.size());
|
|
||||||
|
|
||||||
NCompress::NLZMA::CEncoder *encoderSpec = new NCompress::NLZMA::CEncoder;
|
|
||||||
CMyComPtr<ICompressCoder> encoder = encoderSpec;
|
|
||||||
const PROPID propIDs[] =
|
|
||||||
{
|
|
||||||
NCoderPropID::kAlgorithm,
|
|
||||||
NCoderPropID::kDictionarySize,
|
|
||||||
NCoderPropID::kNumFastBytes,
|
|
||||||
};
|
|
||||||
const unsigned kNumProps = sizeof(propIDs) / sizeof(propIDs[0]);
|
|
||||||
PROPVARIANT properties[kNumProps];
|
|
||||||
properties[0].vt = VT_UI4; properties[0].ulVal = (UInt32)2;
|
|
||||||
properties[1].vt = VT_UI4; properties[1].ulVal = (UInt32)dictionarysize;
|
|
||||||
properties[2].vt = VT_UI4; properties[2].ulVal = (UInt32)64;
|
|
||||||
|
|
||||||
if (encoderSpec->SetCoderProperties(propIDs, properties, kNumProps) != S_OK)
|
|
||||||
{
|
|
||||||
Error:
|
|
||||||
return std::vector<unsigned char> ();
|
|
||||||
}
|
|
||||||
|
|
||||||
COutStreamRam *const outStreamSpec = new COutStreamRam;
|
|
||||||
CMyComPtr<ISequentialOutStream> outStream = outStreamSpec;
|
|
||||||
CInStreamRam *const inStreamSpec = new CInStreamRam(buf);
|
|
||||||
CMyComPtr<ISequentialInStream> inStream = inStreamSpec;
|
|
||||||
|
|
||||||
outStreamSpec->Reserve(buf.size());
|
|
||||||
|
|
||||||
if (encoderSpec->WriteCoderProperties(outStream) != S_OK) goto Error;
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
UInt64 t = (UInt64)buf.size();
|
|
||||||
outStreamSpec->WriteByte((Byte)((t) >> (8 * i)));
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT lzmaResult = encoder->Code(inStream, outStream, 0, 0, 0);
|
|
||||||
if (lzmaResult != S_OK) goto Error;
|
|
||||||
|
|
||||||
return outStreamSpec->Get();
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef RC_NORMALIZE
|
|
||||||
|
|
||||||
#include "C/7zip/Decompress/LzmaDecode.h"
|
|
||||||
#include "C/7zip/Decompress/LzmaDecode.c"
|
|
||||||
|
|
||||||
const std::vector<unsigned char> LZMADeCompress
|
|
||||||
(const std::vector<unsigned char>& buf)
|
|
||||||
{
|
|
||||||
if(buf.size() <= 5+8) return std::vector<unsigned char> ();
|
|
||||||
|
|
||||||
uint_least64_t out_sizemax = R64(&buf[5]);
|
|
||||||
|
|
||||||
std::vector<unsigned char> result(out_sizemax);
|
|
||||||
|
|
||||||
CLzmaDecoderState state;
|
|
||||||
LzmaDecodeProperties(&state.Properties, &buf[0], LZMA_PROPERTIES_SIZE);
|
|
||||||
state.Probs = new CProb[LzmaGetNumProbs(&state.Properties)];
|
|
||||||
|
|
||||||
SizeT in_done;
|
|
||||||
SizeT out_done;
|
|
||||||
LzmaDecode(&state, &buf[13], buf.size()-13, &in_done,
|
|
||||||
&result[0], result.size(), &out_done);
|
|
||||||
|
|
||||||
delete[] state.Probs;
|
|
||||||
|
|
||||||
result.resize(out_done);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef COMPACT
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
char *s;
|
|
||||||
FILE *f, *infile, *outfile;
|
|
||||||
int c;
|
|
||||||
|
|
||||||
if (argc != 4) {
|
|
||||||
std::fprintf(stderr, "'lzma e file1 file2' encodes file1 into file2.\n"
|
|
||||||
"'lzma d file2 file1' decodes file2 into file1.\n");
|
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
if (argc == 4) {
|
|
||||||
if ((s = argv[1], s[1] || strpbrk(s, "DEde") == NULL)
|
|
||||||
|| (s = argv[2], (infile = fopen(s, "rb")) == NULL)
|
|
||||||
|| (s = argv[3], (outfile = fopen(s, "wb")) == NULL)) {
|
|
||||||
std::fprintf(stderr, "??? %s\n", s);
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct stat fs;
|
|
||||||
int si;
|
|
||||||
if (fstat(fileno(infile), &fs)) {
|
|
||||||
std::perror(strerror(errno));
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
si=fs.st_size;
|
|
||||||
|
|
||||||
char *Buf=(char *)malloc(si);
|
|
||||||
fread(Buf,si, 1, infile);
|
|
||||||
|
|
||||||
std::vector<unsigned char> result;
|
|
||||||
if (toupper(*argv[1]) == 'E')
|
|
||||||
result = LZMACompress(std::vector<unsigned char>(Buf,Buf+si));
|
|
||||||
else
|
|
||||||
result = LZMADeCompress(std::vector<unsigned char>(Buf,Buf+si));
|
|
||||||
|
|
||||||
fwrite(&result[0], result.size(), 1, outfile);
|
|
||||||
fclose(infile);
|
|
||||||
fclose(outfile);
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Compress a buffer with lzma
|
|
||||||
* Don't copy the result back if it is too large.
|
|
||||||
* @param in a pointer to the buffer
|
|
||||||
* @param in_len the length in bytes
|
|
||||||
* @param out a pointer to a buffer of at least size in_len
|
|
||||||
* @param out_len a pointer to the compressed length of in
|
|
||||||
*/
|
|
||||||
|
|
||||||
void do_lzma_compress(char *in, int in_len, char *out, int *out_len) {
|
|
||||||
std::vector<unsigned char> result;
|
|
||||||
result = LZMACompress(std::vector<unsigned char>(in, in + in_len));
|
|
||||||
*out_len = result.size();
|
|
||||||
if (*out_len < in_len)
|
|
||||||
std::memcpy(out, &result[0], *out_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
void do_lzma_uncompress(char *dst, int dst_len, char *src, int src_len) {
|
|
||||||
std::vector<unsigned char> result;
|
|
||||||
result = LZMADeCompress(std::vector<unsigned char>(src, src + src_len));
|
|
||||||
if (result.size() <= dst_len)
|
|
||||||
std::memcpy(dst, &result[0], result.size());
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Not copying %d bytes to %d-byte buffer!\n",
|
|
||||||
result.size(), dst_len);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the bayou project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <getopt.h>
|
|
||||||
#include "pbuilder.h"
|
|
||||||
|
|
||||||
static void usage(void)
|
|
||||||
{
|
|
||||||
printf("./pbuilder [-c config] [create|show] [LAR]\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
char *config = NULL;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
signed ch = getopt(argc, argv, "c:");
|
|
||||||
if (ch == -1)
|
|
||||||
break;
|
|
||||||
|
|
||||||
switch (ch) {
|
|
||||||
case 'c':
|
|
||||||
config = optarg;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
usage();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (optind >= argc) {
|
|
||||||
usage();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcmp(argv[optind], "create")) {
|
|
||||||
if (config == NULL) {
|
|
||||||
warn("E: No config was provided\n");
|
|
||||||
usage();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (optind + 1 >= argc) {
|
|
||||||
warn("E: No LAR name was given\n");
|
|
||||||
usage();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
create_lar_from_config((const char *)config,
|
|
||||||
(const char *)argv[optind + 1]);
|
|
||||||
} else if (!strcmp(argv[optind], "show")) {
|
|
||||||
if (optind + 1 >= argc) {
|
|
||||||
warn("E: No LAR name was given\n");
|
|
||||||
usage();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
pbuilder_show_lar((const char *)argv[optind + 1]);
|
|
||||||
} else {
|
|
||||||
usage();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user