Compare commits
1458 Commits
vUDK2018
...
edk2-stabl
Author | SHA1 | Date | |
---|---|---|---|
|
cb5f4f45ce | ||
|
22ec06c8aa | ||
|
fda6abd64f | ||
|
87f9867f55 | ||
|
4fcb0d5458 | ||
|
04c7f9023f | ||
|
df49a85dbc | ||
|
667abfaf8a | ||
|
1aa9314e3a | ||
|
d3049066ca | ||
|
dc65dd5be6 | ||
|
45e076b7a7 | ||
|
10ea1b6853 | ||
|
b3e1e343fe | ||
|
3781f14c31 | ||
|
9e6c4f1527 | ||
|
6ec4d300fe | ||
|
27e42bf61b | ||
|
cefc8d8821 | ||
|
5ac4548cdf | ||
|
e5cbb98256 | ||
|
40d1adb3eb | ||
|
b6e48ec641 | ||
|
91a5b13650 | ||
|
d3bc33731f | ||
|
29890da47d | ||
|
18219ab369 | ||
|
5b292858ba | ||
|
cd3a42640a | ||
|
81038d50c9 | ||
|
c1f032cd3a | ||
|
526dd0245b | ||
|
dd4cae4d82 | ||
|
1d802e234e | ||
|
83964ebc5e | ||
|
7191827f90 | ||
|
df4c129833 | ||
|
6fb8b96d9b | ||
|
4d0f2dce76 | ||
|
0334068343 | ||
|
d7fb5a4632 | ||
|
a6d73269b1 | ||
|
559b5d5283 | ||
|
a4c35479b7 | ||
|
0760f5fe96 | ||
|
f1a921cab2 | ||
|
ebfac291bd | ||
|
b1be077fa4 | ||
|
ee48361cf0 | ||
|
5fc5867e11 | ||
|
4e61b8d06b | ||
|
c6c18d879e | ||
|
4da45e2027 | ||
|
954175e513 | ||
|
1bbb512664 | ||
|
e8619f82ce | ||
|
262b7a311c | ||
|
b0bacc003a | ||
|
403d4bcdec | ||
|
cec7b8fb86 | ||
|
de652b14a7 | ||
|
e49eee4c51 | ||
|
d6f079b600 | ||
|
ff307fba98 | ||
|
f33d5d68ab | ||
|
4619b183f7 | ||
|
2779c222c8 | ||
|
6ed4651cb5 | ||
|
e4005ecb0b | ||
|
8b63877aca | ||
|
3a0c1bf64b | ||
|
26067e30c4 | ||
|
68bef3f0c7 | ||
|
76c09700ed | ||
|
d65b78f101 | ||
|
52437cb763 | ||
|
ac053f6124 | ||
|
69feaa37ae | ||
|
fc0494a654 | ||
|
7343bc8062 | ||
|
e6f958d15d | ||
|
ed8746801e | ||
|
6d9a0a9420 | ||
|
264914a512 | ||
|
39f0156fce | ||
|
3b46dd93dd | ||
|
1bf23e6b7f | ||
|
69e259e5e9 | ||
|
8d7aef3d1e | ||
|
fb57c30b70 | ||
|
8b03c82d36 | ||
|
16299ec84a | ||
|
e70d9b8c3c | ||
|
23d0833417 | ||
|
4436f72220 | ||
|
83e1007838 | ||
|
1010873bec | ||
|
f50db933c5 | ||
|
8d1b281af3 | ||
|
eea668c91a | ||
|
a88c10ab5e | ||
|
11cf25f030 | ||
|
5f66615bb5 | ||
|
ad3af92039 | ||
|
76f368c9fd | ||
|
cef7ecf6cd | ||
|
f413763b6b | ||
|
07eba7069d | ||
|
b5bd3ed648 | ||
|
4a723ed258 | ||
|
8a2e1a9d54 | ||
|
6809627276 | ||
|
b2305dd277 | ||
|
ac6613db46 | ||
|
233ffa90cc | ||
|
cf4e79e466 | ||
|
2da3e96cb7 | ||
|
2a5997f899 | ||
|
98d20e44dc | ||
|
d9c5beb159 | ||
|
05aba7e37b | ||
|
a1583a877b | ||
|
304a27e08f | ||
|
ef529e6ab7 | ||
|
5df16ecb7f | ||
|
0f78fd7349 | ||
|
49a4797e9c | ||
|
0ed73bcdcd | ||
|
5b73e17fb1 | ||
|
bfa7eeb61d | ||
|
005c855dc6 | ||
|
549ae85ce1 | ||
|
1794b98f72 | ||
|
10944bc390 | ||
|
d9c640b928 | ||
|
95dd7a6ecd | ||
|
81e1276adf | ||
|
d4d9116775 | ||
|
5410502f6d | ||
|
a10def9165 | ||
|
d9e206d4bf | ||
|
5da2c9b27a | ||
|
831bb137a8 | ||
|
2aa4fb10a5 | ||
|
da417eb8ed | ||
|
275d4bd439 | ||
|
184558d072 | ||
|
6b46d77243 | ||
|
0f4db639bb | ||
|
70a51d7187 | ||
|
2c868eef73 | ||
|
880086a2b5 | ||
|
e85162acb9 | ||
|
2cde4bbadc | ||
|
b72f487372 | ||
|
9b7242f5de | ||
|
a234383c5b | ||
|
e52838d358 | ||
|
a3fffb4f5e | ||
|
58942277bc | ||
|
f63a3e2867 | ||
|
2a08913443 | ||
|
6936ee0342 | ||
|
d900d7c985 | ||
|
60ee3bd8db | ||
|
4c6d0de7ba | ||
|
2add3cffb0 | ||
|
1100bc5aa0 | ||
|
ac10741648 | ||
|
3d87290487 | ||
|
64429fbd61 | ||
|
b6f6b636b0 | ||
|
e52b39ab8e | ||
|
f3fc5b47ad | ||
|
72a836c00a | ||
|
9f3594782d | ||
|
0ff3b52e06 | ||
|
7de0083812 | ||
|
89a69d4b64 | ||
|
8f3f5794b4 | ||
|
bfa65b61dd | ||
|
15e2022825 | ||
|
543f5ac30f | ||
|
e550f259a9 | ||
|
ae08ea246f | ||
|
77b702bfa4 | ||
|
280f49b811 | ||
|
0c6f94dae5 | ||
|
045bb32364 | ||
|
1c6dd45b9b | ||
|
79b10d4ce4 | ||
|
0a563f3fec | ||
|
c563077a38 | ||
|
895b87e380 | ||
|
c6a14de3ef | ||
|
ecbaa856da | ||
|
99fd30431d | ||
|
70bd2a85e9 | ||
|
a891bd7337 | ||
|
e4e314b1b6 | ||
|
54ae532cd4 | ||
|
9edba51f93 | ||
|
d7634dc0c5 | ||
|
18ef4e713f | ||
|
f7496d7173 | ||
|
39456d00f3 | ||
|
9fb2cbdac4 | ||
|
75b7aa9528 | ||
|
3b3d016b7b | ||
|
966363d5a3 | ||
|
9090c8b533 | ||
|
4d76bbcce6 | ||
|
4adf7074eb | ||
|
9917def329 | ||
|
f88290964f | ||
|
dd3907f221 | ||
|
5895956dd9 | ||
|
cd69c87383 | ||
|
5f46352300 | ||
|
9c227e07dd | ||
|
c0bf47682d | ||
|
93f5a54ff3 | ||
|
51fe5b5140 | ||
|
2a9e1b97c9 | ||
|
aa4240edff | ||
|
e9f4a2a934 | ||
|
fdd3e77a42 | ||
|
09808bd39b | ||
|
e25a76785e | ||
|
d374f2cdf9 | ||
|
f6b0258d25 | ||
|
0cb86979b2 | ||
|
56ca900782 | ||
|
659e7817e3 | ||
|
fbfd4a9ae0 | ||
|
4cecd19a44 | ||
|
dbf9cc87cb | ||
|
8a140ad955 | ||
|
b78c4934f6 | ||
|
8f465372a8 | ||
|
64bbf1dee2 | ||
|
cb9ee5a141 | ||
|
ad52023600 | ||
|
bef1933e72 | ||
|
3ea9a5c763 | ||
|
579ac2064b | ||
|
e9421e0ae4 | ||
|
d3971e1742 | ||
|
07c33e4ec9 | ||
|
8a219767e0 | ||
|
b420d98502 | ||
|
7c12d613ba | ||
|
395f333686 | ||
|
cd7bd491f3 | ||
|
1e2bf55e09 | ||
|
27e9839185 | ||
|
981b7edc0e | ||
|
ecd0f8b12f | ||
|
728f8950d6 | ||
|
3408526e86 | ||
|
a5f525fc48 | ||
|
7367cc6c24 | ||
|
77695f4da3 | ||
|
ba0014b9f8 | ||
|
24bfed691d | ||
|
b3548d32dd | ||
|
5a702acd3d | ||
|
f75a7f568e | ||
|
9095d37b8f | ||
|
d1102dba72 | ||
|
ca79bab7af | ||
|
cae524cdad | ||
|
e37bb20c7b | ||
|
1c2f052de2 | ||
|
0a6f48249a | ||
|
e38f26a2f7 | ||
|
2c0dfe63fc | ||
|
630f67ddfe | ||
|
2b5c643ae8 | ||
|
975478f6bb | ||
|
3c920616bb | ||
|
86379ac48b | ||
|
0d1f5b2b5d | ||
|
2617a73c36 | ||
|
ccaa7754a2 | ||
|
df29fd130a | ||
|
aaa4c651bf | ||
|
92beb1e4c7 | ||
|
27c4ceb41c | ||
|
890d8ede68 | ||
|
87d2afd07c | ||
|
72443dd250 | ||
|
5b0671c1e5 | ||
|
00eb12a2c7 | ||
|
72750e3bf9 | ||
|
acebdf14c9 | ||
|
631976706d | ||
|
714eedc5b9 | ||
|
d1fbfd7cd3 | ||
|
e57350403e | ||
|
e1dea56be3 | ||
|
67e9ab84ef | ||
|
f45dd2dd4f | ||
|
6b4d58a10c | ||
|
a08cbb95d6 | ||
|
2c5b667e64 | ||
|
137fb13deb | ||
|
56f7741e27 | ||
|
4e8ee0a08e | ||
|
14923c1a6b | ||
|
363c3fe253 | ||
|
e0fb2d3e5d | ||
|
f15cb995bb | ||
|
796ef9da06 | ||
|
73ca09d2f1 | ||
|
b8b6943393 | ||
|
508acb5f6c | ||
|
cc0d998b8b | ||
|
2aedaaef8a | ||
|
3b03b5e990 | ||
|
889cf68c3c | ||
|
09ef8e9258 | ||
|
58cf30f71f | ||
|
c91fb6b4fc | ||
|
8e586296c1 | ||
|
6e275c613e | ||
|
713aea3486 | ||
|
c2d6e2bc12 | ||
|
2e1083038d | ||
|
24fee0528c | ||
|
1e0db7b119 | ||
|
855abe0204 | ||
|
d106cf71ea | ||
|
2a1408d1d7 | ||
|
bf252e29a5 | ||
|
aeb6f57625 | ||
|
25517f7ce3 | ||
|
4e738cd408 | ||
|
73ae70db0f | ||
|
87a4624472 | ||
|
02ec23abeb | ||
|
1f739a851c | ||
|
6d56ace57b | ||
|
a50aa9dd88 | ||
|
e4bc73d727 | ||
|
11d0cd23dd | ||
|
dde2dd64f0 | ||
|
cae8231612 | ||
|
1342bd4486 | ||
|
e077a93dc6 | ||
|
488aab257f | ||
|
112c6c2237 | ||
|
0c805f4f8f | ||
|
d0f946f30d | ||
|
8e96580999 | ||
|
b2e043b689 | ||
|
1d79b72ee6 | ||
|
c64688f36a | ||
|
04cb578d33 | ||
|
1d25ff51af | ||
|
2c123c14cd | ||
|
e03a460f06 | ||
|
b1aff264bf | ||
|
cbba5ca104 | ||
|
c30084fbac | ||
|
0f4387e5c8 | ||
|
47dad47583 | ||
|
caf744956d | ||
|
c14b58614f | ||
|
46e4b3940e | ||
|
5a56c04939 | ||
|
d25cf17cea | ||
|
37d533da76 | ||
|
c25d390552 | ||
|
051bf6e0af | ||
|
2e3daaf688 | ||
|
3d7c6cfbab | ||
|
0b37c75e69 | ||
|
4134f2bddc | ||
|
5163d89398 | ||
|
a683ceca80 | ||
|
9dca2105ad | ||
|
271d8cd7df | ||
|
f75c747828 | ||
|
a6eaba4d7f | ||
|
64285f1526 | ||
|
a05a8a5aa1 | ||
|
eb59431346 | ||
|
5747610657 | ||
|
f3100a1a2f | ||
|
06766c0e19 | ||
|
f87a1e4158 | ||
|
8d3c4b552f | ||
|
d78675d195 | ||
|
3f02180031 | ||
|
d69e8a7b79 | ||
|
236601136f | ||
|
ec51c05936 | ||
|
ccbd8d84a6 | ||
|
6d614649ab | ||
|
13688930ae | ||
|
b20085454e | ||
|
ec50f7535b | ||
|
cb004eb0ad | ||
|
179c2f97f9 | ||
|
238d9b5c64 | ||
|
8653ea2088 | ||
|
91c31ff04a | ||
|
1b6e7633ca | ||
|
7e074d15e7 | ||
|
76022b02e8 | ||
|
fe507283af | ||
|
31f70606c6 | ||
|
6c2d935d1d | ||
|
6c252691c3 | ||
|
f6406f94dc | ||
|
0b6457efab | ||
|
38c977c148 | ||
|
c4061d18ef | ||
|
65e984cd8a | ||
|
d79d7b5860 | ||
|
a40e0b7aa9 | ||
|
97399f2d6f | ||
|
0a0566d5ed | ||
|
2d0c6692ee | ||
|
d272449d9e | ||
|
6c7ac681f4 | ||
|
99758ffd11 | ||
|
5274d681fe | ||
|
20eb921bfd | ||
|
9d0447ac5b | ||
|
550de36633 | ||
|
72b0a9bed9 | ||
|
825d138f83 | ||
|
d923365417 | ||
|
2b5f0daa6c | ||
|
60cb4d1b04 | ||
|
36dd3c781e | ||
|
5a57246eab | ||
|
ba94c38f08 | ||
|
c9734786da | ||
|
20274d2389 | ||
|
e95a0dfb46 | ||
|
efa88d51da | ||
|
03ac238b1f | ||
|
7dc7c7435e | ||
|
5685a243b6 | ||
|
3815101ff8 | ||
|
65cefddcde | ||
|
e9b2cf7bf0 | ||
|
02b9a8343f | ||
|
6a744d40d0 | ||
|
392a31467f | ||
|
4b8552d794 | ||
|
bc623a1125 | ||
|
cbf00651ed | ||
|
77ca824c65 | ||
|
1d4f84f9f4 | ||
|
180ac200da | ||
|
cb96e7d4f7 | ||
|
d2aafe1e41 | ||
|
8d65d3b25e | ||
|
b9777bb42e | ||
|
909ac65af1 | ||
|
fe280ecbee | ||
|
75135cc698 | ||
|
a253d217ee | ||
|
5a444dfd7c | ||
|
74f59e9275 | ||
|
1ea08a3dcd | ||
|
e243dfd12b | ||
|
5022732fed | ||
|
1e35fcc9ee | ||
|
7ebad830d6 | ||
|
c4add6b6e9 | ||
|
333f32ec23 | ||
|
70dbd16361 | ||
|
b22d093101 | ||
|
b6d5def2fa | ||
|
5b9626e8eb | ||
|
ced8f52fc6 | ||
|
4b8067392d | ||
|
4d9e527498 | ||
|
3f34e36d04 | ||
|
63c76537c6 | ||
|
5a1d521dee | ||
|
f803c03cc2 | ||
|
989f7a2cf0 | ||
|
d741d14193 | ||
|
c61db18e5d | ||
|
c731b54505 | ||
|
6b285ca366 | ||
|
1dc287c3a3 | ||
|
13e3f8c033 | ||
|
e91797885a | ||
|
0edb7ec5ce | ||
|
b22a62be5c | ||
|
7cd8a57599 | ||
|
ee3198e672 | ||
|
d9476a7ef1 | ||
|
2e3032b4aa | ||
|
053cd183c9 | ||
|
5d9af6a55a | ||
|
40d32e7942 | ||
|
a3068f06e6 | ||
|
45df1841e1 | ||
|
e9b4a4625c | ||
|
e223efc60c | ||
|
a4c35dedd9 | ||
|
8252e6bf2d | ||
|
4d601fc6b1 | ||
|
b2aeaf573e | ||
|
cf3062901d | ||
|
c5c7e68a91 | ||
|
0ed0372a6b | ||
|
ef4f218b3d | ||
|
d5d2b6bd24 | ||
|
d0a0c52c22 | ||
|
31ff1c443e | ||
|
6c2d8cb238 | ||
|
1360bcb84e | ||
|
cb7e6aa77a | ||
|
1549328f5f | ||
|
d3054be59e | ||
|
a2e721704b | ||
|
8b88b1634f | ||
|
032a7c9fe2 | ||
|
64bb8d4d51 | ||
|
61f5b77dd5 | ||
|
92a4eebb37 | ||
|
0caa769dbb | ||
|
def89ed025 | ||
|
5565a8c4d2 | ||
|
88252a90d1 | ||
|
8ac64c5b12 | ||
|
817e36690a | ||
|
13d9e0511e | ||
|
3b743b3b15 | ||
|
124d672ee6 | ||
|
cdd04623d7 | ||
|
5373d8a0f9 | ||
|
aaa5a23c95 | ||
|
c23ef28c20 | ||
|
c541989741 | ||
|
bffcfca88f | ||
|
dea5ef9dc4 | ||
|
18011927b1 | ||
|
b7b51025b9 | ||
|
a7360838d7 | ||
|
bff747501b | ||
|
ebafede928 | ||
|
3ff82ee5fc | ||
|
546603d39d | ||
|
b59ac35e7a | ||
|
efa5343a23 | ||
|
54b7f3cfc1 | ||
|
124b18cfb3 | ||
|
e00cd95590 | ||
|
a82385958e | ||
|
19f21ed916 | ||
|
a079c5550d | ||
|
c93356ada9 | ||
|
1beb268a68 | ||
|
91fa33eeca | ||
|
be409b6756 | ||
|
eece4292ac | ||
|
0c60e60b18 | ||
|
ee1ca53df6 | ||
|
88c6c1b64c | ||
|
8bb63e377b | ||
|
50874612be | ||
|
a802b26906 | ||
|
1df5fb2d83 | ||
|
8fe18cba76 | ||
|
f9dff90289 | ||
|
78e759910c | ||
|
dd7760470f | ||
|
e31fe995b8 | ||
|
4085777757 | ||
|
34a24786ca | ||
|
34c006cd47 | ||
|
6553c61724 | ||
|
992fbe3519 | ||
|
dc2c30ef92 | ||
|
1d5fde83d0 | ||
|
dca689d579 | ||
|
6fcd911c32 | ||
|
fe0a9af881 | ||
|
9759febdb8 | ||
|
b813843cca | ||
|
6b1f2cf41a | ||
|
3e4faa268e | ||
|
ef42ef7e6d | ||
|
5853e2e450 | ||
|
1eb72acddd | ||
|
2a9aac46a6 | ||
|
6686d9a125 | ||
|
c8dca871df | ||
|
1779cf40c0 | ||
|
58fe27722d | ||
|
67d3e63c2c | ||
|
3545488dd6 | ||
|
3e5c6c07b1 | ||
|
d3180516f3 | ||
|
f8c85cb7ec | ||
|
4f2494cf53 | ||
|
38a00bae86 | ||
|
b99f81268a | ||
|
36bbbf4f73 | ||
|
90347ab325 | ||
|
268aad6744 | ||
|
fe787dfb0f | ||
|
262c88461b | ||
|
c18ef81e79 | ||
|
b5daabdcd8 | ||
|
d1ee57e581 | ||
|
3da4193bb6 | ||
|
4257dfaa61 | ||
|
b1b69d2606 | ||
|
e10c79145e | ||
|
e366336525 | ||
|
ee4dc24f57 | ||
|
8b5c80e029 | ||
|
656d2539be | ||
|
b491aa95ab | ||
|
4e50eba1b6 | ||
|
66d04638e5 | ||
|
d4ccf26491 | ||
|
0f3cd8a92b | ||
|
70e3e99f2e | ||
|
411a373ed6 | ||
|
3378782691 | ||
|
25598f8bdb | ||
|
9eb87141ec | ||
|
55c84777ee | ||
|
5a693b89a1 | ||
|
d498274fcd | ||
|
5f446994a2 | ||
|
b96c7cf8ca | ||
|
2551014719 | ||
|
104bbee55e | ||
|
9e508f3acc | ||
|
e1a76b4702 | ||
|
9fb9cbfb65 | ||
|
80bfbd3e83 | ||
|
227dbb1190 | ||
|
cdc9b0c296 | ||
|
c3dc9d29d1 | ||
|
888d7f196d | ||
|
fe1abb4beb | ||
|
a6c910e358 | ||
|
820a98a463 | ||
|
128d435f5e | ||
|
72fbe88d72 | ||
|
1563349a96 | ||
|
066c71544e | ||
|
1530ceda05 | ||
|
4d3b9389e7 | ||
|
7ac4250e87 | ||
|
2aa9a9f03e | ||
|
55f67014d7 | ||
|
37db86ae23 | ||
|
5e0e476a95 | ||
|
d4ee449d1d | ||
|
665bfd41ac | ||
|
b85b20fba4 | ||
|
a701ea0fe1 | ||
|
e7df35b2bc | ||
|
2167c7f7a5 | ||
|
a347b08973 | ||
|
96015d5fc5 | ||
|
5eadb54e26 | ||
|
ecfd37ba1b | ||
|
b1c81b6ec3 | ||
|
44eb974081 | ||
|
344d057a2b | ||
|
ba9c8a8ccb | ||
|
54ec85dd29 | ||
|
5fef2c7069 | ||
|
a5cd613cdb | ||
|
36db7492e1 | ||
|
ebe8ef866b | ||
|
bf453d581e | ||
|
8f4833bb30 | ||
|
221c4f626f | ||
|
96337c6dbb | ||
|
6281a2ed3b | ||
|
0f87c53d0d | ||
|
7ab26d5180 | ||
|
bacfd6ed8c | ||
|
04f6b66b5e | ||
|
534397e538 | ||
|
153f5c7a93 | ||
|
d69d9227d0 | ||
|
a146c532c7 | ||
|
9a8d7aa7f7 | ||
|
6ecab5ad07 | ||
|
8b0e67821b | ||
|
6301d2e24a | ||
|
13d909f89a | ||
|
e96995a134 | ||
|
f6562949e4 | ||
|
f9fa014ee0 | ||
|
c33081c912 | ||
|
f7b31aa540 | ||
|
eca980c0c8 | ||
|
1bfcf64f39 | ||
|
b9a6d9d7ca | ||
|
98120f5fe2 | ||
|
674e2014ce | ||
|
d0ef841c8e | ||
|
e1ed31e65e | ||
|
29189291e5 | ||
|
339fe8dd6a | ||
|
6be947438f | ||
|
ac55e47818 | ||
|
d98cce8e63 | ||
|
6b26dd7165 | ||
|
b74b419a01 | ||
|
a993dc03ab | ||
|
eb2c0b2c80 | ||
|
ce3082a6e7 | ||
|
64797018df | ||
|
b91b8ee4c9 | ||
|
175a4b5db3 | ||
|
95cc496216 | ||
|
e037e88cd8 | ||
|
f8c0a004a5 | ||
|
ff5635e9ac | ||
|
e6c2468a9e | ||
|
bfc8f5667a | ||
|
1f26f5fdb9 | ||
|
7da06eeede | ||
|
ffe720c53e | ||
|
c8802c3dcc | ||
|
ab0ff0b0a6 | ||
|
a0767bae29 | ||
|
1f1c671284 | ||
|
6e6d767edf | ||
|
0d8ff45567 | ||
|
9006a2c6a3 | ||
|
386eb9d793 | ||
|
140b2b11a0 | ||
|
5af2a627d1 | ||
|
5060928b12 | ||
|
0c9f2cb10b | ||
|
d22c995a48 | ||
|
9686a4678d | ||
|
5830d2c399 | ||
|
456c4ccab2 | ||
|
f0053e837a | ||
|
351b49c1a7 | ||
|
6b0841c166 | ||
|
00c5eede48 | ||
|
3c5ce64f23 | ||
|
c455687fd0 | ||
|
fc504fdea7 | ||
|
5a1bfda4bd | ||
|
38a5df04ef | ||
|
8596c14090 | ||
|
de4f7f52f2 | ||
|
aae02dccf5 | ||
|
5942b32e79 | ||
|
c4172f8005 | ||
|
5bcf1d5671 | ||
|
231fdbb210 | ||
|
cfbe3c3500 | ||
|
147a656b34 | ||
|
4f9e71e1f7 | ||
|
5b91bf82c6 | ||
|
9c7d0d4992 | ||
|
c95e6d0917 | ||
|
c5d917158d | ||
|
9b4a20321e | ||
|
3d7ebd6434 | ||
|
0b560b980c | ||
|
5fbb0f9908 | ||
|
0a014fba41 | ||
|
0944818a19 | ||
|
4231a8193e | ||
|
05a32984ab | ||
|
b1956b5d42 | ||
|
cc0321f22a | ||
|
e52aed0d85 | ||
|
38504ad3e3 | ||
|
663b9e061e | ||
|
56326323e6 | ||
|
018f7b827f | ||
|
b1a9e404d4 | ||
|
709c9fd56b | ||
|
0760ed06a1 | ||
|
9e7790a352 | ||
|
256e2d885b | ||
|
cd67d66484 | ||
|
0f17c9fef1 | ||
|
4d603daa3a | ||
|
27f44846ac | ||
|
af7bc37a00 | ||
|
98a88a76dd | ||
|
40dc8c8bfd | ||
|
12f3447c21 | ||
|
aedd1559cc | ||
|
c27c0003c1 | ||
|
b90c335fbb | ||
|
0fd13678a6 | ||
|
78a6782158 | ||
|
6f3487a79b | ||
|
1ba4a4df39 | ||
|
699a2c30cb | ||
|
d1b777440b | ||
|
1d574dfc15 | ||
|
b24e99f7c4 | ||
|
dbc85eb993 | ||
|
e1fb441624 | ||
|
d9885abf80 | ||
|
824b6e3b5f | ||
|
dd190645eb | ||
|
65e0e10d23 | ||
|
f7e9858102 | ||
|
0a4f2d4869 | ||
|
b005802a1c | ||
|
58204afac3 | ||
|
bf9b044e67 | ||
|
845f7cfef2 | ||
|
2f1b849dc8 | ||
|
07bd82d42b | ||
|
cb3350ec62 | ||
|
0469ed6941 | ||
|
b12b2c74a3 | ||
|
28892d768b | ||
|
dd577319e8 | ||
|
ca2c8725c4 | ||
|
2eb370ffdb | ||
|
4d83616f9d | ||
|
549c59b30c | ||
|
afb04ba198 | ||
|
c8ae65ac52 | ||
|
2b85beae0b | ||
|
df67a480eb | ||
|
29d521b9fa | ||
|
b7bfcd1a7e | ||
|
bce776a5b6 | ||
|
a7bbe9d20b | ||
|
e46440360e | ||
|
ec66159475 | ||
|
8d8c487fb9 | ||
|
5aef7ba3ce | ||
|
c41100f05f | ||
|
da351bdbe2 | ||
|
9033652979 | ||
|
909762d078 | ||
|
3f903173fa | ||
|
065a7d406c | ||
|
ae38c9765a | ||
|
c1e732344a | ||
|
47f7040ddb | ||
|
3e8bab960e | ||
|
1f901a89f0 | ||
|
ae4cc2b084 | ||
|
7ccc9c954c | ||
|
316b43dee5 | ||
|
34d808add3 | ||
|
90456c3c06 | ||
|
aa0857304e | ||
|
e3df050e51 | ||
|
849c684b86 | ||
|
fbe1328a51 | ||
|
a34a886962 | ||
|
5942ea61de | ||
|
fe1b9e8e08 | ||
|
1806451073 | ||
|
34711bf198 | ||
|
d0976b9acc | ||
|
a2f32ef6ff | ||
|
36f2f049a8 | ||
|
883787a2c6 | ||
|
7fef06af4e | ||
|
a24de121cf | ||
|
792ace0ac3 | ||
|
89b1612fcf | ||
|
f5a343f5ef | ||
|
8afbd22eea | ||
|
a35ecb70b1 | ||
|
64047cb68c | ||
|
a5baa7b914 | ||
|
e1b3759079 | ||
|
9aeebd913e | ||
|
53a6b65604 | ||
|
ff469eae2c | ||
|
2e886a2e03 | ||
|
33aaf8d71f | ||
|
9461604e14 | ||
|
b1d95b19e5 | ||
|
5902cfa945 | ||
|
dc080d3b61 | ||
|
c03860d052 | ||
|
74d0a339b8 | ||
|
5bb1866e53 | ||
|
e33305ea6c | ||
|
6a9e59a1bc | ||
|
ac9b530e6b | ||
|
b3fa393f47 | ||
|
75787f6580 | ||
|
f0c562761f | ||
|
3ecca00330 | ||
|
1f279e7a53 | ||
|
373b1d0ee3 | ||
|
abea3bca82 | ||
|
ff1d0fbfba | ||
|
245c643cc8 | ||
|
51bd1f7699 | ||
|
90f0918846 | ||
|
5851b8253a | ||
|
dcb85e31fc | ||
|
12957e56d2 | ||
|
dd12683e1f | ||
|
58793b8838 | ||
|
81feb6d305 | ||
|
9384e1c011 | ||
|
ea30f8e813 | ||
|
551639a8cb | ||
|
4ec76c062d | ||
|
efb7210ff6 | ||
|
12155d5bdc | ||
|
d5a60558c5 | ||
|
faa6f20b53 | ||
|
dc19edf5a0 | ||
|
a43f0373ec | ||
|
b2959e9f1a | ||
|
1e9f966126 | ||
|
5306c0892f | ||
|
cc92ae2acf | ||
|
50e7c32d23 | ||
|
8186fb67e1 | ||
|
d9498e013b | ||
|
c298baa17a | ||
|
8bd85428c2 | ||
|
3f20f9cf4f | ||
|
4120bb498f | ||
|
a3d7ae2ed8 | ||
|
e29f9f1409 | ||
|
2d94e8f72a | ||
|
1dd46be315 | ||
|
8fe388d993 | ||
|
332de9a3b0 | ||
|
235aa246a4 | ||
|
c63bcc2e4b | ||
|
c02a2f2559 | ||
|
ecf25cb5c2 | ||
|
3bbff22cc5 | ||
|
2762bbe9a7 | ||
|
c22f2d01de | ||
|
81b7163580 | ||
|
589ae5a034 | ||
|
74ccebcdad | ||
|
f7ea618dec | ||
|
b0bc0b5206 | ||
|
a8f971318d | ||
|
edc2941a68 | ||
|
1c6ee78f36 | ||
|
b15e00c823 | ||
|
b0c6d928cb | ||
|
c7bdcc2ac2 | ||
|
9c4ed79c94 | ||
|
d154a4dfae | ||
|
841d8698dd | ||
|
c8e342e00b | ||
|
e8d2a98052 | ||
|
87a1f65e80 | ||
|
224f87932d | ||
|
6cea3c1b51 | ||
|
7548947d04 | ||
|
1affa1c09a | ||
|
e4a1d5a7c4 | ||
|
d5a002aba0 | ||
|
0c0a50d6b3 | ||
|
4672a48928 | ||
|
6cf1880fb5 | ||
|
5487d002fa | ||
|
c2c4199bc2 | ||
|
ab9e11da66 | ||
|
7878f706e7 | ||
|
b31501c90a | ||
|
705ed563de | ||
|
8565b5829c | ||
|
0f228f19fb | ||
|
6d2d2e6e5b | ||
|
73ee3abab1 | ||
|
a998027ba8 | ||
|
1101ffbf84 | ||
|
957024c1bc | ||
|
112e584ba0 | ||
|
d62cb7bb0c | ||
|
6accc5fad4 | ||
|
6bd4af305d | ||
|
bc2288f59b | ||
|
8b13bca9b8 | ||
|
3d1872b780 | ||
|
e01d92d43f | ||
|
f7d05bddd7 | ||
|
777f4aa083 | ||
|
4cc2b63bd8 | ||
|
7db1458f75 | ||
|
a10acf0e20 | ||
|
133451f344 | ||
|
72208a9a90 | ||
|
61c1742ba1 | ||
|
ee37e96479 | ||
|
5e3719aeae | ||
|
339cb0af96 | ||
|
abe63fa7dc | ||
|
5e2e5647b9 | ||
|
5ef3b66fec | ||
|
86defc2c25 | ||
|
61a044c6c1 | ||
|
cd66bd7316 | ||
|
c6073a0ead | ||
|
c16d4e35d1 | ||
|
e1e0428615 | ||
|
4a9b250bca | ||
|
ea992760ff | ||
|
b1bfdd6597 | ||
|
6d576e7ac4 | ||
|
bd13ecf355 | ||
|
68e60a388d | ||
|
1532e5d5ed | ||
|
cde8c56809 | ||
|
154dcd6c58 | ||
|
5b5028e67b | ||
|
d4dd22c7bc | ||
|
4bd6bf317e | ||
|
66f2329446 | ||
|
9de3067013 | ||
|
9222154ae7 | ||
|
1d212a83df | ||
|
20203d3f98 | ||
|
b77e1a240e | ||
|
10dfa028f0 | ||
|
06e2409667 | ||
|
cd626ef0fb | ||
|
e149055310 | ||
|
19d76ae608 | ||
|
1bc5d2b3c7 | ||
|
27db236ac2 | ||
|
c1d6749b0e | ||
|
d0196be1e3 | ||
|
e6c80aea71 | ||
|
5b29e438eb | ||
|
1bae3e0ed1 | ||
|
8f558d8aca | ||
|
aebe5a36b6 | ||
|
24326f381f | ||
|
1667eec699 | ||
|
f832bb3466 | ||
|
b854e2bf75 | ||
|
0537f332c9 | ||
|
0e2a5749d8 | ||
|
1fa7fdf6ea | ||
|
8805bd904a | ||
|
a39e722670 | ||
|
52b68f7d45 | ||
|
c9f02a96d8 | ||
|
a7119c8152 | ||
|
79f84eb676 | ||
|
db79f8019d | ||
|
f33d39949b | ||
|
951c6e63f8 | ||
|
5ac0a5450b | ||
|
6ee9c68912 | ||
|
4faf13222e | ||
|
3db2823f1e | ||
|
541a3f5882 | ||
|
cd49821608 | ||
|
23b53ede35 | ||
|
a16f7f4794 | ||
|
2157bc9c8b | ||
|
90f7f19ae7 | ||
|
7777360637 | ||
|
b7c7ec8c17 | ||
|
44d2e8d7ca | ||
|
e7f0a829c9 | ||
|
f3b314331c | ||
|
79820e32ec | ||
|
0a57a9782b | ||
|
06140766c1 | ||
|
a68749f39a | ||
|
d429d00f97 | ||
|
de707b0866 | ||
|
25184ec33c | ||
|
cdbf45ad85 | ||
|
dc9b2a5740 | ||
|
97e1ff1b91 | ||
|
ea927d2f3f | ||
|
f0c69b614c | ||
|
f71503c37c | ||
|
29c5075787 | ||
|
0939fda93c | ||
|
006c2647dc | ||
|
78647b9228 | ||
|
02a908fc6d | ||
|
1c06bd485e | ||
|
2e5fb984ed | ||
|
f068aa038d | ||
|
a4e754fcc9 | ||
|
63c677e20f | ||
|
3c3277f21e | ||
|
3e44e9f534 | ||
|
0feca62c7a | ||
|
f440f7e3ca | ||
|
3be421e987 | ||
|
8bd72d7c05 | ||
|
ebfca258f5 | ||
|
7f029e1b31 | ||
|
8bdb022115 | ||
|
aae5def8bb | ||
|
a9b7e035ba | ||
|
8bbb56b485 | ||
|
d624deb7ab | ||
|
8aaa8f7bc0 | ||
|
a87e79d9d6 | ||
|
ffcec664ca | ||
|
75505d1611 | ||
|
8c33cc0ec9 | ||
|
41bfaffd13 | ||
|
54c7728a04 | ||
|
44e6186eea | ||
|
6461344c31 | ||
|
ee33344c59 | ||
|
7cb0313359 | ||
|
5eecb45af0 | ||
|
99576ee3fd | ||
|
7ff68b5edc | ||
|
e34914db19 | ||
|
7a141b1306 | ||
|
bad0b5e871 | ||
|
f3f80a57e1 | ||
|
f110b7734b | ||
|
5563281fa2 | ||
|
0a54cd4431 | ||
|
ae957a59f7 | ||
|
ca3817dc17 | ||
|
b8d06293ca | ||
|
46433d44a9 | ||
|
3a039a567a | ||
|
9f0d7651b3 | ||
|
93fe14c2f7 | ||
|
7f0301e39a | ||
|
48ed4769fc | ||
|
44b5d55d8f | ||
|
2460ec2a8f | ||
|
3a24b397a3 | ||
|
080851aec1 | ||
|
7fc21c29e8 | ||
|
5347372116 | ||
|
53be772103 | ||
|
1ec2e7d0e8 | ||
|
4123d6da70 | ||
|
54024039f8 | ||
|
568556cf36 | ||
|
4184aabda2 | ||
|
7aaa7e67c4 | ||
|
3499b150d1 | ||
|
40070a186a | ||
|
6ef394ffe2 | ||
|
c9faac275b | ||
|
a35918caae | ||
|
6791175f05 | ||
|
4745a1efe5 | ||
|
ce2818e418 | ||
|
582e4e449d | ||
|
4109d0d754 | ||
|
2d70c90d2e | ||
|
6b86f6f336 | ||
|
ce2697abeb | ||
|
052c98ce24 | ||
|
97511979b4 | ||
|
e12ceb40ce | ||
|
ce3cd892c8 | ||
|
4bf95a9f36 | ||
|
99a6529e1e | ||
|
8f86d67d46 | ||
|
7072a185d0 | ||
|
dacf87e885 | ||
|
f412ecc3f4 | ||
|
dc7363f848 | ||
|
7506fe43a1 | ||
|
1efda6414f | ||
|
ad6040ec9b | ||
|
9efe8d6040 | ||
|
2052cb675f | ||
|
c0d221a348 | ||
|
3dbf922901 | ||
|
de8373fa07 | ||
|
f4043414da | ||
|
a2acb04ca6 | ||
|
70d0a7549e | ||
|
28fd7b090d | ||
|
0c8b880223 | ||
|
115eae650b | ||
|
718a937ed9 | ||
|
9e62c23017 | ||
|
2040e6c556 | ||
|
2001f84e8c | ||
|
9609d24b19 | ||
|
9169f67690 | ||
|
73fef64f14 | ||
|
890d9ee554 | ||
|
7823611cda | ||
|
a012bf6e3e | ||
|
77204d608b | ||
|
e1511113de | ||
|
8aa4db4b80 | ||
|
c60d751b73 | ||
|
940dbd071e | ||
|
20b58eb850 | ||
|
ed0e52fc9a | ||
|
4f735fc8cd | ||
|
0a4c903c5a | ||
|
79195517f8 | ||
|
e58427e396 | ||
|
30939ff2bc | ||
|
751053d6f1 | ||
|
987363c9ce | ||
|
4344a788c4 | ||
|
8ad5f10a2b | ||
|
f9bba77495 | ||
|
17ac6b23dc | ||
|
f1f8ce6de7 | ||
|
1662676d58 | ||
|
8ee7ad9095 | ||
|
449083a3f8 | ||
|
c4e75574a0 | ||
|
61a7b0ec63 | ||
|
e537d87817 | ||
|
72dd8a53fc | ||
|
03823aa3c6 | ||
|
09c3c69cfd | ||
|
f72df1385e | ||
|
01bbf1f739 | ||
|
34a4ddda4d | ||
|
4887443e4f | ||
|
56658c22a6 | ||
|
7162fdb037 | ||
|
e0db09cd1c | ||
|
d16e777ac5 | ||
|
1eac82c878 | ||
|
fd501a7984 | ||
|
84391f5795 | ||
|
c0d9813cec | ||
|
3fad4a9527 | ||
|
ccd05ddd50 | ||
|
a02a5f3dbf | ||
|
0e6b86731e | ||
|
bee0f2f167 | ||
|
8a641d2b73 | ||
|
2ad34f65af | ||
|
693877f8e5 | ||
|
a6a0a59756 | ||
|
9b17c6511d | ||
|
1263ecf2ff | ||
|
821807bcef | ||
|
896ae6fc24 | ||
|
c9e6803cf4 | ||
|
c095341cc4 | ||
|
20ddbc133f | ||
|
2de87e461d | ||
|
83ba30c5a3 | ||
|
a5a0f73dd2 | ||
|
93efab6d9a | ||
|
6f49996ced | ||
|
81add864f4 | ||
|
5db9414cc1 | ||
|
75771aebd3 | ||
|
8d4d55b15b | ||
|
e75ee97224 | ||
|
994df20926 | ||
|
d5988a8ac9 | ||
|
86737681af | ||
|
e434be3c9c | ||
|
19ef86eec6 | ||
|
35f613d96c | ||
|
b23fc39cd3 | ||
|
c7be0dd5b9 | ||
|
864701886f | ||
|
877251b421 | ||
|
5552ac4231 | ||
|
c4122dcaad | ||
|
630cb8507b | ||
|
d65f2cea36 | ||
|
41a9c3fd11 | ||
|
199de89677 | ||
|
69dfa8d87a | ||
|
06c1f423e1 | ||
|
bafa76ef5b | ||
|
7230212a43 | ||
|
68599525d8 | ||
|
1db271df76 | ||
|
74f3318cc0 | ||
|
d7a09cb86a | ||
|
11cf02f6d0 | ||
|
e827d21da1 | ||
|
9904222db0 | ||
|
8e011d83bb | ||
|
841d86fe40 | ||
|
6a10344080 | ||
|
e6bf3cfd50 | ||
|
7ee089f604 | ||
|
6945837e4c | ||
|
4faf534046 | ||
|
66833b2a87 | ||
|
c3492bd9bb | ||
|
bac7f02365 | ||
|
748cd9a680 | ||
|
9d5aab0554 | ||
|
42e8bc7d16 | ||
|
2632981783 | ||
|
bc6a8b78aa | ||
|
8b2eb7b3f6 | ||
|
5986cf382e | ||
|
c8e36b75b5 | ||
|
767ddbe874 | ||
|
e6b10112b3 | ||
|
5e2c0ecd0b | ||
|
e74cea4c7b | ||
|
32ae05811d | ||
|
cd9349ac53 | ||
|
b921c62943 | ||
|
0b545abb5f | ||
|
30142a32ac | ||
|
faf0475b13 | ||
|
6250a1206e | ||
|
3d2bb75495 | ||
|
ab187ae25a | ||
|
a662afb5b0 | ||
|
a676a24656 | ||
|
6735645d9c | ||
|
0dbb0f1a5c | ||
|
425d25699b | ||
|
d40695ad82 | ||
|
5367f17db4 | ||
|
bc6a7a27ce | ||
|
f21547ff64 | ||
|
8ab0bd2397 | ||
|
6a3094c996 | ||
|
94c0129d24 | ||
|
d4d87596c1 | ||
|
fbe2c4b9be | ||
|
fceafda518 | ||
|
f32bfe6d06 | ||
|
4f10654e04 | ||
|
1dbd423fbb | ||
|
c45f4c5e75 | ||
|
0c1ffb9504 | ||
|
1d4c17a6ef | ||
|
9c6961d598 | ||
|
b2725f57c7 | ||
|
9eaa902a52 | ||
|
9dd8b1908e | ||
|
e8097a74b7 | ||
|
6478baf891 | ||
|
4a64cbda86 | ||
|
e21e355e2c | ||
|
1c7a65eba7 | ||
|
2db0ccc2d7 | ||
|
62382925c9 | ||
|
2583352f24 | ||
|
db408fa3c1 | ||
|
24a105a7d8 | ||
|
0e58b55a46 | ||
|
5ae0723355 | ||
|
043944c550 | ||
|
2b2087478c | ||
|
0a1bd0a35d | ||
|
c74805f1e7 | ||
|
01bd1c98fa | ||
|
b721aa749b | ||
|
84513df419 | ||
|
1e1d16971d | ||
|
29af38b0f8 | ||
|
137ed15511 | ||
|
cf9ff46b08 | ||
|
d02a848e32 | ||
|
2067d9f8bf | ||
|
57d1afc889 | ||
|
228e4f4706 | ||
|
e73fbac5d7 | ||
|
66329d53bd | ||
|
46cced287e | ||
|
1f7e7e70d2 | ||
|
3710ec21d5 | ||
|
fe90d0d2ad | ||
|
6e601a4109 | ||
|
018432f0ce | ||
|
e0e26f9c1f | ||
|
20737c2fe6 | ||
|
ceec363801 | ||
|
0f33366483 | ||
|
24ed9cfd23 | ||
|
2c4a45b361 | ||
|
0e8a782922 | ||
|
579510336e | ||
|
479a3b6053 | ||
|
427b2f41a6 | ||
|
2117989c26 | ||
|
2d94c38ba5 | ||
|
c7c5a6c4f7 | ||
|
ada385843b | ||
|
3143144ba5 | ||
|
cee85c48e9 | ||
|
ffb4c72d7b | ||
|
5a6c5af64a | ||
|
218d55a050 | ||
|
b6ad4675b6 | ||
|
a37c60b660 | ||
|
d32159853d | ||
|
1e4725e569 | ||
|
36c19ee6c7 | ||
|
39b0867d83 | ||
|
523152618d | ||
|
f2655dcf28 | ||
|
643e8e4bd4 | ||
|
779ddcdf96 | ||
|
a2ea6894e6 | ||
|
5f354f6a4a | ||
|
6d88babba3 | ||
|
038720e899 | ||
|
cbbccf3cf3 | ||
|
2e94e41297 | ||
|
09c80b07b4 | ||
|
4cc824283c | ||
|
a3623244b9 | ||
|
a099239015 | ||
|
0bc94c748b | ||
|
3a71670618 | ||
|
dcd39e09ff | ||
|
c5fcec8c3f | ||
|
cf4a8fa455 | ||
|
2a2f01b9a0 | ||
|
bee14e9ebc | ||
|
9d1c98e699 | ||
|
2fad330f6b | ||
|
9f4f29cbee | ||
|
6a4eed9bad | ||
|
e4fb8f1d31 | ||
|
9a6b445bc2 | ||
|
beacbc7492 | ||
|
0ba795d21a | ||
|
ff260aa7ab | ||
|
5397bd425e | ||
|
4e97974c1e | ||
|
a5b84d3480 | ||
|
8b13e18143 | ||
|
b23276135a | ||
|
701e8cc29a | ||
|
cd16355bbf | ||
|
3d110afbca | ||
|
bb207f6cda | ||
|
7dbc50bd24 |
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "CryptoPkg/Library/OpensslLib/openssl"]
|
||||||
|
path = CryptoPkg/Library/OpensslLib/openssl
|
||||||
|
url = https://github.com/openssl/openssl
|
@@ -7,7 +7,7 @@
|
|||||||
# for important information about configuring this package for your
|
# for important information about configuring this package for your
|
||||||
# environment.
|
# environment.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -40,8 +40,6 @@
|
|||||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|$(DEBUG_PROPERTY_MASK)
|
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|$(DEBUG_PROPERTY_MASK)
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
|
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
|
||||||
|
|
||||||
[PcdsFixedAtBuild.IPF]
|
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
#
|
#
|
||||||
# Entry Point Libraries
|
# Entry Point Libraries
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
# NOTE: Improvements gratefully received. Please mention the version.
|
# NOTE: Improvements gratefully received. Please mention the version.
|
||||||
# "http://www.cwi.nl/~steven/enquire.html"
|
# "http://www.cwi.nl/~steven/enquire.html"
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
ENTRY_POINT = ShellCEntryLib
|
ENTRY_POINT = ShellCEntryLib
|
||||||
|
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF
|
# VALID_ARCHITECTURES = IA32 X64
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# A simple, basic, EDK II native, "hello" application.
|
# A simple, basic, EDK II native, "hello" application.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
ENTRY_POINT = ShellCEntryLib
|
ENTRY_POINT = ShellCEntryLib
|
||||||
|
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF
|
# VALID_ARCHITECTURES = IA32 X64
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
# from the standard input, and writing results to the standard output.
|
# from the standard input, and writing results to the standard output.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014, Red Hat, Inc.
|
# Copyright (C) 2014, Red Hat, Inc.
|
||||||
# Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials are licensed and made available
|
# This program and the accompanying materials are licensed and made available
|
||||||
# under the terms and conditions of the BSD License which accompanies this
|
# under the terms and conditions of the BSD License which accompanies this
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
ENTRY_POINT = ShellCEntryLib
|
ENTRY_POINT = ShellCEntryLib
|
||||||
|
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF
|
# VALID_ARCHITECTURES = IA32 X64
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
|||||||
# PythonCore.inf
|
# PythonCore.inf
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>
|
# Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>
|
||||||
# Copyright (c) 2011-2012, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
DEFINE PYTHON_VERSION = 2.7.2
|
DEFINE PYTHON_VERSION = 2.7.2
|
||||||
|
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF
|
# VALID_ARCHITECTURES = IA32 X64
|
||||||
#
|
#
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
@@ -252,4 +252,3 @@
|
|||||||
MSFT:*_*_X64_CC_FLAGS = /Oi- /wd4018 /wd4054 /wd4055 /wd4101 /wd4131 /wd4152 /wd4204 /wd4210 /wd4244 /wd4267 /wd4305 /wd4310 /wd4389 /wd4701 /wd4702 /wd4706 /I$(WORKSPACE)\AppPkg\Applications\Python\X64 /I$(WORKSPACE)\AppPkg\Applications\Python\Efi /I$(WORKSPACE)\AppPkg\Applications\Python\Python-$(PYTHON_VERSION)\Include /DHAVE_MEMMOVE /DUSE_PYEXPAT_CAPI /DXML_STATIC
|
MSFT:*_*_X64_CC_FLAGS = /Oi- /wd4018 /wd4054 /wd4055 /wd4101 /wd4131 /wd4152 /wd4204 /wd4210 /wd4244 /wd4267 /wd4305 /wd4310 /wd4389 /wd4701 /wd4702 /wd4706 /I$(WORKSPACE)\AppPkg\Applications\Python\X64 /I$(WORKSPACE)\AppPkg\Applications\Python\Efi /I$(WORKSPACE)\AppPkg\Applications\Python\Python-$(PYTHON_VERSION)\Include /DHAVE_MEMMOVE /DUSE_PYEXPAT_CAPI /DXML_STATIC
|
||||||
GCC:*_*_IA32_CC_FLAGS = -fno-builtin -Wno-format -I$(WORKSPACE)/AppPkg/Applications/Python/Ia32 -I$(WORKSPACE)/AppPkg/Applications/Python/Python-$(PYTHON_VERSION)/Include -DHAVE_MEMMOVE -DUSE_PYEXPAT_CAPI -DXML_STATIC
|
GCC:*_*_IA32_CC_FLAGS = -fno-builtin -Wno-format -I$(WORKSPACE)/AppPkg/Applications/Python/Ia32 -I$(WORKSPACE)/AppPkg/Applications/Python/Python-$(PYTHON_VERSION)/Include -DHAVE_MEMMOVE -DUSE_PYEXPAT_CAPI -DXML_STATIC
|
||||||
GCC:*_*_X64_CC_FLAGS = -Wno-format -I$(WORKSPACE)/AppPkg/Applications/Python/X64 -I$(WORKSPACE)/AppPkg/Applications/Python/Python-$(PYTHON_VERSION)/Include -DHAVE_MEMMOVE -DUSE_PYEXPAT_CAPI -DXML_STATIC
|
GCC:*_*_X64_CC_FLAGS = -Wno-format -I$(WORKSPACE)/AppPkg/Applications/Python/X64 -I$(WORKSPACE)/AppPkg/Applications/Python/Python-$(PYTHON_VERSION)/Include -DHAVE_MEMMOVE -DUSE_PYEXPAT_CAPI -DXML_STATIC
|
||||||
GCC:*_*_IPF_SYMRENAME_FLAGS = --redefine-syms=$(WORKSPACE)/StdLib/GccSymRename.txt
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# DataSink Application
|
# DataSink Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# DataSource Application
|
# DataSource Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# GetAddrInfo Application
|
# GetAddrInfo Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# GetHostByAddr Application
|
# GetHostByAddr Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# GetHostByDns Application
|
# GetHostByDns Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# GetHostByName Application
|
# GetHostByName Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# GetNameInfo Application
|
# GetNameInfo Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# GetNetByAddr Application
|
# GetNetByAddr Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# GetNetByName Application
|
# GetNetByName Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# GetServByName Application
|
# GetServByName Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# GetServByPort Application
|
# GetServByPort Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# OobRx Application
|
# OobRx Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# OobTx Application
|
# OobTx Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# RawIp4 Application
|
# RawIp4 Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# RawIp4Tx Application
|
# RawIp4Tx Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Receive Datagram Application
|
# Receive Datagram Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# SetHostName Application
|
# SetHostName Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# SetHostName Application
|
# SetHostName Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# TFTP Server Application
|
# TFTP Server Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Web Server Application
|
# Web Server Application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, Intel Corporation
|
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
# ARM processor package.
|
# ARM processor package.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
|
||||||
# Copyright (c) 2011 - 2017, ARM Limited. All rights reserved.
|
# Copyright (c) 2011 - 2018, ARM Limited. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -39,7 +39,9 @@
|
|||||||
DefaultExceptionHandlerLib|Include/Library/DefaultExceptionHandlerLib.h
|
DefaultExceptionHandlerLib|Include/Library/DefaultExceptionHandlerLib.h
|
||||||
ArmDisassemblerLib|Include/Library/ArmDisassemblerLib.h
|
ArmDisassemblerLib|Include/Library/ArmDisassemblerLib.h
|
||||||
ArmGicArchLib|Include/Library/ArmGicArchLib.h
|
ArmGicArchLib|Include/Library/ArmGicArchLib.h
|
||||||
|
ArmMtlLib|ArmPlatformPkg/Include/Library/ArmMtlLib.h
|
||||||
ArmSvcLib|Include/Library/ArmSvcLib.h
|
ArmSvcLib|Include/Library/ArmSvcLib.h
|
||||||
|
OpteeLib|Include/Library/OpteeLib.h
|
||||||
|
|
||||||
[Guids.common]
|
[Guids.common]
|
||||||
gArmTokenSpaceGuid = { 0xBB11ECFE, 0x820F, 0x4968, { 0xBB, 0xA6, 0xF7, 0x6A, 0xFE, 0x30, 0x25, 0x96 } }
|
gArmTokenSpaceGuid = { 0xBB11ECFE, 0x820F, 0x4968, { 0xBB, 0xA6, 0xF7, 0x6A, 0xFE, 0x30, 0x25, 0x96 } }
|
||||||
@@ -48,6 +50,19 @@
|
|||||||
# Include/Guid/ArmMpCoreInfo.h
|
# Include/Guid/ArmMpCoreInfo.h
|
||||||
gArmMpCoreInfoGuid = { 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} }
|
gArmMpCoreInfoGuid = { 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} }
|
||||||
|
|
||||||
|
[Protocols.common]
|
||||||
|
## Arm System Control and Management Interface(SCMI) Base protocol
|
||||||
|
## ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h
|
||||||
|
gArmScmiBaseProtocolGuid = { 0xd7e5abe9, 0x33ab, 0x418e, { 0x9f, 0x91, 0x72, 0xda, 0xe2, 0xba, 0x8e, 0x2f } }
|
||||||
|
|
||||||
|
## Arm System Control and Management Interface(SCMI) Clock management protocol
|
||||||
|
## ArmPkg/Include/Protocol/ArmScmiClockProtocol.h
|
||||||
|
gArmScmiClockProtocolGuid = { 0x91ce67a8, 0xe0aa, 0x4012, { 0xb9, 0x9f, 0xb6, 0xfc, 0xf3, 0x4, 0x8e, 0xaa } }
|
||||||
|
|
||||||
|
## Arm System Control and Management Interface(SCMI) Clock management protocol
|
||||||
|
## ArmPkg/Include/Protocol/ArmScmiPerformanceProtocol.h
|
||||||
|
gArmScmiPerformanceProtocolGuid = { 0x9b8ba84, 0x3dd3, 0x49a6, { 0xa0, 0x5a, 0x31, 0x34, 0xa5, 0xf0, 0x7b, 0xad } }
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
## Include/Ppi/ArmMpCoreInfo.h
|
## Include/Ppi/ArmMpCoreInfo.h
|
||||||
gArmMpCoreInfoPpiGuid = { 0x6847cc74, 0xe9ec, 0x4f8f, {0xa2, 0x9d, 0xab, 0x44, 0xe7, 0x54, 0xa8, 0xfc} }
|
gArmMpCoreInfoPpiGuid = { 0x6847cc74, 0xe9ec, 0x4f8f, {0xa2, 0x9d, 0xab, 0x44, 0xe7, 0x54, 0xa8, 0xfc} }
|
||||||
@@ -71,6 +86,10 @@
|
|||||||
# Define if the GICv3 controller should use the GICv2 legacy
|
# Define if the GICv3 controller should use the GICv2 legacy
|
||||||
gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy|FALSE|BOOLEAN|0x00000042
|
gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy|FALSE|BOOLEAN|0x00000042
|
||||||
|
|
||||||
|
# Whether to implement warm reboot for capsule update using a jump back to the
|
||||||
|
# PEI entry point with caches and interrupts disabled.
|
||||||
|
gArmTokenSpaceGuid.PcdArmReenterPeiForCapsuleWarmReboot|FALSE|BOOLEAN|0x0000001F
|
||||||
|
|
||||||
[PcdsFeatureFlag.ARM]
|
[PcdsFeatureFlag.ARM]
|
||||||
# Whether to map normal memory as non-shareable. FALSE is the safe choice, but
|
# Whether to map normal memory as non-shareable. FALSE is the safe choice, but
|
||||||
# TRUE may be appropriate to fix performance problems if you don't care about
|
# TRUE may be appropriate to fix performance problems if you don't care about
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
# ARM processor package.
|
# ARM processor package.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
|
||||||
# Copyright (c) 2011 - 2015, ARM Ltd. All rights reserved.<BR>
|
# Copyright (c) 2011 - 2018, ARM Ltd. All rights reserved.<BR>
|
||||||
# Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
|
# Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
DSC_SPECIFICATION = 0x00010005
|
DSC_SPECIFICATION = 0x00010005
|
||||||
OUTPUT_DIRECTORY = Build/Arm
|
OUTPUT_DIRECTORY = Build/Arm
|
||||||
SUPPORTED_ARCHITECTURES = ARM|AARCH64
|
SUPPORTED_ARCHITECTURES = ARM|AARCH64
|
||||||
BUILD_TARGETS = DEBUG|RELEASE
|
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
|
||||||
SKUID_IDENTIFIER = DEFAULT
|
SKUID_IDENTIFIER = DEFAULT
|
||||||
|
|
||||||
[BuildOptions]
|
[BuildOptions]
|
||||||
@@ -71,6 +71,7 @@
|
|||||||
ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
|
ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
|
||||||
ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
|
ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
|
||||||
ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf
|
ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf
|
||||||
|
OpteeLib|ArmPkg/Library/OpteeLib/OpteeLib.inf
|
||||||
|
|
||||||
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
||||||
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
|
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
|
||||||
@@ -87,6 +88,8 @@
|
|||||||
ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
|
ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
|
||||||
ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
|
ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
|
||||||
|
|
||||||
|
ArmMtlLib|ArmPkg/Library/ArmMtlNullLib/ArmMtlNullLib.inf
|
||||||
|
|
||||||
[LibraryClasses.common.PEIM]
|
[LibraryClasses.common.PEIM]
|
||||||
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
|
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
|
||||||
PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
|
PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
|
||||||
@@ -129,6 +132,7 @@
|
|||||||
ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf
|
ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf
|
||||||
ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf
|
ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf
|
||||||
ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
|
ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
|
||||||
|
ArmPkg/Library/OpteeLib/OpteeLib.inf
|
||||||
|
|
||||||
ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
|
ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
|
||||||
|
|
||||||
@@ -144,5 +148,7 @@
|
|||||||
ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
|
ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
|
||||||
ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
|
ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
|
||||||
|
|
||||||
|
ArmPkg/Drivers/ArmScmiDxe/ArmScmiDxe.inf
|
||||||
|
|
||||||
[Components.AARCH64]
|
[Components.AARCH64]
|
||||||
ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf
|
ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf
|
||||||
|
@@ -121,6 +121,44 @@ RegisterInterruptSource (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC VOID *mCpuArchProtocolNotifyEventRegistration;
|
||||||
|
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
CpuArchEventProtocolNotify (
|
||||||
|
IN EFI_EVENT Event,
|
||||||
|
IN VOID *Context
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_CPU_ARCH_PROTOCOL *Cpu;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
// Get the CPU protocol that this driver requires.
|
||||||
|
Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID **)&Cpu);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unregister the default exception handler.
|
||||||
|
Status = Cpu->RegisterInterruptHandler (Cpu, ARM_ARCH_EXCEPTION_IRQ, NULL);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "%a: Cpu->RegisterInterruptHandler() - %r\n",
|
||||||
|
__FUNCTION__, Status));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Register to receive interrupts
|
||||||
|
Status = Cpu->RegisterInterruptHandler (Cpu, ARM_ARCH_EXCEPTION_IRQ,
|
||||||
|
Context);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "%a: Cpu->RegisterInterruptHandler() - %r\n",
|
||||||
|
__FUNCTION__, Status));
|
||||||
|
}
|
||||||
|
|
||||||
|
gBS->CloseEvent (Event);
|
||||||
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
InstallAndRegisterInterruptService (
|
InstallAndRegisterInterruptService (
|
||||||
IN EFI_HARDWARE_INTERRUPT_PROTOCOL *InterruptProtocol,
|
IN EFI_HARDWARE_INTERRUPT_PROTOCOL *InterruptProtocol,
|
||||||
@@ -130,7 +168,6 @@ InstallAndRegisterInterruptService (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_CPU_ARCH_PROTOCOL *Cpu;
|
|
||||||
CONST UINTN RihArraySize =
|
CONST UINTN RihArraySize =
|
||||||
(sizeof(HARDWARE_INTERRUPT_HANDLER) * mGicNumInterrupts);
|
(sizeof(HARDWARE_INTERRUPT_HANDLER) * mGicNumInterrupts);
|
||||||
|
|
||||||
@@ -152,27 +189,15 @@ InstallAndRegisterInterruptService (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the CPU protocol that this driver requires.
|
//
|
||||||
Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID **)&Cpu);
|
// Install the interrupt handler as soon as the CPU arch protocol appears.
|
||||||
if (EFI_ERROR (Status)) {
|
//
|
||||||
return Status;
|
EfiCreateProtocolNotifyEvent (
|
||||||
}
|
&gEfiCpuArchProtocolGuid,
|
||||||
|
TPL_CALLBACK,
|
||||||
// Unregister the default exception handler.
|
CpuArchEventProtocolNotify,
|
||||||
Status = Cpu->RegisterInterruptHandler (Cpu, ARM_ARCH_EXCEPTION_IRQ, NULL);
|
InterruptHandler,
|
||||||
if (EFI_ERROR (Status)) {
|
&mCpuArchProtocolNotifyEventRegistration);
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Register to receive interrupts
|
|
||||||
Status = Cpu->RegisterInterruptHandler (
|
|
||||||
Cpu,
|
|
||||||
ARM_ARCH_EXCEPTION_IRQ,
|
|
||||||
InterruptHandler
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Register for an ExitBootServicesEvent
|
// Register for an ExitBootServicesEvent
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
|
@@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Library/IoLib.h>
|
#include <Library/IoLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Library/UefiLib.h>
|
||||||
|
|
||||||
#include <Protocol/Cpu.h>
|
#include <Protocol/Cpu.h>
|
||||||
#include <Protocol/HardwareInterrupt.h>
|
#include <Protocol/HardwareInterrupt.h>
|
||||||
|
@@ -45,11 +45,12 @@
|
|||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
IoLib
|
IoLib
|
||||||
PcdLib
|
PcdLib
|
||||||
|
UefiLib
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gHardwareInterruptProtocolGuid
|
gHardwareInterruptProtocolGuid ## PRODUCES
|
||||||
gHardwareInterrupt2ProtocolGuid
|
gHardwareInterrupt2ProtocolGuid ## PRODUCES
|
||||||
gEfiCpuArchProtocolGuid
|
gEfiCpuArchProtocolGuid ## CONSUMES ## NOTIFY
|
||||||
|
|
||||||
[Pcd.common]
|
[Pcd.common]
|
||||||
gArmTokenSpaceGuid.PcdGicDistributorBase
|
gArmTokenSpaceGuid.PcdGicDistributorBase
|
||||||
@@ -58,4 +59,4 @@
|
|||||||
gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy
|
gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiCpuArchProtocolGuid
|
TRUE
|
||||||
|
46
ArmPkg/Drivers/ArmScmiDxe/ArmScmiBaseProtocolPrivate.h
Normal file
46
ArmPkg/Drivers/ArmScmiDxe/ArmScmiBaseProtocolPrivate.h
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef ARM_SCMI_BASE_PROTOCOL_PRIVATE_H_
|
||||||
|
#define ARM_SCMI_BASE_PROTOCOL_PRIVATE_H_
|
||||||
|
|
||||||
|
// Return values of BASE_DISCOVER_LIST_PROTOCOLS command.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 NumProtocols;
|
||||||
|
|
||||||
|
// Array of four protocols in each element
|
||||||
|
// Total elements = 1 + (NumProtocols-1)/4
|
||||||
|
|
||||||
|
// NOTE: Since EDK2 does not allow flexible array member [] we declare
|
||||||
|
// here array of 1 element length. However below is used as a variable
|
||||||
|
// length array.
|
||||||
|
UINT8 Protocols[1];
|
||||||
|
} BASE_DISCOVER_LIST;
|
||||||
|
|
||||||
|
/** Initialize Base protocol and install protocol on a given handle.
|
||||||
|
|
||||||
|
@param[in] Handle Handle to install Base protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Base protocol interface installed
|
||||||
|
successfully.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiBaseProtocolInit (
|
||||||
|
IN OUT EFI_HANDLE* Handle
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif /* ARM_SCMI_BASE_PROTOCOL_PRIVATE_H_ */
|
84
ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h
Normal file
84
ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef ARM_SCMI_CLOCK_PROTOCOL_PRIVATE_H_
|
||||||
|
#define ARM_SCMI_CLOCK_PROTOCOL_PRIVATE_H_
|
||||||
|
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
// Clock rate in two 32bit words.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 Low;
|
||||||
|
UINT32 High;
|
||||||
|
} CLOCK_RATE_DWORD;
|
||||||
|
|
||||||
|
// Format of the returned rate array. Linear or Non-linear,.RatesFlag Bit[12]
|
||||||
|
#define RATE_FORMAT_SHIFT 12
|
||||||
|
#define RATE_FORMAT_MASK 0x0001
|
||||||
|
#define RATE_FORMAT(RatesFlags) ((RatesFlags >> RATE_FORMAT_SHIFT) \
|
||||||
|
& RATE_FORMAT_MASK)
|
||||||
|
|
||||||
|
// Number of remaining rates after a call to the SCP, RatesFlag Bits[31:16]
|
||||||
|
#define NUM_REMAIN_RATES_SHIFT 16
|
||||||
|
#define NUM_REMAIN_RATES(RatesFlags) ((RatesFlags >> NUM_REMAIN_RATES_SHIFT))
|
||||||
|
|
||||||
|
// Number of rates that are returned by a call.to the SCP, RatesFlag Bits[11:0]
|
||||||
|
#define NUM_RATES_MASK 0x0FFF
|
||||||
|
#define NUM_RATES(RatesFlags) (RatesFlags & NUM_RATES_MASK)
|
||||||
|
|
||||||
|
// Return values for the CLOCK_DESCRIBER_RATE command.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 NumRatesFlags;
|
||||||
|
|
||||||
|
// NOTE: Since EDK2 does not allow flexible array member [] we declare
|
||||||
|
// here array of 1 element length. However below is used as a variable
|
||||||
|
// length array.
|
||||||
|
CLOCK_RATE_DWORD Rates[1];
|
||||||
|
} CLOCK_DESCRIBE_RATES;
|
||||||
|
|
||||||
|
#define CLOCK_SET_DEFAULT_FLAGS 0
|
||||||
|
|
||||||
|
// Message parameters for CLOCK_RATE_SET command.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 Flags;
|
||||||
|
UINT32 ClockId;
|
||||||
|
CLOCK_RATE_DWORD Rate;
|
||||||
|
} CLOCK_RATE_SET_ATTRIBUTES;
|
||||||
|
|
||||||
|
// if ClockAttr Bit[0] is set then clock device is enabled.
|
||||||
|
#define CLOCK_ENABLE_MASK 0x1
|
||||||
|
#define CLOCK_ENABLED(ClockAttr) ((ClockAttr & CLOCK_ENABLE_MASK) == 1)
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
UINT32 Attributes;
|
||||||
|
UINT8 ClockName[SCMI_MAX_STR_LEN];
|
||||||
|
} CLOCK_ATTRIBUTES;
|
||||||
|
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
|
/** Initialize clock management protocol and install protocol on a given handle.
|
||||||
|
|
||||||
|
@param[in] Handle Handle to install clock management protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Clock protocol interface installed successfully.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiClockProtocolInit (
|
||||||
|
IN EFI_HANDLE *Handle
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif /* ARM_SCMI_CLOCK_PROTOCOL_PRIVATE_H_ */
|
53
ArmPkg/Drivers/ArmScmiDxe/ArmScmiDxe.inf
Normal file
53
ArmPkg/Drivers/ArmScmiDxe/ArmScmiDxe.inf
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
#/** @file
|
||||||
|
#
|
||||||
|
# Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
# System Control and Management Interface V1.0
|
||||||
|
# http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
# DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
#**/
|
||||||
|
|
||||||
|
[Defines]
|
||||||
|
INF_VERSION = 0x00010019
|
||||||
|
BASE_NAME = ArmScmiDxe
|
||||||
|
FILE_GUID = 9585984C-F027-45E9-AFDF-ADAA6DFAAAC7
|
||||||
|
MODULE_TYPE = DXE_DRIVER
|
||||||
|
VERSION_STRING = 1.0
|
||||||
|
ENTRY_POINT = ArmScmiDxeEntryPoint
|
||||||
|
|
||||||
|
[Sources.common]
|
||||||
|
Scmi.c
|
||||||
|
ScmiBaseProtocol.c
|
||||||
|
ScmiClockProtocol.c
|
||||||
|
ScmiDxe.c
|
||||||
|
ScmiPerformanceProtocol.c
|
||||||
|
|
||||||
|
[Packages]
|
||||||
|
ArmPkg/ArmPkg.dec
|
||||||
|
ArmPlatformPkg/ArmPlatformPkg.dec
|
||||||
|
MdePkg/MdePkg.dec
|
||||||
|
|
||||||
|
[LibraryClasses]
|
||||||
|
ArmLib
|
||||||
|
ArmMtlLib
|
||||||
|
DebugLib
|
||||||
|
IoLib
|
||||||
|
UefiBootServicesTableLib
|
||||||
|
UefiDriverEntryPoint
|
||||||
|
|
||||||
|
[Protocols]
|
||||||
|
gArmScmiBaseProtocolGuid
|
||||||
|
gArmScmiClockProtocolGuid
|
||||||
|
gArmScmiPerformanceProtocolGuid
|
||||||
|
|
||||||
|
[Depex]
|
||||||
|
TRUE
|
||||||
|
|
@@ -0,0 +1,55 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef ARM_SCMI_PERFORMANCE_PROTOCOL_PRIVATE_H_
|
||||||
|
#define ARM_SCMI_PERFORMANCE_PROTOCOL_PRIVATE_H_
|
||||||
|
|
||||||
|
#include <Protocol/ArmScmiPerformanceProtocol.h>
|
||||||
|
|
||||||
|
// Number of performance levels returned by a call to the SCP, Lvls Bits[11:0]
|
||||||
|
#define NUM_PERF_LEVELS_MASK 0x0FFF
|
||||||
|
#define NUM_PERF_LEVELS(Lvls) (Lvls & NUM_PERF_LEVELS_MASK)
|
||||||
|
|
||||||
|
// Number of performance levels remaining after a call to the SCP, Lvls Bits[31:16]
|
||||||
|
#define NUM_REMAIN_PERF_LEVELS_SHIFT 16
|
||||||
|
#define NUM_REMAIN_PERF_LEVELS(Lvls) (Lvls >> NUM_REMAIN_PERF_LEVELS_SHIFT)
|
||||||
|
|
||||||
|
/** Return values for SCMI_MESSAGE_ID_PERFORMANCE_DESCRIBE_LEVELS command.
|
||||||
|
SCMI Spec <20> 4.5.2.5
|
||||||
|
**/
|
||||||
|
typedef struct {
|
||||||
|
UINT32 NumLevels;
|
||||||
|
|
||||||
|
// NOTE: Since EDK2 does not allow flexible array member [] we declare
|
||||||
|
// here array of 1 element length. However below is used as a variable
|
||||||
|
// length array.
|
||||||
|
SCMI_PERFORMANCE_LEVEL PerfLevel[1]; // Offset to array of performance levels
|
||||||
|
} PERF_DESCRIBE_LEVELS;
|
||||||
|
|
||||||
|
/** Initialize performance management protocol and install on a given Handle.
|
||||||
|
|
||||||
|
@param[in] Handle Handle to install performance management
|
||||||
|
protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance protocol installed successfully.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiPerformanceProtocolInit (
|
||||||
|
IN EFI_HANDLE* Handle
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif /* ARM_SCMI_PERFORMANCE_PROTOCOL_PRIVATE_H_ */
|
257
ArmPkg/Drivers/ArmScmiDxe/Scmi.c
Normal file
257
ArmPkg/Drivers/ArmScmiDxe/Scmi.c
Normal file
@@ -0,0 +1,257 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <Library/ArmMtlLib.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/MemoryAllocationLib.h>
|
||||||
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
|
||||||
|
#include "ScmiPrivate.h"
|
||||||
|
|
||||||
|
// Arbitrary timeout value 20ms.
|
||||||
|
#define RESPONSE_TIMEOUT 20000
|
||||||
|
|
||||||
|
/** Return a pointer to the message payload.
|
||||||
|
|
||||||
|
@param[out] Payload Holds pointer to the message payload.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Payload holds a valid message payload pointer.
|
||||||
|
@retval EFI_TIMEOUT Time out error if MTL channel is busy.
|
||||||
|
@retval EFI_UNSUPPORTED If MTL channel is unsupported.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiCommandGetPayload (
|
||||||
|
OUT UINT32** Payload
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
MTL_CHANNEL *Channel;
|
||||||
|
|
||||||
|
// Get handle to the Channel.
|
||||||
|
Status = MtlGetChannel (MTL_CHANNEL_TYPE_LOW, &Channel);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Payload will not be populated until channel is free.
|
||||||
|
Status = MtlWaitUntilChannelFree (Channel, RESPONSE_TIMEOUT);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the address of the payload.
|
||||||
|
*Payload = MtlGetChannelPayload (Channel);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Execute a SCMI command and receive a response.
|
||||||
|
|
||||||
|
This function uses a MTL channel to transfer message to SCP
|
||||||
|
and waits for a response.
|
||||||
|
|
||||||
|
@param[in] Command Pointer to the SCMI command (Protocol ID
|
||||||
|
and Message ID)
|
||||||
|
|
||||||
|
@param[in,out] PayloadLength SCMI command message length.
|
||||||
|
|
||||||
|
@param[out] OPTIONAL ReturnValues Pointer to SCMI response.
|
||||||
|
|
||||||
|
@retval OUT EFI_SUCCESS Command sent and message received successfully.
|
||||||
|
@retval OUT EFI_UNSUPPORTED Channel not supported.
|
||||||
|
@retval OUT EFI_TIMEOUT Timeout on the channel.
|
||||||
|
@retval OUT EFI_DEVICE_ERROR Channel not ready.
|
||||||
|
@retval OUT EFI_DEVICE_ERROR Message Header corrupted.
|
||||||
|
@retval OUT EFI_DEVICE_ERROR SCMI error.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiCommandExecute (
|
||||||
|
IN SCMI_COMMAND *Command,
|
||||||
|
IN OUT UINT32 *PayloadLength,
|
||||||
|
OUT UINT32 **ReturnValues OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
SCMI_MESSAGE_RESPONSE *Response;
|
||||||
|
UINT32 MessageHeader;
|
||||||
|
UINT32 ResponseHeader;
|
||||||
|
MTL_CHANNEL *Channel;
|
||||||
|
|
||||||
|
ASSERT (PayloadLength != NULL);
|
||||||
|
|
||||||
|
Status = MtlGetChannel (MTL_CHANNEL_TYPE_LOW, &Channel);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fill in message header.
|
||||||
|
MessageHeader = SCMI_MESSAGE_HEADER (
|
||||||
|
Command->MessageId,
|
||||||
|
SCMI_MESSAGE_TYPE_COMMAND,
|
||||||
|
Command->ProtocolId
|
||||||
|
);
|
||||||
|
|
||||||
|
// Send payload using MTL channel.
|
||||||
|
Status = MtlSendMessage (
|
||||||
|
Channel,
|
||||||
|
MessageHeader,
|
||||||
|
*PayloadLength
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wait for the response on the channel.
|
||||||
|
Status = MtlReceiveMessage (Channel, &ResponseHeader, PayloadLength);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SCMI must return MessageHeader unmodified.
|
||||||
|
if (MessageHeader != ResponseHeader) {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return EFI_DEVICE_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
Response = (SCMI_MESSAGE_RESPONSE*)MtlGetChannelPayload (Channel);
|
||||||
|
|
||||||
|
if (Response->Status != SCMI_SUCCESS) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "SCMI error: ProtocolId = 0x%x, MessageId = 0x%x, error = %d\n",
|
||||||
|
Command->ProtocolId,
|
||||||
|
Command->MessageId,
|
||||||
|
Response->Status
|
||||||
|
));
|
||||||
|
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return EFI_DEVICE_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReturnValues != NULL) {
|
||||||
|
*ReturnValues = Response->ReturnValues;
|
||||||
|
}
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Internal common function useful for common protocol discovery messages.
|
||||||
|
|
||||||
|
@param[in] ProtocolId Protocol Id of the the protocol.
|
||||||
|
@param[in] MesaageId Message Id of the message.
|
||||||
|
|
||||||
|
@param[out] ReturnValues SCMI response return values.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Success with valid return values.
|
||||||
|
@retval EFI_DEVICE_ERROR SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiProtocolDiscoveryCommon (
|
||||||
|
IN SCMI_PROTOCOL_ID ProtocolId,
|
||||||
|
IN SCMI_MESSAGE_ID MessageId,
|
||||||
|
OUT UINT32 **ReturnValues
|
||||||
|
)
|
||||||
|
{
|
||||||
|
SCMI_COMMAND Command;
|
||||||
|
UINT32 PayloadLength = 0;
|
||||||
|
|
||||||
|
Command.ProtocolId = ProtocolId;
|
||||||
|
Command.MessageId = MessageId;
|
||||||
|
|
||||||
|
return ScmiCommandExecute (
|
||||||
|
&Command,
|
||||||
|
&PayloadLength,
|
||||||
|
ReturnValues
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return protocol version from SCP for a given protocol ID.
|
||||||
|
|
||||||
|
@param[in] Protocol ID Protocol ID.
|
||||||
|
@param[out] Version Pointer to version of the protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Version holds a valid version received
|
||||||
|
from the SCP.
|
||||||
|
@retval EFI_DEVICE_ERROR SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiGetProtocolVersion (
|
||||||
|
IN SCMI_PROTOCOL_ID ProtocolId,
|
||||||
|
OUT UINT32 *Version
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 *ProtocolVersion;
|
||||||
|
|
||||||
|
Status = ScmiProtocolDiscoveryCommon (
|
||||||
|
ProtocolId,
|
||||||
|
SCMI_MESSAGE_ID_PROTOCOL_VERSION,
|
||||||
|
(UINT32**)&ProtocolVersion
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*Version = *ProtocolVersion;
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return protocol attributes from SCP for a given protocol ID.
|
||||||
|
|
||||||
|
@param[in] Protocol ID Protocol ID.
|
||||||
|
@param[out] ReturnValues Pointer to attributes of the protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS ReturnValues points to protocol attributes.
|
||||||
|
@retval EFI_DEVICE_ERROR SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiGetProtocolAttributes (
|
||||||
|
IN SCMI_PROTOCOL_ID ProtocolId,
|
||||||
|
OUT UINT32 **ReturnValues
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ScmiProtocolDiscoveryCommon (
|
||||||
|
ProtocolId,
|
||||||
|
SCMI_MESSAGE_ID_PROTOCOL_ATTRIBUTES,
|
||||||
|
ReturnValues
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return protocol message attributes from SCP for a given protocol ID.
|
||||||
|
|
||||||
|
@param[in] Protocol ID Protocol ID.
|
||||||
|
@param[out] Attributes Pointer to attributes of the protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS ReturnValues points to protocol message attributes.
|
||||||
|
@retval EFI_DEVICE_ERROR SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiGetProtocolMessageAttributes (
|
||||||
|
IN SCMI_PROTOCOL_ID ProtocolId,
|
||||||
|
OUT UINT32 **ReturnValues
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ScmiProtocolDiscoveryCommon (
|
||||||
|
ProtocolId,
|
||||||
|
SCMI_MESSAGE_ID_PROTOCOL_MESSAGE_ATTRIBUTES,
|
||||||
|
ReturnValues
|
||||||
|
);
|
||||||
|
}
|
318
ArmPkg/Drivers/ArmScmiDxe/ScmiBaseProtocol.c
Normal file
318
ArmPkg/Drivers/ArmScmiDxe/ScmiBaseProtocol.c
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <Library/BaseLib.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Protocol/ArmScmiBaseProtocol.h>
|
||||||
|
|
||||||
|
#include "ArmScmiBaseProtocolPrivate.h"
|
||||||
|
#include "ScmiPrivate.h"
|
||||||
|
|
||||||
|
/** Return version of the Base protocol supported by SCP firmware.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] Version Version of the supported SCMI Base protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The version of the protocol is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
BaseGetVersion (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT32 *Version
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ScmiGetProtocolVersion (SCMI_PROTOCOL_ID_BASE, Version);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return total number of SCMI protocols supported by the SCP firmware.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] TotalProtocols Total number of SCMI protocols supported.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Total number of protocols supported are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
BaseGetTotalProtocols (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT32 *TotalProtocols
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 *ReturnValues;
|
||||||
|
|
||||||
|
Status = ScmiGetProtocolAttributes (SCMI_PROTOCOL_ID_BASE, &ReturnValues);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*TotalProtocols = SCMI_TOTAL_PROTOCOLS (ReturnValues[0]);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Common function which returns vendor details.
|
||||||
|
|
||||||
|
@param[in] MessageId SCMI_MESSAGE_ID_BASE_DISCOVER_VENDOR
|
||||||
|
OR
|
||||||
|
SCMI_MESSAGE_ID_BASE_DISCOVER_SUB_VENDOR
|
||||||
|
|
||||||
|
@param[out] VendorIdentifier ASCII name of the vendor/subvendor.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS VendorIdentifier is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
BaseDiscoverVendorDetails (
|
||||||
|
IN SCMI_MESSAGE_ID_BASE MessageId,
|
||||||
|
OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 *ReturnValues;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_BASE;
|
||||||
|
Cmd.MessageId = MessageId;
|
||||||
|
|
||||||
|
PayloadLength = 0;
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
&ReturnValues
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
AsciiStrCpyS (
|
||||||
|
(CHAR8*)VendorIdentifier,
|
||||||
|
SCMI_MAX_STR_LEN,
|
||||||
|
(CONST CHAR8*)ReturnValues
|
||||||
|
);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return vendor name.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] VendorIdentifier Null terminated ASCII string of up to
|
||||||
|
16 bytes with a vendor name.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS VendorIdentifier is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
BaseDiscoverVendor (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return BaseDiscoverVendorDetails (
|
||||||
|
SCMI_MESSAGE_ID_BASE_DISCOVER_VENDOR,
|
||||||
|
VendorIdentifier
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return sub vendor name.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] VendorIdentifier Null terminated ASCII string of up to
|
||||||
|
16 bytes with a sub vendor name.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS VendorIdentifier is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
BaseDiscoverSubVendor (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return BaseDiscoverVendorDetails (
|
||||||
|
SCMI_MESSAGE_ID_BASE_DISCOVER_SUB_VENDOR,
|
||||||
|
VendorIdentifier
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return implementation version.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] ImplementationVersion Vendor specific implementation version.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Implementation version is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
BaseDiscoverImplVersion (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT32 *ImplementationVersion
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 *ReturnValues;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_BASE;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_BASE_DISCOVER_IMPLEMENTATION_VERSION;
|
||||||
|
|
||||||
|
PayloadLength = 0;
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
&ReturnValues
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*ImplementationVersion = ReturnValues[0];
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return list of protocols.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] ProtocolListSize Size of the ProtocolList.
|
||||||
|
|
||||||
|
@param[out] ProtocolList Protocol list.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS List of protocols is returned.
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL ProtocolListSize is too small for the result.
|
||||||
|
It has been updated to the size needed.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
BaseDiscoverListProtocols (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
IN OUT UINT32 *ProtocolListSize,
|
||||||
|
OUT UINT8 *ProtocolList
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 TotalProtocols;
|
||||||
|
UINT32 *MessageParams;
|
||||||
|
BASE_DISCOVER_LIST *DiscoverList;
|
||||||
|
UINT32 Skip;
|
||||||
|
UINT32 Index;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
UINT32 RequiredSize;
|
||||||
|
|
||||||
|
Status = BaseGetTotalProtocols (This, &TotalProtocols);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
RequiredSize = sizeof (UINT8) * TotalProtocols;
|
||||||
|
if (*ProtocolListSize < RequiredSize) {
|
||||||
|
*ProtocolListSize = RequiredSize;
|
||||||
|
return EFI_BUFFER_TOO_SMALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_BASE;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_BASE_DISCOVER_LIST_PROTOCOLS;
|
||||||
|
|
||||||
|
Skip = 0;
|
||||||
|
|
||||||
|
while (Skip < TotalProtocols) {
|
||||||
|
|
||||||
|
*MessageParams = Skip;
|
||||||
|
|
||||||
|
// Note PayloadLength is a IN/OUT parameter.
|
||||||
|
PayloadLength = sizeof (Skip);
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
(UINT32**)&DiscoverList
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Index = 0; Index < DiscoverList->NumProtocols; Index++) {
|
||||||
|
ProtocolList[Skip++] = DiscoverList->Protocols[Index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*ProtocolListSize = RequiredSize;
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Instance of the SCMI Base protocol.
|
||||||
|
STATIC CONST SCMI_BASE_PROTOCOL BaseProtocol = {
|
||||||
|
BaseGetVersion,
|
||||||
|
BaseGetTotalProtocols,
|
||||||
|
BaseDiscoverVendor,
|
||||||
|
BaseDiscoverSubVendor,
|
||||||
|
BaseDiscoverImplVersion,
|
||||||
|
BaseDiscoverListProtocols
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Initialize Base protocol and install protocol on a given handle.
|
||||||
|
|
||||||
|
@param[in] Handle Handle to install Base protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Base protocol interface installed
|
||||||
|
successfully.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiBaseProtocolInit (
|
||||||
|
IN OUT EFI_HANDLE* Handle
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
Handle,
|
||||||
|
&gArmScmiBaseProtocolGuid,
|
||||||
|
&BaseProtocol,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
418
ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
Normal file
418
ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
Normal file
@@ -0,0 +1,418 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <Library/BaseLib.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Protocol/ArmScmiClockProtocol.h>
|
||||||
|
|
||||||
|
#include "ArmScmiClockProtocolPrivate.h"
|
||||||
|
#include "ScmiPrivate.h"
|
||||||
|
|
||||||
|
/** Convert to 64 bit value from two 32 bit words.
|
||||||
|
|
||||||
|
@param[in] Low Lower 32 bits.
|
||||||
|
@param[in] High Higher 32 bits.
|
||||||
|
|
||||||
|
@retval UINT64 64 bit value.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
UINT64
|
||||||
|
ConvertTo64Bit (
|
||||||
|
IN UINT32 Low,
|
||||||
|
IN UINT32 High
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return (Low | ((UINT64)High << 32));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return version of the clock management protocol supported by SCP firmware.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] Version Version of the supported SCMI Clock management protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The version is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
ClockGetVersion (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
OUT UINT32 *Version
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ScmiGetProtocolVersion (SCMI_PROTOCOL_ID_CLOCK, Version);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return total number of clock devices supported by the clock management
|
||||||
|
protocol.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] TotalClocks Total number of clocks supported.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Total number of clocks supported is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
ClockGetTotalClocks (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
OUT UINT32 *TotalClocks
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 *ReturnValues;
|
||||||
|
|
||||||
|
Status = ScmiGetProtocolAttributes (SCMI_PROTOCOL_ID_CLOCK, &ReturnValues);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*TotalClocks = SCMI_CLOCK_PROTOCOL_TOTAL_CLKS (ReturnValues[0]);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return attributes of a clock device.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
@param[in] ClockId Identifier for the clock device.
|
||||||
|
|
||||||
|
@param[out] Enabled If TRUE, the clock device is enabled.
|
||||||
|
@param[out] ClockAsciiName A NULL terminated ASCII string with the clock
|
||||||
|
name, of up to 16 bytes.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Clock device attributes are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
ClockGetClockAttributes (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
IN UINT32 ClockId,
|
||||||
|
OUT BOOLEAN *Enabled,
|
||||||
|
OUT CHAR8 *ClockAsciiName
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
UINT32 *MessageParams;
|
||||||
|
CLOCK_ATTRIBUTES *ClockAttributes;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*MessageParams = ClockId;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_CLOCK;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_CLOCK_ATTRIBUTES;
|
||||||
|
|
||||||
|
PayloadLength = sizeof (ClockId);
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
(UINT32**)&ClockAttributes
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
// TRUE if bit 0 of ClockAttributes->Attributes is set.
|
||||||
|
*Enabled = CLOCK_ENABLED (ClockAttributes->Attributes);
|
||||||
|
|
||||||
|
AsciiStrCpyS (
|
||||||
|
ClockAsciiName,
|
||||||
|
SCMI_MAX_STR_LEN,
|
||||||
|
(CONST CHAR8*)ClockAttributes->ClockName
|
||||||
|
);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return list of rates supported by a given clock device.
|
||||||
|
|
||||||
|
@param[in] This A pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
@param[in] ClockId Identifier for the clock device.
|
||||||
|
|
||||||
|
@param[out] Format SCMI_CLOCK_RATE_FORMAT_DISCRETE: Clock device
|
||||||
|
supports range of clock rates which are non-linear.
|
||||||
|
|
||||||
|
SCMI_CLOCK_RATE_FORMAT_LINEAR: Clock device supports
|
||||||
|
range of linear clock rates from Min to Max in steps.
|
||||||
|
|
||||||
|
@param[out] TotalRates Total number of rates.
|
||||||
|
|
||||||
|
@param[in,out] RateArraySize Size of the RateArray.
|
||||||
|
|
||||||
|
@param[out] RateArray List of clock rates.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS List of clock rates is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL RateArraySize is too small for the result.
|
||||||
|
It has been updated to the size needed.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
ClockDescribeRates (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
IN UINT32 ClockId,
|
||||||
|
OUT SCMI_CLOCK_RATE_FORMAT *Format,
|
||||||
|
OUT UINT32 *TotalRates,
|
||||||
|
IN OUT UINT32 *RateArraySize,
|
||||||
|
OUT SCMI_CLOCK_RATE *RateArray
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 *MessageParams;
|
||||||
|
CLOCK_DESCRIBE_RATES *DescribeRates;
|
||||||
|
CLOCK_RATE_DWORD *Rate;
|
||||||
|
|
||||||
|
UINT32 RequiredArraySize = 0;
|
||||||
|
UINT32 RateIndex = 0;
|
||||||
|
UINT32 RateNo;
|
||||||
|
UINT32 RateOffset;
|
||||||
|
|
||||||
|
*TotalRates = 0;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_CLOCK;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_CLOCK_DESCRIBE_RATES;
|
||||||
|
|
||||||
|
*MessageParams++ = ClockId;
|
||||||
|
|
||||||
|
do {
|
||||||
|
|
||||||
|
*MessageParams = RateIndex;
|
||||||
|
|
||||||
|
// Set Payload length, note PayloadLength is a IN/OUT parameter.
|
||||||
|
PayloadLength = sizeof (ClockId) + sizeof (RateIndex);
|
||||||
|
|
||||||
|
// Execute and wait for response on a SCMI channel.
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
(UINT32**)&DescribeRates
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*TotalRates == 0) {
|
||||||
|
// In the first iteration we will get number of returned rates and number
|
||||||
|
// of remaining rates. With this information calculate required size
|
||||||
|
// for rate array. If provided RateArraySize is less, return an
|
||||||
|
// error.
|
||||||
|
|
||||||
|
*Format = RATE_FORMAT (DescribeRates->NumRatesFlags);
|
||||||
|
|
||||||
|
*TotalRates = NUM_RATES (DescribeRates->NumRatesFlags)
|
||||||
|
+ NUM_REMAIN_RATES (DescribeRates->NumRatesFlags);
|
||||||
|
|
||||||
|
if (*Format == SCMI_CLOCK_RATE_FORMAT_DISCRETE) {
|
||||||
|
RequiredArraySize = (*TotalRates) * sizeof (UINT64);
|
||||||
|
} else {
|
||||||
|
// We need to return triplet of 64 bit value for each rate
|
||||||
|
RequiredArraySize = (*TotalRates) * 3 * sizeof (UINT64);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RequiredArraySize > (*RateArraySize)) {
|
||||||
|
*RateArraySize = RequiredArraySize;
|
||||||
|
return EFI_BUFFER_TOO_SMALL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RateOffset = 0;
|
||||||
|
|
||||||
|
if (*Format == SCMI_CLOCK_RATE_FORMAT_DISCRETE) {
|
||||||
|
for (RateNo = 0; RateNo < NUM_RATES (DescribeRates->NumRatesFlags); RateNo++) {
|
||||||
|
Rate = &DescribeRates->Rates[RateOffset++];
|
||||||
|
// Non-linear discrete rates.
|
||||||
|
RateArray[RateIndex++].Rate = ConvertTo64Bit (Rate->Low, Rate->High);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (RateNo = 0; RateNo < NUM_RATES (DescribeRates->NumRatesFlags); RateNo++) {
|
||||||
|
// Linear clock rates from minimum to maximum in steps
|
||||||
|
// Minimum clock rate.
|
||||||
|
Rate = &DescribeRates->Rates[RateOffset++];
|
||||||
|
RateArray[RateIndex].Min = ConvertTo64Bit (Rate->Low, Rate->High);
|
||||||
|
|
||||||
|
Rate = &DescribeRates->Rates[RateOffset++];
|
||||||
|
// Maximum clock rate.
|
||||||
|
RateArray[RateIndex].Max = ConvertTo64Bit (Rate->Low, Rate->High);
|
||||||
|
|
||||||
|
Rate = &DescribeRates->Rates[RateOffset++];
|
||||||
|
// Step.
|
||||||
|
RateArray[RateIndex++].Step = ConvertTo64Bit (Rate->Low, Rate->High);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while (NUM_REMAIN_RATES (DescribeRates->NumRatesFlags) != 0);
|
||||||
|
|
||||||
|
// Update RateArraySize with RequiredArraySize.
|
||||||
|
*RateArraySize = RequiredArraySize;
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get clock rate.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
@param[in] ClockId Identifier for the clock device.
|
||||||
|
|
||||||
|
@param[out] Rate Clock rate.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Clock rate is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
ClockRateGet (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
IN UINT32 ClockId,
|
||||||
|
OUT UINT64 *Rate
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
UINT32 *MessageParams;
|
||||||
|
CLOCK_RATE_DWORD *ClockRate;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fill arguments for clock protocol command.
|
||||||
|
*MessageParams = ClockId;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_CLOCK;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_CLOCK_RATE_GET;
|
||||||
|
|
||||||
|
PayloadLength = sizeof (ClockId);
|
||||||
|
|
||||||
|
// Execute and wait for response on a SCMI channel.
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
(UINT32**)&ClockRate
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*Rate = ConvertTo64Bit (ClockRate->Low, ClockRate->High);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set clock rate.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
@param[in] ClockId Identifier for the clock device.
|
||||||
|
@param[in] Rate Clock rate.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Clock rate set success.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
ClockRateSet (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
IN UINT32 ClockId,
|
||||||
|
IN UINT64 Rate
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
CLOCK_RATE_SET_ATTRIBUTES *ClockRateSetAttributes;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload ((UINT32**)&ClockRateSetAttributes);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fill arguments for clock protocol command.
|
||||||
|
ClockRateSetAttributes->ClockId = ClockId;
|
||||||
|
ClockRateSetAttributes->Flags = CLOCK_SET_DEFAULT_FLAGS;
|
||||||
|
ClockRateSetAttributes->Rate.Low = (UINT32)Rate;
|
||||||
|
ClockRateSetAttributes->Rate.High = (UINT32)(Rate >> 32);
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_CLOCK;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_CLOCK_RATE_SET;
|
||||||
|
|
||||||
|
PayloadLength = sizeof (CLOCK_RATE_SET_ATTRIBUTES);
|
||||||
|
|
||||||
|
// Execute and wait for response on a SCMI channel.
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Instance of the SCMI clock management protocol.
|
||||||
|
STATIC CONST SCMI_CLOCK_PROTOCOL ScmiClockProtocol = {
|
||||||
|
ClockGetVersion,
|
||||||
|
ClockGetTotalClocks,
|
||||||
|
ClockGetClockAttributes,
|
||||||
|
ClockDescribeRates,
|
||||||
|
ClockRateGet,
|
||||||
|
ClockRateSet
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Initialize clock management protocol and install protocol on a given handle.
|
||||||
|
|
||||||
|
@param[in] Handle Handle to install clock management protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Clock protocol interface installed successfully.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiClockProtocolInit (
|
||||||
|
IN EFI_HANDLE* Handle
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
Handle,
|
||||||
|
&gArmScmiClockProtocolGuid,
|
||||||
|
&ScmiClockProtocol,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
153
ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c
Normal file
153
ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <Base.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/MemoryAllocationLib.h>
|
||||||
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Protocol/ArmScmiBaseProtocol.h>
|
||||||
|
#include <Protocol/ArmScmiClockProtocol.h>
|
||||||
|
#include <Protocol/ArmScmiPerformanceProtocol.h>
|
||||||
|
|
||||||
|
#include "ArmScmiBaseProtocolPrivate.h"
|
||||||
|
#include "ArmScmiClockProtocolPrivate.h"
|
||||||
|
#include "ArmScmiPerformanceProtocolPrivate.h"
|
||||||
|
#include "ScmiDxe.h"
|
||||||
|
#include "ScmiPrivate.h"
|
||||||
|
|
||||||
|
STATIC CONST SCMI_PROTOCOL_ENTRY Protocols[] = {
|
||||||
|
{ SCMI_PROTOCOL_ID_BASE, ScmiBaseProtocolInit },
|
||||||
|
{ SCMI_PROTOCOL_ID_PERFORMANCE, ScmiPerformanceProtocolInit },
|
||||||
|
{ SCMI_PROTOCOL_ID_CLOCK, ScmiClockProtocolInit }
|
||||||
|
};
|
||||||
|
|
||||||
|
/** ARM SCMI driver entry point function.
|
||||||
|
|
||||||
|
This function installs the SCMI Base protocol and a list of other
|
||||||
|
protocols is queried using the Base protocol. If protocol is supported,
|
||||||
|
driver will call each protocol init function to install the protocol on
|
||||||
|
the ImageHandle.
|
||||||
|
|
||||||
|
@param[in] ImageHandle Handle to this EFI Image which will be used to
|
||||||
|
install Base, Clock and Performance protocols.
|
||||||
|
@param[in] SystemTable A pointer to boot time system table.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Driver initalized successfully.
|
||||||
|
@retval EFI_UNSUPPORTED If SCMI base protocol version is not supported.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
ArmScmiDxeEntryPoint (
|
||||||
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
SCMI_BASE_PROTOCOL *BaseProtocol;
|
||||||
|
UINT32 Version;
|
||||||
|
UINT32 Index;
|
||||||
|
UINT32 NumProtocols;
|
||||||
|
UINT32 ProtocolIndex;
|
||||||
|
UINT8 *SupportedList;
|
||||||
|
UINT32 SupportedListSize;
|
||||||
|
|
||||||
|
// Every SCMI implementation must implement the base protocol.
|
||||||
|
ASSERT (Protocols[0].Id == SCMI_PROTOCOL_ID_BASE);
|
||||||
|
|
||||||
|
Status = ScmiBaseProtocolInit (&ImageHandle);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol (
|
||||||
|
&gArmScmiBaseProtocolGuid,
|
||||||
|
NULL,
|
||||||
|
(VOID**)&BaseProtocol
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get SCMI Base protocol version.
|
||||||
|
Status = BaseProtocol->GetVersion (BaseProtocol, &Version);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Version != BASE_PROTOCOL_VERSION) {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apart from Base protocol, SCMI may implement various other protocols,
|
||||||
|
// query total protocols implemented by the SCP firmware.
|
||||||
|
NumProtocols = 0;
|
||||||
|
Status = BaseProtocol->GetTotalProtocols (BaseProtocol, &NumProtocols);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASSERT (NumProtocols != 0);
|
||||||
|
|
||||||
|
SupportedListSize = (NumProtocols * sizeof (*SupportedList));
|
||||||
|
|
||||||
|
Status = gBS->AllocatePool (
|
||||||
|
EfiBootServicesData,
|
||||||
|
SupportedListSize,
|
||||||
|
(VOID**)&SupportedList
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the list of protocols supported by SCP firmware on the platform.
|
||||||
|
Status = BaseProtocol->DiscoverListProtocols (
|
||||||
|
BaseProtocol,
|
||||||
|
&SupportedListSize,
|
||||||
|
SupportedList
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
gBS->FreePool (SupportedList);
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Install supported protocol on ImageHandle.
|
||||||
|
for (ProtocolIndex = 1; ProtocolIndex < ARRAY_SIZE (Protocols);
|
||||||
|
ProtocolIndex++) {
|
||||||
|
for (Index = 0; Index < NumProtocols; Index++) {
|
||||||
|
if (Protocols[ProtocolIndex].Id == SupportedList[Index]) {
|
||||||
|
Status = Protocols[ProtocolIndex].InitFn (&ImageHandle);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gBS->FreePool (SupportedList);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
42
ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.h
Normal file
42
ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
#ifndef SCMI_DXE_H_
|
||||||
|
#define SCMI_DXE_H_
|
||||||
|
|
||||||
|
#include "ScmiPrivate.h"
|
||||||
|
|
||||||
|
#define MAX_VENDOR_LEN SCMI_MAX_STR_LEN
|
||||||
|
|
||||||
|
/** Pointer to protocol initialization function.
|
||||||
|
|
||||||
|
@param[in] Handle A pointer to the EFI_HANDLE on which the protocol
|
||||||
|
interface is to be installed.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Protocol interface installed successfully.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_PROTOCOL_INIT_FXN)(
|
||||||
|
IN EFI_HANDLE *Handle
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
SCMI_PROTOCOL_ID Id; // Protocol Id.
|
||||||
|
SCMI_PROTOCOL_INIT_FXN InitFn; // Protocol init function.
|
||||||
|
} SCMI_PROTOCOL_ENTRY;
|
||||||
|
|
||||||
|
#endif /* SCMI_DXE_H_ */
|
457
ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c
Normal file
457
ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c
Normal file
@@ -0,0 +1,457 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <Library/BaseMemoryLib.h>
|
||||||
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Protocol/ArmScmiPerformanceProtocol.h>
|
||||||
|
|
||||||
|
#include "ArmScmiPerformanceProtocolPrivate.h"
|
||||||
|
#include "ScmiPrivate.h"
|
||||||
|
|
||||||
|
/** Return version of the performance management protocol supported by SCP.
|
||||||
|
firmware.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] Version Version of the supported SCMI performance management
|
||||||
|
protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The version is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
PerformanceGetVersion (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
OUT UINT32 *Version
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ScmiGetProtocolVersion (SCMI_PROTOCOL_ID_PERFORMANCE, Version);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return protocol attributes of the performance management protocol.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] Attributes Protocol attributes.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Protocol attributes are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
PerformanceGetAttributes (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
OUT SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES *Attributes
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32* ReturnValues;
|
||||||
|
|
||||||
|
Status = ScmiGetProtocolAttributes (
|
||||||
|
SCMI_PROTOCOL_ID_PERFORMANCE,
|
||||||
|
&ReturnValues
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
CopyMem (
|
||||||
|
Attributes,
|
||||||
|
ReturnValues,
|
||||||
|
sizeof (SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES)
|
||||||
|
);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return performance domain attributes.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
|
||||||
|
@param[out] Attributes Performance domain attributes.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Domain attributes are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
PerformanceDomainAttributes (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
OUT SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES *DomainAttributes
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 *MessageParams;
|
||||||
|
UINT32 *ReturnValues;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*MessageParams = DomainId;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_PERFORMANCE;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_PERFORMANCE_DOMAIN_ATTRIBUTES;
|
||||||
|
|
||||||
|
PayloadLength = sizeof (DomainId);
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
&ReturnValues
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
CopyMem (
|
||||||
|
DomainAttributes,
|
||||||
|
ReturnValues,
|
||||||
|
sizeof (SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES)
|
||||||
|
);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return list of performance domain levels of a given domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
|
||||||
|
@param[out] NumLevels Total number of levels a domain can support.
|
||||||
|
|
||||||
|
@param[in,out] LevelArraySize Size of the performance level array.
|
||||||
|
|
||||||
|
@param[out] LevelArray Array of the performance levels.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Domain levels are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL LevelArraySize is too small for the result.
|
||||||
|
It has been updated to the size needed.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
EFI_STATUS
|
||||||
|
PerformanceDescribeLevels (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
OUT UINT32 *NumLevels,
|
||||||
|
IN OUT UINT32 *LevelArraySize,
|
||||||
|
OUT SCMI_PERFORMANCE_LEVEL *LevelArray
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32* MessageParams;
|
||||||
|
UINT32 LevelIndex;
|
||||||
|
UINT32 RequiredSize;
|
||||||
|
UINT32 LevelNo;
|
||||||
|
UINT32 ReturnNumLevels;
|
||||||
|
UINT32 ReturnRemainNumLevels;
|
||||||
|
|
||||||
|
PERF_DESCRIBE_LEVELS *Levels;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
LevelIndex = 0;
|
||||||
|
RequiredSize = 0;
|
||||||
|
|
||||||
|
*MessageParams++ = DomainId;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_PERFORMANCE;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_PERFORMANCE_DESCRIBE_LEVELS;
|
||||||
|
|
||||||
|
do {
|
||||||
|
|
||||||
|
*MessageParams = LevelIndex;
|
||||||
|
|
||||||
|
// Note, PayloadLength is an IN/OUT parameter.
|
||||||
|
PayloadLength = sizeof (DomainId) + sizeof (LevelIndex);
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
(UINT32**)&Levels
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnNumLevels = NUM_PERF_LEVELS (Levels->NumLevels);
|
||||||
|
ReturnRemainNumLevels = NUM_REMAIN_PERF_LEVELS (Levels->NumLevels);
|
||||||
|
|
||||||
|
if (RequiredSize == 0) {
|
||||||
|
*NumLevels = ReturnNumLevels + ReturnRemainNumLevels;
|
||||||
|
|
||||||
|
RequiredSize = (*NumLevels) * sizeof (SCMI_PERFORMANCE_LEVEL);
|
||||||
|
if (RequiredSize > (*LevelArraySize)) {
|
||||||
|
// Update LevelArraySize with required size.
|
||||||
|
*LevelArraySize = RequiredSize;
|
||||||
|
return EFI_BUFFER_TOO_SMALL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (LevelNo = 0; LevelNo < ReturnNumLevels; LevelNo++) {
|
||||||
|
CopyMem (
|
||||||
|
&LevelArray[LevelIndex++],
|
||||||
|
&Levels->PerfLevel[LevelNo],
|
||||||
|
sizeof (SCMI_PERFORMANCE_LEVEL)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
} while (ReturnRemainNumLevels != 0);
|
||||||
|
|
||||||
|
*LevelArraySize = RequiredSize;
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set performance limits of a domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
@param[in] Limit Performance limit to set.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance limits set successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
PerformanceLimitsSet (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
IN SCMI_PERFORMANCE_LIMITS *Limits
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 *MessageParams;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*MessageParams++ = DomainId;
|
||||||
|
*MessageParams++ = Limits->RangeMax;
|
||||||
|
*MessageParams = Limits->RangeMin;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_PERFORMANCE;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_PERFORMANCE_LIMITS_SET;
|
||||||
|
|
||||||
|
PayloadLength = sizeof (DomainId) + sizeof (SCMI_PERFORMANCE_LIMITS);
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get performance limits of a domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
|
||||||
|
@param[out] Limit Performance Limits of the domain.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance limits are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
PerformanceLimitsGet (
|
||||||
|
SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
UINT32 DomainId,
|
||||||
|
SCMI_PERFORMANCE_LIMITS *Limits
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 *MessageParams;
|
||||||
|
|
||||||
|
SCMI_PERFORMANCE_LIMITS *ReturnValues;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*MessageParams = DomainId;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_PERFORMANCE;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_PERFORMANCE_LIMITS_GET;
|
||||||
|
|
||||||
|
PayloadLength = sizeof (DomainId);
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
(UINT32**)&ReturnValues
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
Limits->RangeMax = ReturnValues->RangeMax;
|
||||||
|
Limits->RangeMin = ReturnValues->RangeMin;
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set performance level of a domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
@param[in] Level Performance level of the domain.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance level set successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
PerformanceLevelSet (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
IN UINT32 Level
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 *MessageParams;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*MessageParams++ = DomainId;
|
||||||
|
*MessageParams = Level;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_PERFORMANCE;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_PERFORMANCE_LEVEL_SET;
|
||||||
|
|
||||||
|
PayloadLength = sizeof (DomainId) + sizeof (Level);
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get performance level of a domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
|
||||||
|
@param[out] Level Performance level of the domain.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance level got successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
PerformanceLevelGet (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
OUT UINT32 *Level
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT32 PayloadLength;
|
||||||
|
SCMI_COMMAND Cmd;
|
||||||
|
UINT32 *ReturnValues;
|
||||||
|
UINT32 *MessageParams;
|
||||||
|
|
||||||
|
Status = ScmiCommandGetPayload (&MessageParams);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*MessageParams = DomainId;
|
||||||
|
|
||||||
|
Cmd.ProtocolId = SCMI_PROTOCOL_ID_PERFORMANCE;
|
||||||
|
Cmd.MessageId = SCMI_MESSAGE_ID_PERFORMANCE_LEVEL_GET;
|
||||||
|
|
||||||
|
PayloadLength = sizeof (DomainId);
|
||||||
|
|
||||||
|
Status = ScmiCommandExecute (
|
||||||
|
&Cmd,
|
||||||
|
&PayloadLength,
|
||||||
|
&ReturnValues
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*Level = *ReturnValues;
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Instance of the SCMI performance management protocol.
|
||||||
|
STATIC CONST SCMI_PERFORMANCE_PROTOCOL PerformanceProtocol = {
|
||||||
|
PerformanceGetVersion,
|
||||||
|
PerformanceGetAttributes,
|
||||||
|
PerformanceDomainAttributes,
|
||||||
|
PerformanceDescribeLevels,
|
||||||
|
PerformanceLimitsSet,
|
||||||
|
PerformanceLimitsGet,
|
||||||
|
PerformanceLevelSet,
|
||||||
|
PerformanceLevelGet
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Initialize performance management protocol and install on a given Handle.
|
||||||
|
|
||||||
|
@param[in] Handle Handle to install performance management
|
||||||
|
protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance protocol installed successfully.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiPerformanceProtocolInit (
|
||||||
|
IN EFI_HANDLE* Handle
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
Handle,
|
||||||
|
&gArmScmiPerformanceProtocolGuid,
|
||||||
|
&PerformanceProtocol,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
174
ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h
Normal file
174
ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
#ifndef SCMI_PRIVATE_H_
|
||||||
|
#define SCMI_PRIVATE_H_
|
||||||
|
|
||||||
|
// SCMI protocol IDs.
|
||||||
|
typedef enum {
|
||||||
|
SCMI_PROTOCOL_ID_BASE = 0x10,
|
||||||
|
SCMI_PROTOCOL_ID_POWER_DOMAIN = 0x11,
|
||||||
|
SCMI_PROTOCOL_ID_SYSTEM_POWER = 0x12,
|
||||||
|
SCMI_PROTOCOL_ID_PERFORMANCE = 0x13,
|
||||||
|
SCMI_PROTOCOL_ID_CLOCK = 0x14,
|
||||||
|
SCMI_PROTOCOL_ID_SENSOR = 0x15
|
||||||
|
} SCMI_PROTOCOL_ID;
|
||||||
|
|
||||||
|
// SCMI message types.
|
||||||
|
typedef enum {
|
||||||
|
SCMI_MESSAGE_TYPE_COMMAND = 0,
|
||||||
|
SCMI_MESSAGE_TYPE_DELAYED_RESPONSE = 2, // Skipping 1 is deliberate.
|
||||||
|
SCMI_MESSAGE_TYPE_NOTIFICATION = 3
|
||||||
|
} SCMI_MESSAGE_TYPE;
|
||||||
|
|
||||||
|
// SCMI response error codes.
|
||||||
|
typedef enum {
|
||||||
|
SCMI_SUCCESS = 0,
|
||||||
|
SCMI_NOT_SUPPORTED = -1,
|
||||||
|
SCMI_INVALID_PARAMETERS = -2,
|
||||||
|
SCMI_DENIED = -3,
|
||||||
|
SCMI_NOT_FOUND = -4,
|
||||||
|
SCMI_OUT_OF_RANGE = -5,
|
||||||
|
SCMI_BUSY = -6,
|
||||||
|
SCMI_COMMS_ERROR = -7,
|
||||||
|
SCMI_GENERIC_ERROR = -8,
|
||||||
|
SCMI_HARDWARE_ERROR = -9,
|
||||||
|
SCMI_PROTOCOL_ERROR = -10
|
||||||
|
} SCMI_STATUS;
|
||||||
|
|
||||||
|
// SCMI message IDs common to all protocols.
|
||||||
|
typedef enum {
|
||||||
|
SCMI_MESSAGE_ID_PROTOCOL_VERSION = 0x0,
|
||||||
|
SCMI_MESSAGE_ID_PROTOCOL_ATTRIBUTES = 0x1,
|
||||||
|
SCMI_MESSAGE_ID_PROTOCOL_MESSAGE_ATTRIBUTES = 0x2
|
||||||
|
} SCMI_MESSAGE_ID;
|
||||||
|
|
||||||
|
// Not defined in SCMI specification but will help to identify a message.
|
||||||
|
typedef struct {
|
||||||
|
SCMI_PROTOCOL_ID ProtocolId;
|
||||||
|
UINT32 MessageId;
|
||||||
|
} SCMI_COMMAND;
|
||||||
|
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
// Response to a SCMI command.
|
||||||
|
typedef struct {
|
||||||
|
INT32 Status;
|
||||||
|
UINT32 ReturnValues[];
|
||||||
|
} SCMI_MESSAGE_RESPONSE;
|
||||||
|
|
||||||
|
// Message header. MsgId[7:0], MsgType[9:8], ProtocolId[17:10]
|
||||||
|
#define MESSAGE_TYPE_SHIFT 8
|
||||||
|
#define PROTOCOL_ID_SHIFT 10
|
||||||
|
#define SCMI_MESSAGE_HEADER(MsgId, MsgType, ProtocolId) ( \
|
||||||
|
MsgType << MESSAGE_TYPE_SHIFT | \
|
||||||
|
ProtocolId << PROTOCOL_ID_SHIFT | \
|
||||||
|
MsgId \
|
||||||
|
)
|
||||||
|
// SCMI message header.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 MessageHeader;
|
||||||
|
} SCMI_MESSAGE_HEADER;
|
||||||
|
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
|
/** Return a pointer to the message payload.
|
||||||
|
|
||||||
|
@param[out] Payload Holds pointer to the message payload.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Payload holds a valid message payload pointer.
|
||||||
|
@retval EFI_TIMEOUT Time out error if MTL channel is busy.
|
||||||
|
@retval EFI_UNSUPPORTED If MTL channel is unsupported.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiCommandGetPayload (
|
||||||
|
OUT UINT32** Payload
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Execute a SCMI command and receive a response.
|
||||||
|
|
||||||
|
This function uses a MTL channel to transfer message to SCP
|
||||||
|
and waits for a response.
|
||||||
|
|
||||||
|
@param[in] Command Pointer to the SCMI command (Protocol ID
|
||||||
|
and Message ID)
|
||||||
|
|
||||||
|
@param[in,out] PayloadLength SCMI command message length.
|
||||||
|
|
||||||
|
@param[out] OPTIONAL ReturnValues Pointer to SCMI response.
|
||||||
|
|
||||||
|
@retval OUT EFI_SUCCESS Command sent and message received successfully.
|
||||||
|
@retval OUT EFI_UNSUPPORTED Channel not supported.
|
||||||
|
@retval OUT EFI_TIMEOUT Timeout on the channel.
|
||||||
|
@retval OUT EFI_DEVICE_ERROR Channel not ready.
|
||||||
|
@retval OUT EFI_DEVICE_ERROR Message Header corrupted.
|
||||||
|
@retval OUT EFI_DEVICE_ERROR SCMI error.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiCommandExecute (
|
||||||
|
IN SCMI_COMMAND *Command,
|
||||||
|
IN OUT UINT32 *PayloadLength,
|
||||||
|
OUT UINT32 **ReturnValues OPTIONAL
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return protocol version from SCP for a given protocol ID.
|
||||||
|
|
||||||
|
@param[in] Protocol ID Protocol ID.
|
||||||
|
@param[out] Version Pointer to version of the protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Version holds a valid version received
|
||||||
|
from the SCP.
|
||||||
|
@retval EFI_DEVICE_ERROR SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiGetProtocolVersion (
|
||||||
|
IN SCMI_PROTOCOL_ID ProtocolId,
|
||||||
|
OUT UINT32 *Version
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return protocol attributes from SCP for a given protocol ID.
|
||||||
|
|
||||||
|
@param[in] Protocol ID Protocol ID.
|
||||||
|
@param[out] ReturnValues Pointer to attributes of the protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS ReturnValues points to protocol attributes.
|
||||||
|
@retval EFI_DEVICE_ERROR SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiGetProtocolAttributes (
|
||||||
|
IN SCMI_PROTOCOL_ID ProtocolId,
|
||||||
|
OUT UINT32 **ReturnValues
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return protocol message attributes from SCP for a given protocol ID.
|
||||||
|
|
||||||
|
@param[in] Protocol ID Protocol ID.
|
||||||
|
|
||||||
|
@param[out] Attributes Pointer to attributes of the protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS ReturnValues points to protocol message attributes.
|
||||||
|
@retval EFI_DEVICE_ERROR SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
ScmiGetProtocolMessageAttributes (
|
||||||
|
IN SCMI_PROTOCOL_ID ProtocolId,
|
||||||
|
OUT UINT32 **ReturnValues
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif /* SCMI_PRIVATE_H_ */
|
@@ -35,7 +35,6 @@
|
|||||||
#include <Guid/DebugImageInfoTable.h>
|
#include <Guid/DebugImageInfoTable.h>
|
||||||
#include <Protocol/Cpu.h>
|
#include <Protocol/Cpu.h>
|
||||||
#include <Protocol/DebugSupport.h>
|
#include <Protocol/DebugSupport.h>
|
||||||
#include <Protocol/DebugSupportPeriodicCallback.h>
|
|
||||||
#include <Protocol/LoadedImage.h>
|
#include <Protocol/LoadedImage.h>
|
||||||
|
|
||||||
extern BOOLEAN mIsFlushingGCD;
|
extern BOOLEAN mIsFlushingGCD;
|
||||||
|
@@ -60,7 +60,6 @@
|
|||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiCpuArchProtocolGuid
|
gEfiCpuArchProtocolGuid
|
||||||
gEfiDebugSupportPeriodicCallbackProtocolGuid
|
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiDebugImageInfoTableGuid
|
gEfiDebugImageInfoTableGuid
|
||||||
@@ -72,8 +71,7 @@
|
|||||||
gArmTokenSpaceGuid.PcdVFPEnabled
|
gArmTokenSpaceGuid.PcdVFPEnabled
|
||||||
|
|
||||||
[FeaturePcd.common]
|
[FeaturePcd.common]
|
||||||
gArmTokenSpaceGuid.PcdCpuDxeProduceDebugSupport
|
|
||||||
gArmTokenSpaceGuid.PcdDebuggerExceptionSupport
|
gArmTokenSpaceGuid.PcdDebuggerExceptionSupport
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
gHardwareInterruptProtocolGuid OR gHardwareInterrupt2ProtocolGuid
|
||||||
|
@@ -20,7 +20,8 @@
|
|||||||
// Control Frame:
|
// Control Frame:
|
||||||
#define GENERIC_WDOG_CONTROL_STATUS_REG ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x000)
|
#define GENERIC_WDOG_CONTROL_STATUS_REG ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x000)
|
||||||
#define GENERIC_WDOG_OFFSET_REG ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x008)
|
#define GENERIC_WDOG_OFFSET_REG ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x008)
|
||||||
#define GENERIC_WDOG_COMPARE_VALUE_REG ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x010)
|
#define GENERIC_WDOG_COMPARE_VALUE_REG_LOW ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x010)
|
||||||
|
#define GENERIC_WDOG_COMPARE_VALUE_REG_HIGH ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x014)
|
||||||
|
|
||||||
// Values of bit 0 of the Control/Status Register
|
// Values of bit 0 of the Control/Status Register
|
||||||
#define GENERIC_WDOG_ENABLED 1
|
#define GENERIC_WDOG_ENABLED 1
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-2017, ARM Limited. All rights reserved.
|
* Copyright (c) 2013-2018, ARM Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are licensed and made available under the terms and conditions of the BSD
|
* are licensed and made available under the terms and conditions of the BSD
|
||||||
@@ -43,36 +43,37 @@ UINT64 mNumTimerTicks = 0;
|
|||||||
|
|
||||||
EFI_HARDWARE_INTERRUPT2_PROTOCOL *mInterruptProtocol;
|
EFI_HARDWARE_INTERRUPT2_PROTOCOL *mInterruptProtocol;
|
||||||
|
|
||||||
EFI_STATUS
|
VOID
|
||||||
WatchdogWriteOffsetRegister (
|
WatchdogWriteOffsetRegister (
|
||||||
UINT32 Value
|
UINT32 Value
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return MmioWrite32 (GENERIC_WDOG_OFFSET_REG, Value);
|
MmioWrite32 (GENERIC_WDOG_OFFSET_REG, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
VOID
|
||||||
WatchdogWriteCompareRegister (
|
WatchdogWriteCompareRegister (
|
||||||
UINT64 Value
|
UINT64 Value
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return MmioWrite64 (GENERIC_WDOG_COMPARE_VALUE_REG, Value);
|
MmioWrite32 (GENERIC_WDOG_COMPARE_VALUE_REG_LOW, Value & MAX_UINT32);
|
||||||
|
MmioWrite32 (GENERIC_WDOG_COMPARE_VALUE_REG_HIGH, (Value >> 32) & MAX_UINT32);
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
VOID
|
||||||
WatchdogEnable (
|
WatchdogEnable (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return MmioWrite32 (GENERIC_WDOG_CONTROL_STATUS_REG, GENERIC_WDOG_ENABLED);
|
MmioWrite32 (GENERIC_WDOG_CONTROL_STATUS_REG, GENERIC_WDOG_ENABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
VOID
|
||||||
WatchdogDisable (
|
WatchdogDisable (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return MmioWrite32 (GENERIC_WDOG_CONTROL_STATUS_REG, GENERIC_WDOG_DISABLED);
|
MmioWrite32 (GENERIC_WDOG_CONTROL_STATUS_REG, GENERIC_WDOG_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** On exiting boot services we must make sure the Watchdog Timer
|
/** On exiting boot services we must make sure the Watchdog Timer
|
||||||
@@ -163,9 +164,7 @@ WatchdogRegisterHandler (
|
|||||||
then the watchdog timer is disabled.
|
then the watchdog timer is disabled.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The watchdog timer has been programmed to fire
|
@retval EFI_SUCCESS The watchdog timer has been programmed to fire
|
||||||
in Time 100ns units.
|
in TimerPeriod 100ns units.
|
||||||
@retval EFI_DEVICE_ERROR A watchdog timer could not be programmed due
|
|
||||||
to a device error.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -176,12 +175,12 @@ WatchdogSetTimerPeriod (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN SystemCount;
|
UINTN SystemCount;
|
||||||
EFI_STATUS Status;
|
|
||||||
|
|
||||||
// if TimerPeriod is 0, this is a request to stop the watchdog.
|
// if TimerPeriod is 0, this is a request to stop the watchdog.
|
||||||
if (TimerPeriod == 0) {
|
if (TimerPeriod == 0) {
|
||||||
mNumTimerTicks = 0;
|
mNumTimerTicks = 0;
|
||||||
return WatchdogDisable ();
|
WatchdogDisable ();
|
||||||
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Work out how many timer ticks will equate to TimerPeriod
|
// Work out how many timer ticks will equate to TimerPeriod
|
||||||
@@ -195,19 +194,16 @@ WatchdogSetTimerPeriod (
|
|||||||
because enabling the watchdog causes an "explicit refresh", which
|
because enabling the watchdog causes an "explicit refresh", which
|
||||||
clobbers the compare register (WCV). In order to make sure this doesn't
|
clobbers the compare register (WCV). In order to make sure this doesn't
|
||||||
trigger an interrupt, set the offset to max. */
|
trigger an interrupt, set the offset to max. */
|
||||||
Status = WatchdogWriteOffsetRegister (MAX_UINT32);
|
WatchdogWriteOffsetRegister (MAX_UINT32);
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
WatchdogEnable ();
|
WatchdogEnable ();
|
||||||
SystemCount = ArmGenericTimerGetSystemCount ();
|
SystemCount = ArmGenericTimerGetSystemCount ();
|
||||||
Status = WatchdogWriteCompareRegister (SystemCount + mNumTimerTicks);
|
WatchdogWriteCompareRegister (SystemCount + mNumTimerTicks);
|
||||||
} else {
|
} else {
|
||||||
Status = WatchdogWriteOffsetRegister ((UINT32)mNumTimerTicks);
|
WatchdogWriteOffsetRegister ((UINT32)mNumTimerTicks);
|
||||||
WatchdogEnable ();
|
WatchdogEnable ();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -306,12 +306,13 @@ TimerInterruptHandler (
|
|||||||
//
|
//
|
||||||
OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
|
|
||||||
|
// Signal end of interrupt early to help avoid losing subsequent ticks
|
||||||
|
// from long duration handlers
|
||||||
|
gInterrupt->EndOfInterrupt (gInterrupt, Source);
|
||||||
|
|
||||||
// Check if the timer interrupt is active
|
// Check if the timer interrupt is active
|
||||||
if ((ArmGenericTimerGetTimerCtrlReg () ) & ARM_ARCH_TIMER_ISTATUS) {
|
if ((ArmGenericTimerGetTimerCtrlReg () ) & ARM_ARCH_TIMER_ISTATUS) {
|
||||||
|
|
||||||
// Signal end of interrupt early to help avoid losing subsequent ticks from long duration handlers
|
|
||||||
gInterrupt->EndOfInterrupt (gInterrupt, Source);
|
|
||||||
|
|
||||||
if (mTimerNotifyFunction) {
|
if (mTimerNotifyFunction) {
|
||||||
mTimerNotifyFunction (mTimerPeriod * mElapsedPeriod);
|
mTimerNotifyFunction (mTimerPeriod * mElapsedPeriod);
|
||||||
}
|
}
|
||||||
@@ -336,12 +337,10 @@ TimerInterruptHandler (
|
|||||||
|
|
||||||
// Set next compare value
|
// Set next compare value
|
||||||
ArmGenericTimerSetCompareVal (CompareValue);
|
ArmGenericTimerSetCompareVal (CompareValue);
|
||||||
ArmGenericTimerEnableTimer ();
|
ArmGenericTimerReenableTimer ();
|
||||||
|
ArmInstructionSynchronizationBarrier ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable timer interrupts
|
|
||||||
gInterrupt->EnableInterruptSource (gInterrupt, Source);
|
|
||||||
|
|
||||||
gBS->RestoreTPL (OriginalTPL);
|
gBS->RestoreTPL (OriginalTPL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -111,4 +111,12 @@
|
|||||||
#define ARM_SMC_ID_PSCI_AFFINITY_INFO_OFF 1
|
#define ARM_SMC_ID_PSCI_AFFINITY_INFO_OFF 1
|
||||||
#define ARM_SMC_ID_PSCI_AFFINITY_INFO_ON_PENDING 2
|
#define ARM_SMC_ID_PSCI_AFFINITY_INFO_ON_PENDING 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SMC function IDs for Trusted OS Service queries
|
||||||
|
*/
|
||||||
|
#define ARM_SMC_ID_TOS_CALL_COUNT 0xbf00ff00
|
||||||
|
#define ARM_SMC_ID_TOS_UID 0xbf00ff01
|
||||||
|
/* 0xbf00ff02 is reserved */
|
||||||
|
#define ARM_SMC_ID_TOS_REVISION 0xbf00ff03
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -22,6 +22,12 @@ ArmGenericTimerEnableTimer (
|
|||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
ArmGenericTimerReenableTimer (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ArmGenericTimerDisableTimer (
|
ArmGenericTimerDisableTimer (
|
||||||
|
@@ -558,6 +558,12 @@ ArmReadSctlr (
|
|||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
ArmWriteSctlr (
|
||||||
|
IN UINT32 Value
|
||||||
|
);
|
||||||
|
|
||||||
UINTN
|
UINTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ArmReadHVBar (
|
ArmReadHVBar (
|
||||||
|
137
ArmPkg/Include/Library/ArmMtlLib.h
Normal file
137
ArmPkg/Include/Library/ArmMtlLib.h
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef ARM_MTL_LIB_H_
|
||||||
|
#define ARM_MTL_LIB_H_
|
||||||
|
|
||||||
|
#include <Uefi/UefiBaseType.h>
|
||||||
|
|
||||||
|
// Ideally we don't need packed struct. However we can't rely on compilers.
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
UINT32 Reserved1;
|
||||||
|
UINT32 ChannelStatus;
|
||||||
|
UINT64 Reserved2;
|
||||||
|
UINT32 Flags;
|
||||||
|
UINT32 Length;
|
||||||
|
UINT32 MessageHeader;
|
||||||
|
|
||||||
|
// NOTE: Since EDK2 does not allow flexible array member [] we declare
|
||||||
|
// here array of 1 element length. However below is used as a variable
|
||||||
|
// length array.
|
||||||
|
UINT32 Payload[1]; // size less object gives offset to payload.
|
||||||
|
} MTL_MAILBOX;
|
||||||
|
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
|
// Channel Type, Low-priority, and High-priority
|
||||||
|
typedef enum {
|
||||||
|
MTL_CHANNEL_TYPE_LOW = 0,
|
||||||
|
MTL_CHANNEL_TYPE_HIGH = 1
|
||||||
|
} MTL_CHANNEL_TYPE;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
UINT64 PhysicalAddress;
|
||||||
|
UINT32 ModifyMask;
|
||||||
|
UINT32 PreserveMask;
|
||||||
|
} MTL_DOORBELL;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
MTL_CHANNEL_TYPE ChannelType;
|
||||||
|
MTL_MAILBOX * CONST MailBox;
|
||||||
|
MTL_DOORBELL DoorBell;
|
||||||
|
} MTL_CHANNEL;
|
||||||
|
|
||||||
|
/** Wait until channel is free.
|
||||||
|
|
||||||
|
@param[in] Channel Pointer to a channel.
|
||||||
|
@param[in] TimeOutInMicroSeconds Time out in micro seconds.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Channel is free.
|
||||||
|
@retval EFI_TIMEOUT Time out error.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MtlWaitUntilChannelFree (
|
||||||
|
IN MTL_CHANNEL *Channel,
|
||||||
|
IN UINTN TimeOutInMicroSeconds
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return the address of the message payload.
|
||||||
|
|
||||||
|
@param[in] Channel Pointer to a channel.
|
||||||
|
|
||||||
|
@retval UINT32* Pointer to the payload.
|
||||||
|
**/
|
||||||
|
UINT32*
|
||||||
|
MtlGetChannelPayload (
|
||||||
|
IN MTL_CHANNEL *Channel
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return pointer to a channel for the requested channel type.
|
||||||
|
|
||||||
|
@param[in] ChannelType ChannelType, Low or High priority channel.
|
||||||
|
MTL_CHANNEL_TYPE_LOW or
|
||||||
|
MTL_CHANNEL_TYPE_HIGH
|
||||||
|
|
||||||
|
@param[out] Channel Holds pointer to the channel.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Pointer to channel is returned.
|
||||||
|
@retval EFI_UNSUPPORTED Requested channel type not supported.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MtlGetChannel (
|
||||||
|
IN MTL_CHANNEL_TYPE ChannelType,
|
||||||
|
OUT MTL_CHANNEL **Channel
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Mark the channel busy and ring the doorbell.
|
||||||
|
|
||||||
|
@param[in] Channel Pointer to a channel.
|
||||||
|
@param[in] MessageHeader Message header.
|
||||||
|
|
||||||
|
@param[out] PayloadLength Message length.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Message sent successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR Channel is busy.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MtlSendMessage (
|
||||||
|
IN MTL_CHANNEL *Channel,
|
||||||
|
IN UINT32 MessageHeader,
|
||||||
|
OUT UINT32 PayloadLength
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Wait for a response on a channel.
|
||||||
|
|
||||||
|
If channel is free after sending message, it implies SCP responded
|
||||||
|
with a response on the channel.
|
||||||
|
|
||||||
|
@param[in] Channel Pointer to a channel.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Message received successfully.
|
||||||
|
@retval EFI_TIMEOUT Time out error.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MtlReceiveMessage (
|
||||||
|
IN MTL_CHANNEL *Channel,
|
||||||
|
OUT UINT32 *MessageHeader,
|
||||||
|
OUT UINT32 *PayloadLength
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif /* ARM_MTL_LIB_H_ */
|
||||||
|
|
34
ArmPkg/Include/Library/OpteeLib.h
Normal file
34
ArmPkg/Include/Library/OpteeLib.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/** @file
|
||||||
|
OP-TEE specific header file.
|
||||||
|
|
||||||
|
Copyright (c) 2018, Linaro Ltd. All rights reserved.<BR>
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef _OPTEE_H_
|
||||||
|
#define _OPTEE_H_
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The 'Trusted OS Call UID' is supposed to return the following UUID for
|
||||||
|
* OP-TEE OS. This is a 128-bit value.
|
||||||
|
*/
|
||||||
|
#define OPTEE_OS_UID0 0x384fb3e0
|
||||||
|
#define OPTEE_OS_UID1 0xe7f811e3
|
||||||
|
#define OPTEE_OS_UID2 0xaf630002
|
||||||
|
#define OPTEE_OS_UID3 0xa5d5c51b
|
||||||
|
|
||||||
|
BOOLEAN
|
||||||
|
EFIAPI
|
||||||
|
IsOpteePresent (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif
|
27
ArmPkg/Include/Protocol/ArmScmi.h
Normal file
27
ArmPkg/Include/Protocol/ArmScmi.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef ARM_SCMI_H_
|
||||||
|
#define ARM_SCMI_H_
|
||||||
|
|
||||||
|
/* As per SCMI specification, maximum allowed ASCII string length
|
||||||
|
for various return values/parameters of a SCMI message.
|
||||||
|
*/
|
||||||
|
#define SCMI_MAX_STR_LEN 16
|
||||||
|
|
||||||
|
#endif /* ARM_SCMI_H_ */
|
||||||
|
|
174
ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h
Normal file
174
ArmPkg/Include/Protocol/ArmScmiBaseProtocol.h
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef ARM_SCMI_BASE_PROTOCOL_H_
|
||||||
|
#define ARM_SCMI_BASE_PROTOCOL_H_
|
||||||
|
|
||||||
|
#include <Protocol/ArmScmi.h>
|
||||||
|
|
||||||
|
#define BASE_PROTOCOL_VERSION 0x10000
|
||||||
|
|
||||||
|
#define NUM_PROTOCOL_MASK 0xFFU
|
||||||
|
#define NUM_AGENT_MASK 0xFFU
|
||||||
|
|
||||||
|
#define NUM_AGENT_SHIFT 0x8
|
||||||
|
|
||||||
|
/** Returns total number of protocols that are
|
||||||
|
implemented (excluding the Base protocol)
|
||||||
|
*/
|
||||||
|
#define SCMI_TOTAL_PROTOCOLS(Attr) (Attr & NUM_PROTOCOL_MASK)
|
||||||
|
|
||||||
|
// Returns total number of agents in the system.
|
||||||
|
#define SCMI_TOTAL_AGENTS(Attr) ((Attr >> NUM_AGENT_SHIFT) & NUM_AGENT_MASK)
|
||||||
|
|
||||||
|
#define ARM_SCMI_BASE_PROTOCOL_GUID { \
|
||||||
|
0xd7e5abe9, 0x33ab, 0x418e, {0x9f, 0x91, 0x72, 0xda, 0xe2, 0xba, 0x8e, 0x2f} \
|
||||||
|
}
|
||||||
|
|
||||||
|
extern EFI_GUID gArmScmiBaseProtocolGuid;
|
||||||
|
|
||||||
|
typedef struct _SCMI_BASE_PROTOCOL SCMI_BASE_PROTOCOL;
|
||||||
|
|
||||||
|
/** Return version of the Base protocol supported by SCP firmware.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] Version Version of the supported SCMI Base protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The version of the protocol is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_BASE_GET_VERSION) (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT32 *Version
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return total number of SCMI protocols supported by the SCP firmware.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] TotalProtocols Total number of SCMI protocols supported.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Total number of protocols supported are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_BASE_GET_TOTAL_PROTOCOLS) (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT32 *TotalProtocols
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return vendor name.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] VendorIdentifier Null terminated ASCII string of up to
|
||||||
|
16 bytes with a vendor name.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS VendorIdentifier is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_BASE_DISCOVER_VENDOR) (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return sub vendor name.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] VendorIdentifier Null terminated ASCII string of up to
|
||||||
|
16 bytes with a vendor name.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS VendorIdentifier is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_BASE_DISCOVER_SUB_VENDOR) (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return implementation version.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] ImplementationVersion Vendor specific implementation version.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Implementation version is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_BASE_DISCOVER_IMPLEMENTATION_VERSION) (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
OUT UINT32 *ImplementationVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return list of protocols.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_BASE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] ProtocolListSize Size of the ProtocolList.
|
||||||
|
|
||||||
|
@param[out] ProtocolList Protocol list.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS List of protocols is returned.
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL ProtocolListSize is too small for the result.
|
||||||
|
It has been updated to the size needed.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns a SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_BASE_DISCOVER_LIST_PROTOCOLS) (
|
||||||
|
IN SCMI_BASE_PROTOCOL *This,
|
||||||
|
IN OUT UINT32 *ProtocolListSize,
|
||||||
|
OUT UINT8 *ProtocolList
|
||||||
|
);
|
||||||
|
|
||||||
|
// Base protocol.
|
||||||
|
typedef struct _SCMI_BASE_PROTOCOL {
|
||||||
|
SCMI_BASE_GET_VERSION GetVersion;
|
||||||
|
SCMI_BASE_GET_TOTAL_PROTOCOLS GetTotalProtocols;
|
||||||
|
SCMI_BASE_DISCOVER_VENDOR DiscoverVendor;
|
||||||
|
SCMI_BASE_DISCOVER_SUB_VENDOR DiscoverSubVendor;
|
||||||
|
SCMI_BASE_DISCOVER_IMPLEMENTATION_VERSION DiscoverImplementationVersion;
|
||||||
|
SCMI_BASE_DISCOVER_LIST_PROTOCOLS DiscoverListProtocols;
|
||||||
|
} SCMI_BASE_PROTOCOL;
|
||||||
|
|
||||||
|
// SCMI Message IDs for Base protocol.
|
||||||
|
typedef enum {
|
||||||
|
SCMI_MESSAGE_ID_BASE_DISCOVER_VENDOR = 0x3,
|
||||||
|
SCMI_MESSAGE_ID_BASE_DISCOVER_SUB_VENDOR = 0x4,
|
||||||
|
SCMI_MESSAGE_ID_BASE_DISCOVER_IMPLEMENTATION_VERSION = 0x5,
|
||||||
|
SCMI_MESSAGE_ID_BASE_DISCOVER_LIST_PROTOCOLS = 0x6
|
||||||
|
} SCMI_MESSAGE_ID_BASE;
|
||||||
|
|
||||||
|
#endif /* ARM_SCMI_BASE_PROTOCOL_H_ */
|
||||||
|
|
218
ArmPkg/Include/Protocol/ArmScmiClockProtocol.h
Normal file
218
ArmPkg/Include/Protocol/ArmScmiClockProtocol.h
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef ARM_SCMI_CLOCK_PROTOCOL_H_
|
||||||
|
#define ARM_SCMI_CLOCK_PROTOCOL_H_
|
||||||
|
|
||||||
|
#include <Protocol/ArmScmi.h>
|
||||||
|
|
||||||
|
#define ARM_SCMI_CLOCK_PROTOCOL_GUID { \
|
||||||
|
0x91ce67a8, 0xe0aa, 0x4012, {0xb9, 0x9f, 0xb6, 0xfc, 0xf3, 0x4, 0x8e, 0xaa} \
|
||||||
|
}
|
||||||
|
|
||||||
|
extern EFI_GUID gArmScmiClockProtocolGuid;
|
||||||
|
|
||||||
|
// Message Type for clock management protocol.
|
||||||
|
typedef enum {
|
||||||
|
SCMI_MESSAGE_ID_CLOCK_ATTRIBUTES = 0x3,
|
||||||
|
SCMI_MESSAGE_ID_CLOCK_DESCRIBE_RATES = 0x4,
|
||||||
|
SCMI_MESSAGE_ID_CLOCK_RATE_SET = 0x5,
|
||||||
|
SCMI_MESSAGE_ID_CLOCK_RATE_GET = 0x6,
|
||||||
|
SCMI_MESSAGE_ID_CLOCK_CONFIG_SET = 0x7
|
||||||
|
} SCMI_MESSAGE_ID_CLOCK;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
SCMI_CLOCK_RATE_FORMAT_DISCRETE, // Non-linear range.
|
||||||
|
SCMI_CLOCK_RATE_FORMAT_LINEAR // Linear range.
|
||||||
|
} SCMI_CLOCK_RATE_FORMAT;
|
||||||
|
|
||||||
|
// Clock management protocol version.
|
||||||
|
#define SCMI_CLOCK_PROTOCOL_VERSION 0x10000
|
||||||
|
|
||||||
|
#define SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_MASK 0xFFU
|
||||||
|
#define SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_SHIFT 16
|
||||||
|
#define SCMI_CLOCK_PROTOCOL_NUM_CLOCKS_MASK 0xFFFFU
|
||||||
|
|
||||||
|
/** Total number of pending asynchronous clock rates changes
|
||||||
|
supported by the SCP, Attr Bits[23:16]
|
||||||
|
*/
|
||||||
|
#define SCMI_CLOCK_PROTOCOL_MAX_ASYNC_CLK_RATES(Attr) ( \
|
||||||
|
(Attr >> SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_SHIFT) && \
|
||||||
|
SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_MASK)
|
||||||
|
|
||||||
|
// Total of clock devices supported by the SCP, Attr Bits[15:0]
|
||||||
|
#define SCMI_CLOCK_PROTOCOL_TOTAL_CLKS(Attr) (Attr & SCMI_CLOCK_PROTOCOL_NUM_CLOCKS_MASK)
|
||||||
|
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
/* Depending on the format (linear/non-linear) supported by a clock device
|
||||||
|
either Rate or Min/Max/Step triplet is valid.
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
union {
|
||||||
|
UINT64 Min;
|
||||||
|
UINT64 Rate;
|
||||||
|
};
|
||||||
|
UINT64 Max;
|
||||||
|
UINT64 Step;
|
||||||
|
} SCMI_CLOCK_RATE;
|
||||||
|
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
|
typedef struct _SCMI_CLOCK_PROTOCOL SCMI_CLOCK_PROTOCOL;
|
||||||
|
|
||||||
|
// Protocol Interface functions.
|
||||||
|
|
||||||
|
/** Return version of the clock management protocol supported by SCP firmware.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] Version Version of the supported SCMI Clock management protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The version is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_CLOCK_GET_VERSION) (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
OUT UINT32 *Version
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return total number of clock devices supported by the clock management
|
||||||
|
protocol.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] TotalClocks Total number of clocks supported.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Total number of clocks supported is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_CLOCK_GET_TOTAL_CLOCKS) (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
OUT UINT32 *TotalClocks
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return attributes of a clock device.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
@param[in] ClockId Identifier for the clock device.
|
||||||
|
|
||||||
|
@param[out] Enabled If TRUE, the clock device is enabled.
|
||||||
|
@param[out] ClockAsciiName A NULL terminated ASCII string with the clock
|
||||||
|
name, of up to 16 bytes.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Clock device attributes are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_CLOCK_GET_CLOCK_ATTRIBUTES) (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
IN UINT32 ClockId,
|
||||||
|
OUT BOOLEAN *Enabled,
|
||||||
|
OUT CHAR8 *ClockAsciiName
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return list of rates supported by a given clock device.
|
||||||
|
|
||||||
|
@param[in] This A pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
@param[in] ClockId Identifier for the clock device.
|
||||||
|
|
||||||
|
@param[out] Format SCMI_CLOCK_RATE_FORMAT_DISCRETE: Clock device
|
||||||
|
supports range of clock rates which are non-linear.
|
||||||
|
|
||||||
|
SCMI_CLOCK_RATE_FORMAT_LINEAR: Clock device supports
|
||||||
|
range of linear clock rates from Min to Max in steps.
|
||||||
|
|
||||||
|
@param[out] TotalRates Total number of rates.
|
||||||
|
|
||||||
|
@param[in,out] RateArraySize Size of the RateArray.
|
||||||
|
|
||||||
|
@param[out] RateArray List of clock rates.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS List of clock rates are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL RateArraySize is too small for the result.
|
||||||
|
It has been updated to the size needed.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_CLOCK_DESCRIBE_RATES) (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
IN UINT32 ClockId,
|
||||||
|
OUT SCMI_CLOCK_RATE_FORMAT *Format,
|
||||||
|
OUT UINT32 *TotalRates,
|
||||||
|
IN OUT UINT32 *RateArraySize,
|
||||||
|
OUT SCMI_CLOCK_RATE *RateArray
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Get clock rate.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
@param[in] ClockId Identifier for the clock device.
|
||||||
|
|
||||||
|
@param[out] Rate Clock rate.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Clock rate is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_CLOCK_RATE_GET) (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
IN UINT32 ClockId,
|
||||||
|
OUT UINT64 *Rate
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Set clock rate.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_CLOCK_PROTOCOL Instance.
|
||||||
|
@param[in] ClockId Identifier for the clock device.
|
||||||
|
@param[in] Rate Clock rate.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Clock rate set success.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_CLOCK_RATE_SET) (
|
||||||
|
IN SCMI_CLOCK_PROTOCOL *This,
|
||||||
|
IN UINT32 ClockId,
|
||||||
|
IN UINT64 Rate
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef struct _SCMI_CLOCK_PROTOCOL {
|
||||||
|
SCMI_CLOCK_GET_VERSION GetVersion;
|
||||||
|
SCMI_CLOCK_GET_TOTAL_CLOCKS GetTotalClocks;
|
||||||
|
SCMI_CLOCK_GET_CLOCK_ATTRIBUTES GetClockAttributes;
|
||||||
|
SCMI_CLOCK_DESCRIBE_RATES DescribeRates;
|
||||||
|
SCMI_CLOCK_RATE_GET RateGet;
|
||||||
|
SCMI_CLOCK_RATE_SET RateSet;
|
||||||
|
} SCMI_CLOCK_PROTOCOL;
|
||||||
|
|
||||||
|
#endif /* ARM_SCMI_CLOCK_PROTOCOL_H_ */
|
||||||
|
|
265
ArmPkg/Include/Protocol/ArmScmiPerformanceProtocol.h
Normal file
265
ArmPkg/Include/Protocol/ArmScmiPerformanceProtocol.h
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef ARM_SCMI_PERFORMANCE_PROTOCOL_H_
|
||||||
|
#define ARM_SCMI_PERFORMANCE_PROTOCOL_H_
|
||||||
|
|
||||||
|
#include <Protocol/ArmScmi.h>
|
||||||
|
|
||||||
|
#define PERFORMANCE_PROTOCOL_VERSION 0x10000
|
||||||
|
|
||||||
|
#define ARM_SCMI_PERFORMANCE_PROTOCOL_GUID { \
|
||||||
|
0x9b8ba84, 0x3dd3, 0x49a6, {0xa0, 0x5a, 0x31, 0x34, 0xa5, 0xf0, 0x7b, 0xad} \
|
||||||
|
}
|
||||||
|
|
||||||
|
extern EFI_GUID gArmScmiPerformanceProtocolGuid;
|
||||||
|
|
||||||
|
typedef struct _SCMI_PERFORMANCE_PROTOCOL SCMI_PERFORMANCE_PROTOCOL;
|
||||||
|
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
#define POWER_IN_MW_SHIFT 16
|
||||||
|
#define POWER_IN_MW_MASK 0x1
|
||||||
|
#define NUM_PERF_DOMAINS_MASK 0xFFFF
|
||||||
|
|
||||||
|
// Total number of performance domains, Attr Bits [15:0]
|
||||||
|
#define SCMI_PERF_TOTAL_DOMAINS(Attr) (Attr & NUM_PERF_DOMAINS_MASK)
|
||||||
|
|
||||||
|
// A flag to express power values in mW or platform specific way, Attr Bit [16]
|
||||||
|
#define SCMI_PERF_POWER_IN_MW(Attr) ((Attr >> POWER_IN_MW_SHIFT) & \
|
||||||
|
POWER_IN_MW_MASK)
|
||||||
|
|
||||||
|
// Performance protocol attributes return values.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 Attributes;
|
||||||
|
UINT64 StatisticsAddress;
|
||||||
|
UINT32 StatisticsLen;
|
||||||
|
} SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES;
|
||||||
|
|
||||||
|
#define SCMI_PERF_SUPPORT_LVL_CHANGE_NOTIFY(Attr) ((Attr >> 28) & 0x1)
|
||||||
|
#define SCMI_PERF_SUPPORT_LIM_CHANGE_NOTIFY(Attr) ((Attr >> 29) & 0x1)
|
||||||
|
#define SCMI_PERF_SUPPORT_SET_LVL(Attr) ((Attr >> 30) & 0x1)
|
||||||
|
#define SCMI_PERF_SUPPORT_SET_LIM(Attr) ((Attr >> 31) & 0x1)
|
||||||
|
#define SCMI_PERF_RATE_LIMIT(RateLimit) (RateLimit & 0xFFF)
|
||||||
|
|
||||||
|
// Performance protocol domain attributes.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 Attributes;
|
||||||
|
UINT32 RateLimit;
|
||||||
|
UINT32 SustainedFreq;
|
||||||
|
UINT32 SustainedPerfLevel;
|
||||||
|
UINT8 Name[SCMI_MAX_STR_LEN];
|
||||||
|
} SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES;
|
||||||
|
|
||||||
|
// Worst case latency in microseconds, Bits[15:0]
|
||||||
|
#define PERF_LATENCY_MASK 0xFFFF
|
||||||
|
#define SCMI_PERFORMANCE_PROTOCOL_LATENCY(Latency) (Latency & PERF_LATENCY_MASK)
|
||||||
|
|
||||||
|
// Performance protocol performance level.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 Level;
|
||||||
|
UINT32 PowerCost;
|
||||||
|
UINT32 Latency;
|
||||||
|
} SCMI_PERFORMANCE_LEVEL;
|
||||||
|
|
||||||
|
// Performance protocol performance limit.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 RangeMax;
|
||||||
|
UINT32 RangeMin;
|
||||||
|
} SCMI_PERFORMANCE_LIMITS;
|
||||||
|
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
|
/** Return version of the performance management protocol supported by SCP.
|
||||||
|
firmware.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] Version Version of the supported SCMI performance management
|
||||||
|
protocol.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The version is returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_PERFORMANCE_GET_VERSION) (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
OUT UINT32 *Version
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return protocol attributes of the performance management protocol.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
|
||||||
|
@param[out] Attributes Protocol attributes.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Protocol attributes are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_PERFORMANCE_GET_ATTRIBUTES) (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
OUT SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES *Attributes
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return performance domain attributes.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
|
||||||
|
@param[out] Attributes Performance domain attributes.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Domain attributes are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_PERFORMANCE_GET_DOMAIN_ATTRIBUTES) (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
OUT SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES *DomainAttributes
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Return list of performance domain levels of a given domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
|
||||||
|
@param[out] NumLevels Total number of levels a domain can support.
|
||||||
|
|
||||||
|
@param[in,out] LevelArraySize Size of the performance level array.
|
||||||
|
|
||||||
|
@param[out] LevelArray Array of the performance levels.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Domain levels are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL LevelArraySize is too small for the result.
|
||||||
|
It has been updated to the size needed.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_PERFORMANCE_DESCRIBE_LEVELS) (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
OUT UINT32 *NumLevels,
|
||||||
|
IN OUT UINT32 *LevelArraySize,
|
||||||
|
OUT SCMI_PERFORMANCE_LEVEL *LevelArray
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Set performance limits of a domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
@param[in] Limit Performance limit to set.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance limits set successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_PERFORMANCE_LIMITS_SET) (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
IN SCMI_PERFORMANCE_LIMITS *Limits
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Get performance limits of a domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
|
||||||
|
@param[out] Limit Performance Limits of the domain.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance limits are returned.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_PERFORMANCE_LIMITS_GET) (
|
||||||
|
SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
UINT32 DomainId,
|
||||||
|
SCMI_PERFORMANCE_LIMITS *Limits
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Set performance level of a domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
@param[in] Level Performance level of the domain.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance level set successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_PERFORMANCE_LEVEL_SET) (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
IN UINT32 Level
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Get performance level of a domain.
|
||||||
|
|
||||||
|
@param[in] This A Pointer to SCMI_PERFORMANCE_PROTOCOL Instance.
|
||||||
|
@param[in] DomainId Identifier for the performance domain.
|
||||||
|
|
||||||
|
@param[out] Level Performance level of the domain.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Performance level got successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR SCP returns an SCMI error.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(EFIAPI *SCMI_PERFORMANCE_LEVEL_GET) (
|
||||||
|
IN SCMI_PERFORMANCE_PROTOCOL *This,
|
||||||
|
IN UINT32 DomainId,
|
||||||
|
OUT UINT32 *Level
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef struct _SCMI_PERFORMANCE_PROTOCOL {
|
||||||
|
SCMI_PERFORMANCE_GET_VERSION GetVersion;
|
||||||
|
SCMI_PERFORMANCE_GET_ATTRIBUTES GetProtocolAttributes;
|
||||||
|
SCMI_PERFORMANCE_GET_DOMAIN_ATTRIBUTES GetDomainAttributes;
|
||||||
|
SCMI_PERFORMANCE_DESCRIBE_LEVELS DescribeLevels;
|
||||||
|
SCMI_PERFORMANCE_LIMITS_SET LimitsSet;
|
||||||
|
SCMI_PERFORMANCE_LIMITS_GET LimitsGet;
|
||||||
|
SCMI_PERFORMANCE_LEVEL_SET LevelSet;
|
||||||
|
SCMI_PERFORMANCE_LEVEL_GET LevelGet;
|
||||||
|
} SCMI_PERFORMANCE_PROTOCOL;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
SCMI_MESSAGE_ID_PERFORMANCE_DOMAIN_ATTRIBUTES = 0x3,
|
||||||
|
SCMI_MESSAGE_ID_PERFORMANCE_DESCRIBE_LEVELS = 0x4,
|
||||||
|
SCMI_MESSAGE_ID_PERFORMANCE_LIMITS_SET = 0x5,
|
||||||
|
SCMI_MESSAGE_ID_PERFORMANCE_LIMITS_GET = 0x6,
|
||||||
|
SCMI_MESSAGE_ID_PERFORMANCE_LEVEL_SET = 0x7,
|
||||||
|
SCMI_MESSAGE_ID_PERFORMANCE_LEVEL_GET = 0x8,
|
||||||
|
} SCMI_MESSAGE_ID_PERFORMANCE;
|
||||||
|
|
||||||
|
#endif /* ARM_SCMI_PERFORMANCE_PROTOCOL_H_ */
|
||||||
|
|
@@ -394,7 +394,7 @@ DisassembleArmInstruction (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((OpCode & 0x0db00000) == 0x03200000) {
|
if ((OpCode & 0x0db00000) == 0x01200000) {
|
||||||
// A4.1.38 MSR{<cond>} CPSR_<fields>, #<immediate> MSR{<cond>} CPSR_<fields>, <Rm>
|
// A4.1.38 MSR{<cond>} CPSR_<fields>, #<immediate> MSR{<cond>} CPSR_<fields>, <Rm>
|
||||||
if (I) {
|
if (I) {
|
||||||
// MSR{<cond>} CPSR_<fields>, #<immediate>
|
// MSR{<cond>} CPSR_<fields>, #<immediate>
|
||||||
|
@@ -29,6 +29,14 @@ ArmGenericTimerEnableTimer (
|
|||||||
ArmWriteCntpCtl (TimerCtrlReg);
|
ArmWriteCntpCtl (TimerCtrlReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
ArmGenericTimerReenableTimer (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ArmGenericTimerDisableTimer (
|
ArmGenericTimerDisableTimer (
|
||||||
|
@@ -26,19 +26,17 @@ ArmGenericTimerEnableTimer (
|
|||||||
|
|
||||||
TimerCtrlReg = ArmReadCntvCtl ();
|
TimerCtrlReg = ArmReadCntvCtl ();
|
||||||
TimerCtrlReg |= ARM_ARCH_TIMER_ENABLE;
|
TimerCtrlReg |= ARM_ARCH_TIMER_ENABLE;
|
||||||
|
|
||||||
//
|
|
||||||
// When running under KVM, we need to unmask the interrupt on the timer side
|
|
||||||
// as KVM will mask it when servicing the interrupt at the hypervisor level
|
|
||||||
// and delivering the virtual timer interrupt to the guest. Otherwise, the
|
|
||||||
// interrupt will fire again, trapping into the hypervisor again, etc. etc.
|
|
||||||
// This is scheduled to be fixed on the KVM side, but there is no harm in
|
|
||||||
// leaving this in once KVM gets fixed.
|
|
||||||
//
|
|
||||||
TimerCtrlReg &= ~ARM_ARCH_TIMER_IMASK;
|
|
||||||
ArmWriteCntvCtl (TimerCtrlReg);
|
ArmWriteCntvCtl (TimerCtrlReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
ArmGenericTimerReenableTimer (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ArmGenericTimerDisableTimer (
|
ArmGenericTimerDisableTimer (
|
||||||
|
@@ -187,4 +187,13 @@ ASM_FUNC(ArmReadSctlr)
|
|||||||
3:mrs x0, sctlr_el3
|
3:mrs x0, sctlr_el3
|
||||||
4:ret
|
4:ret
|
||||||
|
|
||||||
|
ASM_FUNC(ArmWriteSctlr)
|
||||||
|
EL1_OR_EL2_OR_EL3(x1)
|
||||||
|
1:msr sctlr_el1, x0
|
||||||
|
ret
|
||||||
|
2:msr sctlr_el2, x0
|
||||||
|
ret
|
||||||
|
3:msr sctlr_el3, x0
|
||||||
|
4:ret
|
||||||
|
|
||||||
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
|
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
|
||||||
|
@@ -100,8 +100,6 @@ ASM_FUNC(ArmGetTTBR0BaseAddress)
|
|||||||
// IN VOID *MVA // R1
|
// IN VOID *MVA // R1
|
||||||
// );
|
// );
|
||||||
ASM_FUNC(ArmUpdateTranslationTableEntry)
|
ASM_FUNC(ArmUpdateTranslationTableEntry)
|
||||||
mcr p15,0,R0,c7,c14,1 @ DCCIMVAC Clean data cache by MVA
|
|
||||||
dsb
|
|
||||||
mcr p15,0,R1,c8,c7,1 @ TLBIMVA TLB Invalidate MVA
|
mcr p15,0,R1,c8,c7,1 @ TLBIMVA TLB Invalidate MVA
|
||||||
mcr p15,0,R9,c7,c5,6 @ BPIALL Invalidate Branch predictor array. R9 == NoOp
|
mcr p15,0,R9,c7,c5,6 @ BPIALL Invalidate Branch predictor array. R9 == NoOp
|
||||||
dsb
|
dsb
|
||||||
@@ -153,6 +151,10 @@ ASM_FUNC(ArmReadSctlr)
|
|||||||
mrc p15, 0, r0, c1, c0, 0 @ Read SCTLR into R0 (Read control register configuration data)
|
mrc p15, 0, r0, c1, c0, 0 @ Read SCTLR into R0 (Read control register configuration data)
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
|
ASM_FUNC(ArmWriteSctlr)
|
||||||
|
mcr p15, 0, r0, c1, c0, 0
|
||||||
|
bx lr
|
||||||
|
|
||||||
ASM_FUNC(ArmReadCpuActlr)
|
ASM_FUNC(ArmReadCpuActlr)
|
||||||
mrc p15, 0, r0, c1, c0, 1
|
mrc p15, 0, r0, c1, c0, 1
|
||||||
bx lr
|
bx lr
|
||||||
|
@@ -155,6 +155,9 @@
|
|||||||
mrc p15, 0, r0, c1, c0, 0 // Read SCTLR into R0 (Read control register configuration data)
|
mrc p15, 0, r0, c1, c0, 0 // Read SCTLR into R0 (Read control register configuration data)
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
|
RVCT_ASM_EXPORT ArmWriteSctlr
|
||||||
|
mcr p15, 0, r0, c1, c0, 0
|
||||||
|
bx lr
|
||||||
|
|
||||||
RVCT_ASM_EXPORT ArmReadCpuActlr
|
RVCT_ASM_EXPORT ArmReadCpuActlr
|
||||||
mrc p15, 0, r0, c1, c0, 1
|
mrc p15, 0, r0, c1, c0, 1
|
||||||
|
@@ -343,17 +343,12 @@ ArmConfigureMmu (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Translate the Memory Attributes into Translation Table Register Attributes
|
// Translate the Memory Attributes into Translation Table Register Attributes
|
||||||
if ((TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBUFFERED) ||
|
if ((TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK) ||
|
||||||
(TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_UNCACHED_UNBUFFERED)) {
|
|
||||||
TTBRAttributes = ArmHasMpExtensions () ? TTBR_MP_NON_CACHEABLE : TTBR_NON_CACHEABLE;
|
|
||||||
} else if ((TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK) ||
|
|
||||||
(TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_BACK)) {
|
(TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_BACK)) {
|
||||||
TTBRAttributes = ArmHasMpExtensions () ? TTBR_MP_WRITE_BACK_ALLOC : TTBR_WRITE_BACK_ALLOC;
|
TTBRAttributes = ArmHasMpExtensions () ? TTBR_MP_WRITE_BACK_ALLOC : TTBR_WRITE_BACK_ALLOC;
|
||||||
} else if ((TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_WRITE_THROUGH) ||
|
|
||||||
(TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_THROUGH)) {
|
|
||||||
TTBRAttributes = ArmHasMpExtensions () ? TTBR_MP_WRITE_THROUGH : TTBR_WRITE_THROUGH;
|
|
||||||
} else {
|
} else {
|
||||||
ASSERT (0); // No support has been found for the attributes of the memory region that the translation table belongs to.
|
// Page tables must reside in memory mapped as write-back cacheable
|
||||||
|
ASSERT (0);
|
||||||
return RETURN_UNSUPPORTED;
|
return RETURN_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -461,9 +456,6 @@ ConvertSectionToPages (
|
|||||||
PageTable[Index] = TT_DESCRIPTOR_PAGE_BASE_ADDRESS(BaseAddress + (Index << 12)) | PageDescriptor;
|
PageTable[Index] = TT_DESCRIPTOR_PAGE_BASE_ADDRESS(BaseAddress + (Index << 12)) | PageDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flush d-cache so descriptors make it back to uncached memory for subsequent table walks
|
|
||||||
WriteBackInvalidateDataCacheRange ((VOID *)PageTable, TT_DESCRIPTOR_PAGE_SIZE);
|
|
||||||
|
|
||||||
// Formulate page table entry, Domain=0, NS=0
|
// Formulate page table entry, Domain=0, NS=0
|
||||||
PageTableDescriptor = (((UINTN)PageTable) & TT_DESCRIPTOR_SECTION_PAGETABLE_ADDRESS_MASK) | TT_DESCRIPTOR_SECTION_TYPE_PAGE_TABLE;
|
PageTableDescriptor = (((UINTN)PageTable) & TT_DESCRIPTOR_SECTION_PAGETABLE_ADDRESS_MASK) | TT_DESCRIPTOR_SECTION_TYPE_PAGE_TABLE;
|
||||||
|
|
||||||
@@ -597,12 +589,6 @@ UpdatePageEntries (
|
|||||||
if (CurrentPageTableEntry != PageTableEntry) {
|
if (CurrentPageTableEntry != PageTableEntry) {
|
||||||
Mva = (VOID *)(UINTN)((((UINTN)FirstLevelIdx) << TT_DESCRIPTOR_SECTION_BASE_SHIFT) + (PageTableIndex << TT_DESCRIPTOR_PAGE_BASE_SHIFT));
|
Mva = (VOID *)(UINTN)((((UINTN)FirstLevelIdx) << TT_DESCRIPTOR_SECTION_BASE_SHIFT) + (PageTableIndex << TT_DESCRIPTOR_PAGE_BASE_SHIFT));
|
||||||
|
|
||||||
// Clean/invalidate the cache for this page, but only
|
|
||||||
// if we are modifying the memory type attributes
|
|
||||||
if (((CurrentPageTableEntry ^ PageTableEntry) & TT_DESCRIPTOR_PAGE_CACHE_POLICY_MASK) != 0) {
|
|
||||||
WriteBackInvalidateDataCacheRange (Mva, TT_DESCRIPTOR_PAGE_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only need to update if we are changing the entry
|
// Only need to update if we are changing the entry
|
||||||
PageTable[PageTableIndex] = PageTableEntry;
|
PageTable[PageTableIndex] = PageTableEntry;
|
||||||
ArmUpdateTranslationTableEntry ((VOID *)&PageTable[PageTableIndex], Mva);
|
ArmUpdateTranslationTableEntry ((VOID *)&PageTable[PageTableIndex], Mva);
|
||||||
@@ -716,13 +702,7 @@ UpdateSectionEntries (
|
|||||||
Descriptor |= EntryValue;
|
Descriptor |= EntryValue;
|
||||||
|
|
||||||
if (CurrentDescriptor != Descriptor) {
|
if (CurrentDescriptor != Descriptor) {
|
||||||
Mva = (VOID *)(UINTN)(((UINTN)FirstLevelTable) << TT_DESCRIPTOR_SECTION_BASE_SHIFT);
|
Mva = (VOID *)(UINTN)(((UINTN)FirstLevelIdx + i) << TT_DESCRIPTOR_SECTION_BASE_SHIFT);
|
||||||
|
|
||||||
// Clean/invalidate the cache for this section, but only
|
|
||||||
// if we are modifying the memory type attributes
|
|
||||||
if (((CurrentDescriptor ^ Descriptor) & TT_DESCRIPTOR_SECTION_CACHE_POLICY_MASK) != 0) {
|
|
||||||
WriteBackInvalidateDataCacheRange (Mva, SIZE_1MB);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only need to update if we are changing the descriptor
|
// Only need to update if we are changing the descriptor
|
||||||
FirstLevelTable[FirstLevelIdx + i] = Descriptor;
|
FirstLevelTable[FirstLevelIdx + i] = Descriptor;
|
||||||
|
108
ArmPkg/Library/ArmMtlNullLib/ArmMtlNullLib.c
Normal file
108
ArmPkg/Library/ArmMtlNullLib/ArmMtlNullLib.c
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
System Control and Management Interface V1.0
|
||||||
|
http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/
|
||||||
|
DEN0056A_System_Control_and_Management_Interface.pdf
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <Library/ArmMtlLib.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
|
||||||
|
/** Wait until channel is free.
|
||||||
|
|
||||||
|
@param[in] Channel Pointer to a channel.
|
||||||
|
@param[in] TimeOutInMicroSeconds Timeout in micro seconds.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Interface not implemented.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MtlWaitUntilChannelFree (
|
||||||
|
IN MTL_CHANNEL *Channel,
|
||||||
|
IN UINTN TimeOutInMicroSeconds
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return the address of the message payload.
|
||||||
|
|
||||||
|
@param[in] Channel Pointer to a channel.
|
||||||
|
|
||||||
|
@retval UINT32* Pointer to the payload.
|
||||||
|
**/
|
||||||
|
UINT32*
|
||||||
|
MtlGetChannelPayload (
|
||||||
|
IN MTL_CHANNEL *Channel
|
||||||
|
)
|
||||||
|
{
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return pointer to a channel for the requested channel type.
|
||||||
|
|
||||||
|
@param[in] ChannelType ChannelType, Low or High priority channel.
|
||||||
|
MTL_CHANNEL_TYPE_LOW or
|
||||||
|
MTL_CHANNEL_TYPE_HIGH
|
||||||
|
|
||||||
|
@param[out] Channel Holds pointer to the channel.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Requested channel type not supported or
|
||||||
|
interface not implemented.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MtlGetChannel (
|
||||||
|
IN MTL_CHANNEL_TYPE ChannelType,
|
||||||
|
OUT MTL_CHANNEL **Channel
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Mark the channel busy and ring the doorbell.
|
||||||
|
|
||||||
|
@param[in] Channel Pointer to a channel.
|
||||||
|
@param[in] MessageHeader Message header.
|
||||||
|
|
||||||
|
@param[out] PayloadLength Message length.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Interface not implemented.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MtlSendMessage (
|
||||||
|
IN MTL_CHANNEL *Channel,
|
||||||
|
IN UINT32 MessageHeader,
|
||||||
|
OUT UINT32 PayloadLength
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Wait for a response on a channel.
|
||||||
|
|
||||||
|
If channel is free after sending message, it implies SCP responded
|
||||||
|
with a response on the channel.
|
||||||
|
|
||||||
|
@param[in] Channel Pointer to a channel.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Interface not implemented.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
MtlReceiveMessage (
|
||||||
|
IN MTL_CHANNEL *Channel,
|
||||||
|
OUT UINT32 *MessageHeader,
|
||||||
|
OUT UINT32 *PayloadLength
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
26
ArmPkg/Library/ArmMtlNullLib/ArmMtlNullLib.inf
Normal file
26
ArmPkg/Library/ArmMtlNullLib/ArmMtlNullLib.inf
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#/** @file
|
||||||
|
# Copyright (c) 2017-2018, Arm Limited. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#**/
|
||||||
|
|
||||||
|
[Defines]
|
||||||
|
INF_VERSION = 0x00010019
|
||||||
|
BASE_NAME = ArmMtlNullLib
|
||||||
|
FILE_GUID = 05810525-FDEC-4006-9F1F-37609B3675FA
|
||||||
|
MODULE_TYPE = BASE
|
||||||
|
VERSION_STRING = 1.0
|
||||||
|
LIBRARY_CLASS = ArmMtlLib
|
||||||
|
|
||||||
|
[Sources.common]
|
||||||
|
ArmMtlNullLib.c
|
||||||
|
|
||||||
|
[Packages]
|
||||||
|
ArmPkg/ArmPkg.dec
|
||||||
|
MdePkg/MdePkg.dec
|
@@ -15,10 +15,13 @@
|
|||||||
|
|
||||||
#include <PiDxe.h>
|
#include <PiDxe.h>
|
||||||
|
|
||||||
|
#include <Library/ArmMmuLib.h>
|
||||||
|
#include <Library/ArmSmcLib.h>
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/ResetSystemLib.h>
|
#include <Library/ResetSystemLib.h>
|
||||||
#include <Library/ArmSmcLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Library/UefiRuntimeLib.h>
|
||||||
|
|
||||||
#include <IndustryStandard/ArmStdSmc.h>
|
#include <IndustryStandard/ArmStdSmc.h>
|
||||||
|
|
||||||
@@ -89,7 +92,21 @@ EnterS3WithImmediateWake (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Not implemented
|
VOID (*Reset)(VOID);
|
||||||
|
|
||||||
|
if (FeaturePcdGet (PcdArmReenterPeiForCapsuleWarmReboot) &&
|
||||||
|
!EfiAtRuntime ()) {
|
||||||
|
//
|
||||||
|
// At boot time, we are the only core running, so we can implement the
|
||||||
|
// immediate wake (which is used by capsule update) by disabling the MMU
|
||||||
|
// and interrupts, and jumping to the PEI entry point.
|
||||||
|
//
|
||||||
|
Reset = (VOID (*)(VOID))(UINTN)FixedPcdGet64 (PcdFvBaseAddress);
|
||||||
|
|
||||||
|
gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||||
|
ArmDisableMmu ();
|
||||||
|
Reset ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -30,6 +30,15 @@
|
|||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
|
ArmMmuLib
|
||||||
ArmSmcLib
|
ArmSmcLib
|
||||||
BaseLib
|
BaseLib
|
||||||
DebugLib
|
DebugLib
|
||||||
|
UefiBootServicesTableLib
|
||||||
|
UefiRuntimeLib
|
||||||
|
|
||||||
|
[FeaturePcd]
|
||||||
|
gArmTokenSpaceGuid.PcdArmReenterPeiForCapsuleWarmReboot
|
||||||
|
|
||||||
|
[FixedPcd]
|
||||||
|
gArmTokenSpaceGuid.PcdFvBaseAddress
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
|
// Copyright (c) 2018, Pete Batard. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -17,18 +18,19 @@
|
|||||||
EXPORT __aeabi_uidivmod
|
EXPORT __aeabi_uidivmod
|
||||||
EXPORT __aeabi_idiv
|
EXPORT __aeabi_idiv
|
||||||
EXPORT __aeabi_idivmod
|
EXPORT __aeabi_idivmod
|
||||||
|
EXPORT __rt_udiv
|
||||||
|
EXPORT __rt_sdiv
|
||||||
|
|
||||||
AREA Math, CODE, READONLY
|
AREA Math, CODE, READONLY
|
||||||
|
|
||||||
;
|
;
|
||||||
;UINT32
|
;UINT32
|
||||||
;EFIAPI
|
;EFIAPI
|
||||||
;__aeabi_uidivmode (
|
;__aeabi_uidivmod (
|
||||||
; IN UINT32 Dividen
|
; IN UINT32 Dividend
|
||||||
; IN UINT32 Divisor
|
; IN UINT32 Divisor
|
||||||
; );
|
; );
|
||||||
;
|
;
|
||||||
|
|
||||||
__aeabi_uidiv
|
__aeabi_uidiv
|
||||||
__aeabi_uidivmod
|
__aeabi_uidivmod
|
||||||
RSBS r12, r1, r0, LSR #4
|
RSBS r12, r1, r0, LSR #4
|
||||||
@@ -39,11 +41,41 @@ __aeabi_uidivmod
|
|||||||
MOV r3, #0
|
MOV r3, #0
|
||||||
B __arm_div_large
|
B __arm_div_large
|
||||||
|
|
||||||
|
;
|
||||||
|
;UINT64
|
||||||
|
;EFIAPI
|
||||||
|
;__rt_udiv (
|
||||||
|
; IN UINT32 Divisor,
|
||||||
|
; IN UINT32 Dividend
|
||||||
|
; );
|
||||||
|
;
|
||||||
|
__rt_udiv
|
||||||
|
; Swap R0 and R1
|
||||||
|
MOV r12, r0
|
||||||
|
MOV r0, r1
|
||||||
|
MOV r1, r12
|
||||||
|
B __aeabi_uidivmod
|
||||||
|
|
||||||
|
;
|
||||||
|
;UINT64
|
||||||
|
;EFIAPI
|
||||||
|
;__rt_sdiv (
|
||||||
|
; IN INT32 Divisor,
|
||||||
|
; IN INT32 Dividend
|
||||||
|
; );
|
||||||
|
;
|
||||||
|
__rt_sdiv
|
||||||
|
; Swap R0 and R1
|
||||||
|
MOV r12, r0
|
||||||
|
MOV r0, r1
|
||||||
|
MOV r1, r12
|
||||||
|
B __aeabi_idivmod
|
||||||
|
|
||||||
;
|
;
|
||||||
;INT32
|
;INT32
|
||||||
;EFIAPI
|
;EFIAPI
|
||||||
;__aeabi_idivmode (
|
;__aeabi_idivmod (
|
||||||
; IN INT32 Dividen
|
; IN INT32 Dividend
|
||||||
; IN INT32 Divisor
|
; IN INT32 Divisor
|
||||||
; );
|
; );
|
||||||
;
|
;
|
||||||
@@ -152,4 +184,3 @@ __aeabi_idiv0
|
|||||||
BX r14
|
BX r14
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
|
// Copyright (c) 2018, Pete Batard. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -13,20 +14,41 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
EXTERN __aeabi_uldivmod
|
IMPORT __aeabi_uldivmod
|
||||||
|
EXPORT __aeabi_ldivmod
|
||||||
|
EXPORT __rt_sdiv64
|
||||||
|
|
||||||
INCLUDE AsmMacroExport.inc
|
AREA s___aeabi_ldivmod, CODE, READONLY, ARM
|
||||||
|
|
||||||
|
ARM
|
||||||
|
|
||||||
;
|
;
|
||||||
;UINT32
|
;INT64
|
||||||
;EFIAPI
|
;EFIAPI
|
||||||
;__aeabi_uidivmode (
|
;__rt_sdiv64 (
|
||||||
; IN UINT32 Dividen
|
; IN INT64 Divisor
|
||||||
; IN UINT32 Divisor
|
; IN INT64 Dividend
|
||||||
; );
|
; );
|
||||||
;
|
;
|
||||||
|
__rt_sdiv64
|
||||||
|
; Swap r0-r1 and r2-r3
|
||||||
|
MOV r12, r0
|
||||||
|
MOV r0, r2
|
||||||
|
MOV r2, r12
|
||||||
|
MOV r12, r1
|
||||||
|
MOV r1, r3
|
||||||
|
MOV r3, r12
|
||||||
|
B __aeabi_ldivmod
|
||||||
|
|
||||||
RVCT_ASM_EXPORT __aeabi_ldivmod
|
;
|
||||||
|
;INT64
|
||||||
|
;EFIAPI
|
||||||
|
;__aeabi_ldivmod (
|
||||||
|
; IN INT64 Dividend
|
||||||
|
; IN INT64 Divisor
|
||||||
|
; );
|
||||||
|
;
|
||||||
|
__aeabi_ldivmod
|
||||||
PUSH {r4,lr}
|
PUSH {r4,lr}
|
||||||
ASRS r4,r1,#1
|
ASRS r4,r1,#1
|
||||||
EOR r4,r4,r3,LSR #1
|
EOR r4,r4,r3,LSR #1
|
||||||
@@ -39,7 +61,7 @@ L_Test1
|
|||||||
RSBS r2,r2,#0
|
RSBS r2,r2,#0
|
||||||
RSC r3,r3,#0
|
RSC r3,r3,#0
|
||||||
L_Test2
|
L_Test2
|
||||||
BL __aeabi_uldivmod ;
|
BL __aeabi_uldivmod
|
||||||
TST r4,#0x40000000
|
TST r4,#0x40000000
|
||||||
BEQ L_Test3
|
BEQ L_Test3
|
||||||
RSBS r0,r0,#0
|
RSBS r0,r0,#0
|
||||||
@@ -53,5 +75,3 @@ L_Exit
|
|||||||
POP {r4,pc}
|
POP {r4,pc}
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
|
// Copyright (c) 2018, Pete Batard. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -12,32 +13,33 @@
|
|||||||
//
|
//
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
EXPORT __aeabi_llsr
|
||||||
|
EXPORT __rt_srsh
|
||||||
|
|
||||||
|
AREA s___aeabi_llsr, CODE, READONLY, ARM
|
||||||
|
|
||||||
INCLUDE AsmMacroExport.inc
|
ARM
|
||||||
|
|
||||||
;
|
;
|
||||||
;VOID
|
;VOID
|
||||||
;EFIAPI
|
;EFIAPI
|
||||||
;__aeabi_llsr (
|
;__aeabi_llsr (
|
||||||
; IN VOID *Destination,
|
; IN UINT64 Value,
|
||||||
; IN VOID *Source,
|
; IN UINT32 Shift
|
||||||
; IN UINT32 Size
|
;)
|
||||||
; );
|
|
||||||
;
|
;
|
||||||
RVCT_ASM_EXPORT __aeabi_llsr
|
__aeabi_llsr
|
||||||
|
__rt_srsh
|
||||||
SUBS r3,r2,#0x20
|
SUBS r3,r2,#0x20
|
||||||
BPL {pc} + 0x18 ; 0x1c
|
BPL __aeabi_llsr_label1
|
||||||
RSB r3,r2,#0x20
|
RSB r3,r2,#0x20
|
||||||
LSR r0,r0,r2
|
LSR r0,r0,r2
|
||||||
ORR r0,r0,r1,LSL r3
|
ORR r0,r0,r1,LSL r3
|
||||||
LSR r1,r1,r2
|
LSR r1,r1,r2
|
||||||
BX lr
|
BX lr
|
||||||
|
__aeabi_llsr_label1
|
||||||
LSR r0,r1,r3
|
LSR r0,r1,r3
|
||||||
MOV r1,#0
|
MOV r1,#0
|
||||||
BX lr
|
BX lr
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
|
// Copyright (c) 2018, Pete Batard. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -13,9 +14,30 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
EXPORT __aeabi_uldivmod
|
||||||
|
EXPORT __rt_udiv64
|
||||||
|
|
||||||
|
AREA s___aeabi_uldivmod, CODE, READONLY, ARM
|
||||||
|
|
||||||
INCLUDE AsmMacroExport.inc
|
ARM
|
||||||
|
|
||||||
|
;
|
||||||
|
;UINT64
|
||||||
|
;EFIAPI
|
||||||
|
;__rt_udiv64 (
|
||||||
|
; IN UINT64 Divisor
|
||||||
|
; IN UINT64 Dividend
|
||||||
|
; )
|
||||||
|
;
|
||||||
|
__rt_udiv64
|
||||||
|
; Swap r0-r1 and r2-r3
|
||||||
|
mov r12, r0
|
||||||
|
mov r0, r2
|
||||||
|
mov r2, r12
|
||||||
|
mov r12, r1
|
||||||
|
mov r1, r3
|
||||||
|
mov r3, r12
|
||||||
|
b __aeabi_uldivmod
|
||||||
|
|
||||||
;
|
;
|
||||||
;UINT64
|
;UINT64
|
||||||
@@ -25,7 +47,7 @@
|
|||||||
; IN UINT64 Divisor
|
; IN UINT64 Divisor
|
||||||
; )
|
; )
|
||||||
;
|
;
|
||||||
RVCT_ASM_EXPORT __aeabi_uldivmod
|
__aeabi_uldivmod
|
||||||
stmdb sp!, {r4, r5, r6, lr}
|
stmdb sp!, {r4, r5, r6, lr}
|
||||||
mov r4, r1
|
mov r4, r1
|
||||||
mov r5, r0
|
mov r5, r0
|
||||||
@@ -261,7 +283,6 @@ _ll_div0
|
|||||||
b __aeabi_ldiv0
|
b __aeabi_ldiv0
|
||||||
|
|
||||||
__aeabi_ldiv0
|
__aeabi_ldiv0
|
||||||
BX r14
|
bx r14
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@@ -23,8 +23,12 @@
|
|||||||
LIBRARY_CLASS = CompilerIntrinsicsLib
|
LIBRARY_CLASS = CompilerIntrinsicsLib
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
memcpy.c
|
memcpy.c | RVCT
|
||||||
memset.c
|
memcpy.c | GCC
|
||||||
|
memcpy_ms.c | MSFT
|
||||||
|
memset.c | RVCT
|
||||||
|
memset.c | GCC
|
||||||
|
memset_ms.c | MSFT
|
||||||
|
|
||||||
[Sources.ARM]
|
[Sources.ARM]
|
||||||
Arm/mullu.asm | RVCT
|
Arm/mullu.asm | RVCT
|
||||||
@@ -94,6 +98,10 @@
|
|||||||
Arm/llsr.S | GCC
|
Arm/llsr.S | GCC
|
||||||
Arm/llsl.S | GCC
|
Arm/llsl.S | GCC
|
||||||
|
|
||||||
|
Arm/div.asm | MSFT
|
||||||
|
Arm/uldiv.asm | MSFT
|
||||||
|
Arm/ldivmod.asm | MSFT
|
||||||
|
Arm/llsr.asm | MSFT
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
@@ -101,3 +109,7 @@
|
|||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
|
|
||||||
|
[BuildOptions]
|
||||||
|
MSFT:*_*_ARM_CC_FLAGS = /GL-
|
||||||
|
MSFT:*_*_ARM_ASM_FLAGS = /oldit
|
||||||
|
MSFT:*_*_AARCH64_CC_FLAGS = /GL-
|
||||||
|
@@ -15,20 +15,20 @@
|
|||||||
|
|
||||||
typedef __SIZE_TYPE__ size_t;
|
typedef __SIZE_TYPE__ size_t;
|
||||||
|
|
||||||
static __attribute__((__used__))
|
static void __memcpy(void *dest, const void *src, size_t n)
|
||||||
void *__memcpy(void *dest, const void *src, size_t n)
|
|
||||||
{
|
{
|
||||||
unsigned char *d = dest;
|
unsigned char *d = dest;
|
||||||
unsigned char const *s = src;
|
unsigned char const *s = src;
|
||||||
|
|
||||||
while (n--)
|
while (n--)
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
|
|
||||||
return dest;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((__alias__("__memcpy")))
|
void *memcpy(void *dest, const void *src, size_t n)
|
||||||
void *memcpy(void *dest, const void *src, size_t n);
|
{
|
||||||
|
__memcpy(dest, src, n);
|
||||||
|
return dest;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __arm__
|
#ifdef __arm__
|
||||||
|
|
||||||
|
34
ArmPkg/Library/CompilerIntrinsicsLib/memcpy_ms.c
Normal file
34
ArmPkg/Library/CompilerIntrinsicsLib/memcpy_ms.c
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2017, Pete Batard. All rights reserved.<BR>
|
||||||
|
//
|
||||||
|
// This program and the accompanying materials are licensed and made
|
||||||
|
// available under the terms and conditions of the BSD License which
|
||||||
|
// accompanies this distribution. The full text of the license may be
|
||||||
|
// found at http://opensource.org/licenses/bsd-license.php
|
||||||
|
//
|
||||||
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
|
||||||
|
// IMPLIED.
|
||||||
|
//
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(_M_ARM64)
|
||||||
|
typedef unsigned __int64 size_t;
|
||||||
|
#else
|
||||||
|
typedef unsigned __int32 size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void* memcpy(void *, const void *, size_t);
|
||||||
|
#pragma intrinsic(memcpy)
|
||||||
|
#pragma function(memcpy)
|
||||||
|
void* memcpy(void *dest, const void *src, size_t n)
|
||||||
|
{
|
||||||
|
unsigned char *d = dest;
|
||||||
|
unsigned char const *s = src;
|
||||||
|
|
||||||
|
while (n--)
|
||||||
|
*d++ = *s++;
|
||||||
|
|
||||||
|
return dest;
|
||||||
|
}
|
33
ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c
Normal file
33
ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2017, Pete Batard. All rights reserved.<BR>
|
||||||
|
//
|
||||||
|
// This program and the accompanying materials are licensed and made
|
||||||
|
// available under the terms and conditions of the BSD License which
|
||||||
|
// accompanies this distribution. The full text of the license may be
|
||||||
|
// found at http://opensource.org/licenses/bsd-license.php
|
||||||
|
//
|
||||||
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
|
||||||
|
// IMPLIED.
|
||||||
|
//
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(_M_ARM64)
|
||||||
|
typedef unsigned __int64 size_t;
|
||||||
|
#else
|
||||||
|
typedef unsigned __int32 size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void* memset(void *, int, size_t);
|
||||||
|
#pragma intrinsic(memset)
|
||||||
|
#pragma function(memset)
|
||||||
|
void *memset(void *s, int c, size_t n)
|
||||||
|
{
|
||||||
|
unsigned char *d = s;
|
||||||
|
|
||||||
|
while (n--)
|
||||||
|
*d++ = (unsigned char)c;
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
46
ArmPkg/Library/OpteeLib/Optee.c
Normal file
46
ArmPkg/Library/OpteeLib/Optee.c
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/** @file
|
||||||
|
Api's to communicate with OP-TEE OS (Trusted OS based on ARM TrustZone) via
|
||||||
|
secure monitor calls.
|
||||||
|
|
||||||
|
Copyright (c) 2018, Linaro Ltd. All rights reserved.<BR>
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <Library/ArmSmcLib.h>
|
||||||
|
#include <Library/BaseLib.h>
|
||||||
|
#include <Library/OpteeLib.h>
|
||||||
|
|
||||||
|
#include <IndustryStandard/ArmStdSmc.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Check for OP-TEE presence.
|
||||||
|
**/
|
||||||
|
BOOLEAN
|
||||||
|
EFIAPI
|
||||||
|
IsOpteePresent (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
ARM_SMC_ARGS ArmSmcArgs;
|
||||||
|
|
||||||
|
// Send a Trusted OS Calls UID command
|
||||||
|
ArmSmcArgs.Arg0 = ARM_SMC_ID_TOS_UID;
|
||||||
|
ArmCallSmc (&ArmSmcArgs);
|
||||||
|
|
||||||
|
if ((ArmSmcArgs.Arg0 == OPTEE_OS_UID0) &&
|
||||||
|
(ArmSmcArgs.Arg1 == OPTEE_OS_UID1) &&
|
||||||
|
(ArmSmcArgs.Arg2 == OPTEE_OS_UID2) &&
|
||||||
|
(ArmSmcArgs.Arg3 == OPTEE_OS_UID3)) {
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
33
ArmPkg/Library/OpteeLib/OpteeLib.inf
Normal file
33
ArmPkg/Library/OpteeLib/OpteeLib.inf
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#/** @file
|
||||||
|
# OP-TEE lib using secure monitor calls
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018, Linaro Ltd. All rights reserved.<BR>
|
||||||
|
#
|
||||||
|
# This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#**/
|
||||||
|
|
||||||
|
[Defines]
|
||||||
|
INF_VERSION = 0x0001001A
|
||||||
|
BASE_NAME = OpteeLib
|
||||||
|
FILE_GUID = BCD50D08-9568-45B2-84DF-30AE0279AD46
|
||||||
|
MODULE_TYPE = BASE
|
||||||
|
VERSION_STRING = 1.0
|
||||||
|
LIBRARY_CLASS = OpteeLib
|
||||||
|
|
||||||
|
[Sources]
|
||||||
|
Optee.c
|
||||||
|
|
||||||
|
[Packages]
|
||||||
|
ArmPkg/ArmPkg.dec
|
||||||
|
MdePkg/MdePkg.dec
|
||||||
|
|
||||||
|
[LibraryClasses]
|
||||||
|
ArmSmcLib
|
||||||
|
BaseLib
|
@@ -5,7 +5,7 @@
|
|||||||
# PEI Services Table from a global variable. Not available to modules that execute from
|
# PEI Services Table from a global variable. Not available to modules that execute from
|
||||||
# read-only memory.
|
# read-only memory.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# Copyright (c) 2011 Hewlett-Packard Corporation. All rights reserved.<BR>
|
# Copyright (c) 2011 Hewlett-Packard Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
LIBRARY_CLASS = PeiServicesTablePointerLib|PEIM PEI_CORE SEC
|
LIBRARY_CLASS = PeiServicesTablePointerLib|PEIM PEI_CORE SEC
|
||||||
|
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC (EBC is for build only)
|
# VALID_ARCHITECTURES = IA32 X64 EBC (EBC is for build only)
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Copyright (C) 2015-2016, Red Hat, Inc.
|
Copyright (C) 2015-2016, Red Hat, Inc.
|
||||||
Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
|
Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
|
||||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
|
Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials are licensed and made available
|
This program and the accompanying materials are licensed and made available
|
||||||
@@ -24,12 +24,14 @@
|
|||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/UefiBootManagerLib.h>
|
#include <Library/UefiBootManagerLib.h>
|
||||||
#include <Library/UefiLib.h>
|
#include <Library/UefiLib.h>
|
||||||
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||||
#include <Protocol/DevicePath.h>
|
#include <Protocol/DevicePath.h>
|
||||||
#include <Protocol/EsrtManagement.h>
|
#include <Protocol/EsrtManagement.h>
|
||||||
#include <Protocol/GraphicsOutput.h>
|
#include <Protocol/GraphicsOutput.h>
|
||||||
#include <Protocol/LoadedImage.h>
|
#include <Protocol/LoadedImage.h>
|
||||||
#include <Protocol/PciIo.h>
|
#include <Protocol/PciIo.h>
|
||||||
#include <Protocol/PciRootBridgeIo.h>
|
#include <Protocol/PciRootBridgeIo.h>
|
||||||
|
#include <Protocol/PlatformBootManager.h>
|
||||||
#include <Guid/EventGroup.h>
|
#include <Guid/EventGroup.h>
|
||||||
#include <Guid/TtyTerm.h>
|
#include <Guid/TtyTerm.h>
|
||||||
|
|
||||||
@@ -390,6 +392,106 @@ PlatformRegisterFvBootOption (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
GetPlatformOptions (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_BOOT_MANAGER_LOAD_OPTION *CurrentBootOptions;
|
||||||
|
EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions;
|
||||||
|
EFI_INPUT_KEY *BootKeys;
|
||||||
|
PLATFORM_BOOT_MANAGER_PROTOCOL *PlatformBootManager;
|
||||||
|
UINTN CurrentBootOptionCount;
|
||||||
|
UINTN Index;
|
||||||
|
UINTN BootCount;
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol (&gPlatformBootManagerProtocolGuid, NULL,
|
||||||
|
(VOID **)&PlatformBootManager);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Status = PlatformBootManager->GetPlatformBootOptionsAndKeys (
|
||||||
|
&BootCount,
|
||||||
|
&BootOptions,
|
||||||
|
&BootKeys
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// Fetch the existent boot options. If there are none, CurrentBootCount
|
||||||
|
// will be zeroed.
|
||||||
|
//
|
||||||
|
CurrentBootOptions = EfiBootManagerGetLoadOptions (
|
||||||
|
&CurrentBootOptionCount,
|
||||||
|
LoadOptionTypeBoot
|
||||||
|
);
|
||||||
|
//
|
||||||
|
// Process the platform boot options.
|
||||||
|
//
|
||||||
|
for (Index = 0; Index < BootCount; Index++) {
|
||||||
|
INTN Match;
|
||||||
|
UINTN BootOptionNumber;
|
||||||
|
|
||||||
|
//
|
||||||
|
// If there are any preexistent boot options, and the subject platform boot
|
||||||
|
// option is already among them, then don't try to add it. Just get its
|
||||||
|
// assigned boot option number so we can associate a hotkey with it. Note
|
||||||
|
// that EfiBootManagerFindLoadOption() deals fine with (CurrentBootOptions
|
||||||
|
// == NULL) if (CurrentBootCount == 0).
|
||||||
|
//
|
||||||
|
Match = EfiBootManagerFindLoadOption (
|
||||||
|
&BootOptions[Index],
|
||||||
|
CurrentBootOptions,
|
||||||
|
CurrentBootOptionCount
|
||||||
|
);
|
||||||
|
if (Match >= 0) {
|
||||||
|
BootOptionNumber = CurrentBootOptions[Match].OptionNumber;
|
||||||
|
} else {
|
||||||
|
//
|
||||||
|
// Add the platform boot options as a new one, at the end of the boot
|
||||||
|
// order. Note that if the platform provided this boot option with an
|
||||||
|
// unassigned option number, then the below function call will assign a
|
||||||
|
// number.
|
||||||
|
//
|
||||||
|
Status = EfiBootManagerAddLoadOptionVariable (
|
||||||
|
&BootOptions[Index],
|
||||||
|
MAX_UINTN
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "%a: failed to register \"%s\": %r\n",
|
||||||
|
__FUNCTION__, BootOptions[Index].Description, Status));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
BootOptionNumber = BootOptions[Index].OptionNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Register a hotkey with the boot option, if requested.
|
||||||
|
//
|
||||||
|
if (BootKeys[Index].UnicodeChar == L'\0') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = EfiBootManagerAddKeyOptionVariable (
|
||||||
|
NULL,
|
||||||
|
BootOptionNumber,
|
||||||
|
0,
|
||||||
|
BootKeys[Index],
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "%a: failed to register hotkey for \"%s\": %r\n",
|
||||||
|
__FUNCTION__, BootOptions[Index].Description, Status));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EfiBootManagerFreeLoadOptions (CurrentBootOptions, CurrentBootOptionCount);
|
||||||
|
EfiBootManagerFreeLoadOptions (BootOptions, BootCount);
|
||||||
|
FreePool (BootKeys);
|
||||||
|
}
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
PlatformRegisterOptionsAndKeys (
|
PlatformRegisterOptionsAndKeys (
|
||||||
@@ -402,6 +504,8 @@ PlatformRegisterOptionsAndKeys (
|
|||||||
EFI_INPUT_KEY Esc;
|
EFI_INPUT_KEY Esc;
|
||||||
EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
|
EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
|
||||||
|
|
||||||
|
GetPlatformOptions ();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Register ENTER as CONTINUE key
|
// Register ENTER as CONTINUE key
|
||||||
//
|
//
|
||||||
@@ -450,21 +554,6 @@ PlatformBootManagerBeforeConsole (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
|
||||||
ESRT_MANAGEMENT_PROTOCOL *EsrtManagement;
|
|
||||||
|
|
||||||
if (GetBootModeHob() == BOOT_ON_FLASH_UPDATE) {
|
|
||||||
DEBUG ((DEBUG_INFO, "ProcessCapsules Before EndOfDxe ......\n"));
|
|
||||||
Status = ProcessCapsules ();
|
|
||||||
DEBUG ((DEBUG_INFO, "ProcessCapsules returned %r\n", Status));
|
|
||||||
} else {
|
|
||||||
Status = gBS->LocateProtocol (&gEsrtManagementProtocolGuid, NULL,
|
|
||||||
(VOID **)&EsrtManagement);
|
|
||||||
if (!EFI_ERROR (Status)) {
|
|
||||||
EsrtManagement->SyncEsrtFmp ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Signal EndOfDxe PI Event
|
// Signal EndOfDxe PI Event
|
||||||
//
|
//
|
||||||
@@ -515,6 +604,56 @@ PlatformBootManagerBeforeConsole (
|
|||||||
PlatformRegisterOptionsAndKeys ();
|
PlatformRegisterOptionsAndKeys ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
HandleCapsules (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
ESRT_MANAGEMENT_PROTOCOL *EsrtManagement;
|
||||||
|
EFI_PEI_HOB_POINTERS HobPointer;
|
||||||
|
EFI_CAPSULE_HEADER *CapsuleHeader;
|
||||||
|
BOOLEAN NeedReset;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
DEBUG ((DEBUG_INFO, "%a: processing capsules ...\n", __FUNCTION__));
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol (&gEsrtManagementProtocolGuid, NULL,
|
||||||
|
(VOID **)&EsrtManagement);
|
||||||
|
if (!EFI_ERROR (Status)) {
|
||||||
|
EsrtManagement->SyncEsrtFmp ();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Find all capsule images from hob
|
||||||
|
//
|
||||||
|
HobPointer.Raw = GetHobList ();
|
||||||
|
NeedReset = FALSE;
|
||||||
|
while ((HobPointer.Raw = GetNextHob (EFI_HOB_TYPE_UEFI_CAPSULE,
|
||||||
|
HobPointer.Raw)) != NULL) {
|
||||||
|
CapsuleHeader = (VOID *)(UINTN)HobPointer.Capsule->BaseAddress;
|
||||||
|
|
||||||
|
Status = ProcessCapsuleImage (CapsuleHeader);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "%a: failed to process capsule %p - %r\n",
|
||||||
|
__FUNCTION__, CapsuleHeader, Status));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
NeedReset = TRUE;
|
||||||
|
HobPointer.Raw = GET_NEXT_HOB (HobPointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NeedReset) {
|
||||||
|
DEBUG ((DEBUG_WARN, "%a: capsule update successful, resetting ...\n",
|
||||||
|
__FUNCTION__));
|
||||||
|
|
||||||
|
gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
|
||||||
|
CpuDeadLoop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define VERSION_STRING_PREFIX L"Tianocore/EDK2 firmware version "
|
#define VERSION_STRING_PREFIX L"Tianocore/EDK2 firmware version "
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -534,7 +673,6 @@ PlatformBootManagerAfterConsole (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ESRT_MANAGEMENT_PROTOCOL *EsrtManagement;
|
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
||||||
UINTN FirmwareVerLength;
|
UINTN FirmwareVerLength;
|
||||||
@@ -572,17 +710,14 @@ PlatformBootManagerAfterConsole (
|
|||||||
//
|
//
|
||||||
EfiBootManagerConnectAll ();
|
EfiBootManagerConnectAll ();
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (&gEsrtManagementProtocolGuid, NULL,
|
//
|
||||||
(VOID **)&EsrtManagement);
|
// On ARM, there is currently no reason to use the phased capsule
|
||||||
if (!EFI_ERROR (Status)) {
|
// update approach where some capsules are dispatched before EndOfDxe
|
||||||
EsrtManagement->SyncEsrtFmp ();
|
// and some are dispatched after. So just handle all capsules here,
|
||||||
}
|
// when the console is up and we can actually give the user some
|
||||||
|
// feedback about what is going on.
|
||||||
if (GetBootModeHob() == BOOT_ON_FLASH_UPDATE) {
|
//
|
||||||
DEBUG((DEBUG_INFO, "ProcessCapsules After EndOfDxe ......\n"));
|
HandleCapsules ();
|
||||||
Status = ProcessCapsules ();
|
|
||||||
DEBUG((DEBUG_INFO, "ProcessCapsules returned %r\n", Status));
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Enumerate all possible boot options.
|
// Enumerate all possible boot options.
|
||||||
@@ -631,3 +766,19 @@ PlatformBootManagerWaitCallback (
|
|||||||
Print (L".");
|
Print (L".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The function is called when no boot option could be launched,
|
||||||
|
including platform recovery options and options pointing to applications
|
||||||
|
built into firmware volumes.
|
||||||
|
|
||||||
|
If this function returns, BDS attempts to enter an infinite loop.
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
PlatformBootManagerUnableToBoot (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
PlatformBm.c
|
PlatformBm.c
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
ShellPkg/ShellPkg.dec
|
ShellPkg/ShellPkg.dec
|
||||||
@@ -54,6 +55,7 @@
|
|||||||
UefiBootManagerLib
|
UefiBootManagerLib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
UefiLib
|
UefiLib
|
||||||
|
UefiRuntimeServicesTableLib
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
|
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
|
||||||
@@ -84,3 +86,4 @@
|
|||||||
gEfiPciRootBridgeIoProtocolGuid
|
gEfiPciRootBridgeIoProtocolGuid
|
||||||
gEfiSimpleFileSystemProtocolGuid
|
gEfiSimpleFileSystemProtocolGuid
|
||||||
gEsrtManagementProtocolGuid
|
gEsrtManagementProtocolGuid
|
||||||
|
gPlatformBootManagerProtocolGuid
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
# Debug Library for UEFI drivers
|
# Debug Library for UEFI drivers
|
||||||
#
|
#
|
||||||
# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification
|
# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
FILE_GUID = 2A8D3FC4-8DB1-4D27-A3F3-780AF03CF848
|
FILE_GUID = 2A8D3FC4-8DB1-4D27-A3F3-780AF03CF848
|
||||||
MODULE_TYPE = BASE
|
MODULE_TYPE = BASE
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
LIBRARY_CLASS = DebugLib|BASE SEC DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
LIBRARY_CLASS = DebugLib|BASE SEC DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
||||||
|
|
||||||
|
|
||||||
[Sources.common]
|
[Sources.common]
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#/** @file
|
#/** @file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2017, ARM Limited. All rights reserved.
|
# Copyright (c) 2011-2018, ARM Limited. All rights reserved.
|
||||||
# Copyright (c) 2015, Intel Corporation. All rights reserved.
|
# Copyright (c) 2015, Intel Corporation. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
@@ -36,14 +36,11 @@
|
|||||||
LcdHwLib|Include/Library/LcdHwLib.h
|
LcdHwLib|Include/Library/LcdHwLib.h
|
||||||
LcdPlatformLib|Include/Library/LcdPlatformLib.h
|
LcdPlatformLib|Include/Library/LcdPlatformLib.h
|
||||||
NorFlashPlatformLib|Include/Library/NorFlashPlatformLib.h
|
NorFlashPlatformLib|Include/Library/NorFlashPlatformLib.h
|
||||||
|
PL011UartClockLib|Include/Library/PL011UartClockLib.h
|
||||||
PL011UartLib|Include/Library/PL011UartLib.h
|
PL011UartLib|Include/Library/PL011UartLib.h
|
||||||
|
|
||||||
[Guids.common]
|
[Guids.common]
|
||||||
gArmPlatformTokenSpaceGuid = { 0x9c0aaed4, 0x74c5, 0x4043, { 0xb4, 0x17, 0xa3, 0x22, 0x38, 0x14, 0xce, 0x76 } }
|
gArmPlatformTokenSpaceGuid = { 0x9c0aaed4, 0x74c5, 0x4043, { 0xb4, 0x17, 0xa3, 0x22, 0x38, 0x14, 0xce, 0x76 } }
|
||||||
#
|
|
||||||
# Following Guid must match FILE_GUID in MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
|
|
||||||
#
|
|
||||||
gVariableRuntimeDxeFileGuid = { 0xcbd2e4d5, 0x7068, 0x4ff5, { 0xb4, 0x62, 0x98, 0x22, 0xb4, 0xad, 0x8d, 0x60 } }
|
|
||||||
|
|
||||||
[PcdsFeatureFlag.common]
|
[PcdsFeatureFlag.common]
|
||||||
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores|FALSE|BOOLEAN|0x00000004
|
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores|FALSE|BOOLEAN|0x00000004
|
||||||
@@ -93,10 +90,29 @@
|
|||||||
gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x0|UINT32|0x00000026
|
gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x0|UINT32|0x00000026
|
||||||
gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase|0x0|UINT32|0x00000027
|
gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase|0x0|UINT32|0x00000027
|
||||||
|
|
||||||
|
## Default size for display modes upto 1920x1080 (1920 * 1080 * 4 Bytes Per Pixel)
|
||||||
|
gArmPlatformTokenSpaceGuid.PcdArmLcdDdrFrameBufferSize|0x7E9000|UINT32|0x00000043
|
||||||
|
## If set, framebuffer memory will be reserved and mapped in the system RAM
|
||||||
|
gArmPlatformTokenSpaceGuid.PcdArmLcdDdrFrameBufferBase|0x0|UINT64|0x00000044
|
||||||
|
|
||||||
|
## ARM Mali Display Processor DP500/DP550/DP650
|
||||||
|
gArmPlatformTokenSpaceGuid.PcdArmMaliDpBase|0x0|UINT64|0x00000050
|
||||||
|
gArmPlatformTokenSpaceGuid.PcdArmMaliDpMemoryRegionLength|0x0|UINT32|0x00000051
|
||||||
|
|
||||||
## PL180 MCI
|
## PL180 MCI
|
||||||
gArmPlatformTokenSpaceGuid.PcdPL180SysMciRegAddress|0x00000000|UINT32|0x00000028
|
gArmPlatformTokenSpaceGuid.PcdPL180SysMciRegAddress|0x00000000|UINT32|0x00000028
|
||||||
gArmPlatformTokenSpaceGuid.PcdPL180MciBaseAddress|0x00000000|UINT32|0x00000029
|
gArmPlatformTokenSpaceGuid.PcdPL180MciBaseAddress|0x00000000|UINT32|0x00000029
|
||||||
|
|
||||||
|
# Graphics Output Pixel format
|
||||||
|
# 0 : PixelRedGreenBlueReserved8BitPerColor
|
||||||
|
# 1 : PixelBlueGreenRedReserved8BitPerColor
|
||||||
|
# 2 : PixelBitMask
|
||||||
|
# Default is set to UEFI console font format PixelBlueGreenRedReserved8BitPerColor
|
||||||
|
gArmPlatformTokenSpaceGuid.PcdGopPixelFormat|0x00000001|UINT32|0x00000040
|
||||||
|
|
||||||
|
## If set, this will swap settings for HDLCD RED_SELECT and BLUE_SELECT registers
|
||||||
|
gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect|FALSE|BOOLEAN|0x00000045
|
||||||
|
|
||||||
[PcdsFixedAtBuild.common,PcdsDynamic.common]
|
[PcdsFixedAtBuild.common,PcdsDynamic.common]
|
||||||
## PL031 RealTimeClock
|
## PL031 RealTimeClock
|
||||||
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0|UINT32|0x00000024
|
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0|UINT32|0x00000024
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
# ARM platform package.
|
# ARM platform package.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
|
||||||
# Copyright (c) 2011 - 2015, ARM Ltd. All rights reserved.<BR>
|
# Copyright (c) 2011 - 2018, ARM Ltd. All rights reserved.<BR>
|
||||||
# Copyright (c) 2016 - 2017, Linaro Ltd. All rights reserved.<BR>
|
# Copyright (c) 2016 - 2017, Linaro Ltd. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
@@ -105,6 +105,7 @@
|
|||||||
ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.inf
|
ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.inf
|
||||||
ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf
|
ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf
|
||||||
ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
|
ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
|
||||||
|
ArmPlatformPkg/Library/PL011UartClockLib/PL011UartClockLib.inf
|
||||||
ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf
|
ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf
|
||||||
ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf
|
ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf
|
||||||
ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
|
ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
|
||||||
@@ -120,3 +121,5 @@
|
|||||||
|
|
||||||
ArmPlatformPkg/PrePi/PeiMPCore.inf
|
ArmPlatformPkg/PrePi/PeiMPCore.inf
|
||||||
ArmPlatformPkg/PrePi/PeiUniCore.inf
|
ArmPlatformPkg/PrePi/PeiUniCore.inf
|
||||||
|
|
||||||
|
ArmPlatformPkg/Library/ArmMaliDp/ArmMaliDp.inf
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
This file implements the Graphics Output protocol for Arm platforms
|
||||||
|
|
||||||
Copyright (c) 2011-2014, ARM Ltd. All rights reserved.<BR>
|
Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -22,13 +23,6 @@
|
|||||||
|
|
||||||
#include "LcdGraphicsOutputDxe.h"
|
#include "LcdGraphicsOutputDxe.h"
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
*
|
|
||||||
* This file implements the Graphics Output protocol on ArmVersatileExpress
|
|
||||||
* using the Lcd controller
|
|
||||||
*
|
|
||||||
**********************************************************************/
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Global variables
|
// Global variables
|
||||||
//
|
//
|
||||||
@@ -64,7 +58,10 @@ LCD_INSTANCE mLcdTemplate = {
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
HARDWARE_DEVICE_PATH, HW_VENDOR_DP,
|
HARDWARE_DEVICE_PATH, HW_VENDOR_DP,
|
||||||
{ (UINT8) (sizeof(VENDOR_DEVICE_PATH)), (UINT8) ((sizeof(VENDOR_DEVICE_PATH)) >> 8) },
|
{
|
||||||
|
(UINT8)(sizeof (VENDOR_DEVICE_PATH)),
|
||||||
|
(UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// Hardware Device Path for Lcd
|
// Hardware Device Path for Lcd
|
||||||
EFI_CALLER_ID_GUID // Use the driver's GUID
|
EFI_CALLER_ID_GUID // Use the driver's GUID
|
||||||
@@ -73,7 +70,10 @@ LCD_INSTANCE mLcdTemplate = {
|
|||||||
{
|
{
|
||||||
END_DEVICE_PATH_TYPE,
|
END_DEVICE_PATH_TYPE,
|
||||||
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
||||||
{ sizeof(EFI_DEVICE_PATH_PROTOCOL), 0 }
|
{
|
||||||
|
sizeof (EFI_DEVICE_PATH_PROTOCOL),
|
||||||
|
0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
(EFI_EVENT)NULL // ExitBootServicesEvent
|
(EFI_EVENT)NULL // ExitBootServicesEvent
|
||||||
@@ -140,6 +140,7 @@ InitializeDisplay (
|
|||||||
|
|
||||||
EXIT_ERROR_LCD_SHUTDOWN:
|
EXIT_ERROR_LCD_SHUTDOWN:
|
||||||
DEBUG ((DEBUG_ERROR, "InitializeDisplay: ERROR - Can not initialise the display. Exit Status=%r\n", Status));
|
DEBUG ((DEBUG_ERROR, "InitializeDisplay: ERROR - Can not initialise the display. Exit Status=%r\n", Status));
|
||||||
|
|
||||||
LcdShutdown ();
|
LcdShutdown ();
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
@@ -169,28 +170,32 @@ LcdGraphicsOutputDxeInitialize (
|
|||||||
// Install the Graphics Output Protocol and the Device Path
|
// Install the Graphics Output Protocol and the Device Path
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&Instance->Handle,
|
&Instance->Handle,
|
||||||
&gEfiGraphicsOutputProtocolGuid, &Instance->Gop,
|
&gEfiGraphicsOutputProtocolGuid,
|
||||||
&gEfiDevicePathProtocolGuid, &Instance->DevicePath,
|
&Instance->Gop,
|
||||||
|
&gEfiDevicePathProtocolGuid,
|
||||||
|
&Instance->DevicePath,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the protocol. Exit Status=%r\n", Status));
|
DEBUG ((DEBUG_ERROR, "LcdGraphicsOutputDxeInitialize: Can not install the protocol. Exit Status=%r\n", Status));
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register for an ExitBootServicesEvent
|
// Register for an ExitBootServicesEvent
|
||||||
// When ExitBootServices starts, this function here will make sure that the graphics driver will shut down properly,
|
// When ExitBootServices starts, this function will make sure that the
|
||||||
// i.e. it will free up all allocated memory and perform any necessary hardware re-configuration.
|
// graphics driver shuts down properly, i.e. it will free up all
|
||||||
|
// allocated memory and perform any necessary hardware re-configuration.
|
||||||
Status = gBS->CreateEvent (
|
Status = gBS->CreateEvent (
|
||||||
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
LcdGraphicsExitBootServicesEvent, NULL,
|
LcdGraphicsExitBootServicesEvent,
|
||||||
|
NULL,
|
||||||
&Instance->ExitBootServicesEvent
|
&Instance->ExitBootServicesEvent
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the ExitBootServicesEvent handler. Exit Status=%r\n", Status));
|
DEBUG ((DEBUG_ERROR, "LcdGraphicsOutputDxeInitialize: Can not install the ExitBootServicesEvent handler. Exit Status=%r\n", Status));
|
||||||
goto EXIT_ERROR_UNINSTALL_PROTOCOL;
|
goto EXIT_ERROR_UNINSTALL_PROTOCOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,48 +203,46 @@ LcdGraphicsOutputDxeInitialize (
|
|||||||
goto EXIT;
|
goto EXIT;
|
||||||
|
|
||||||
EXIT_ERROR_UNINSTALL_PROTOCOL:
|
EXIT_ERROR_UNINSTALL_PROTOCOL:
|
||||||
/* The following function could return an error message,
|
// The following function could return an error message,
|
||||||
* however, to get here something must have gone wrong already,
|
// however, to get here something must have gone wrong already,
|
||||||
* so preserve the original error, i.e. don't change
|
// so preserve the original error, i.e. don't change
|
||||||
* the Status variable, even it fails to uninstall the protocol.
|
// the Status variable, even it fails to uninstall the protocol.
|
||||||
*/
|
|
||||||
gBS->UninstallMultipleProtocolInterfaces (
|
gBS->UninstallMultipleProtocolInterfaces (
|
||||||
Instance->Handle,
|
Instance->Handle,
|
||||||
&gEfiGraphicsOutputProtocolGuid, &Instance->Gop, // Uninstall Graphics Output protocol
|
&gEfiGraphicsOutputProtocolGuid,
|
||||||
&gEfiDevicePathProtocolGuid, &Instance->DevicePath, // Uninstall device path
|
&Instance->Gop, // Uninstall Graphics Output protocol
|
||||||
|
&gEfiDevicePathProtocolGuid,
|
||||||
|
&Instance->DevicePath, // Uninstall device path
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************
|
/** This function should be called
|
||||||
* This function should be called
|
on Event: ExitBootServices
|
||||||
* on Event: ExitBootServices
|
to free up memory, stop the driver
|
||||||
* to free up memory, stop the driver
|
and uninstall the protocols
|
||||||
* and uninstall the protocols
|
**/
|
||||||
***************************************/
|
|
||||||
VOID
|
VOID
|
||||||
LcdGraphicsExitBootServicesEvent (
|
LcdGraphicsExitBootServicesEvent (
|
||||||
IN EFI_EVENT Event,
|
IN EFI_EVENT Event,
|
||||||
IN VOID *Context
|
IN VOID *Context
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// By default, this PCD is FALSE. But if a platform starts a predefined OS that
|
// By default, this PCD is FALSE. But if a platform starts a predefined OS
|
||||||
// does not use a framebuffer then we might want to disable the display controller
|
// that does not use a framebuffer then we might want to disable the display
|
||||||
// to avoid to display corrupted information on the screen.
|
// controller to avoid to display corrupted information on the screen.
|
||||||
if (FeaturePcdGet (PcdGopDisableOnExitBootServices)) {
|
if (FeaturePcdGet (PcdGopDisableOnExitBootServices)) {
|
||||||
// Turn-off the Display controller
|
// Turn-off the Display controller
|
||||||
LcdShutdown ();
|
LcdShutdown ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************
|
/** GraphicsOutput Protocol function, mapping to
|
||||||
* GraphicsOutput Protocol function, mapping to
|
EFI_GRAPHICS_OUTPUT_PROTOCOL.QueryMode
|
||||||
* EFI_GRAPHICS_OUTPUT_PROTOCOL.QueryMode
|
**/
|
||||||
***************************************/
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
LcdGraphicsQueryMode (
|
LcdGraphicsQueryMode (
|
||||||
@@ -263,7 +266,10 @@ LcdGraphicsQueryMode (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Error checking
|
// Error checking
|
||||||
if ( (This == NULL) || (Info == NULL) || (SizeOfInfo == NULL) || (ModeNumber >= This->Mode->MaxMode) ) {
|
if ((This == NULL) ||
|
||||||
|
(Info == NULL) ||
|
||||||
|
(SizeOfInfo == NULL) ||
|
||||||
|
(ModeNumber >= This->Mode->MaxMode)) {
|
||||||
DEBUG ((DEBUG_ERROR, "LcdGraphicsQueryMode: ERROR - For mode number %d : Invalid Parameter.\n", ModeNumber));
|
DEBUG ((DEBUG_ERROR, "LcdGraphicsQueryMode: ERROR - For mode number %d : Invalid Parameter.\n", ModeNumber));
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
@@ -286,10 +292,9 @@ EXIT:
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************
|
/** GraphicsOutput Protocol function, mapping to
|
||||||
* GraphicsOutput Protocol function, mapping to
|
EFI_GRAPHICS_OUTPUT_PROTOCOL.SetMode
|
||||||
* EFI_GRAPHICS_OUTPUT_PROTOCOL.SetMode
|
**/
|
||||||
***************************************/
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
LcdGraphicsSetMode (
|
LcdGraphicsSetMode (
|
||||||
@@ -345,7 +350,8 @@ LcdGraphicsSetMode (
|
|||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The UEFI spec requires that we now clear the visible portions of the output display to black.
|
// The UEFI spec requires that we now clear the visible portions of the
|
||||||
|
// output display to black.
|
||||||
|
|
||||||
// Set the fill colour to black
|
// Set the fill colour to black
|
||||||
SetMem (&FillColour, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
|
SetMem (&FillColour, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
|
||||||
@@ -361,7 +367,8 @@ LcdGraphicsSetMode (
|
|||||||
0,
|
0,
|
||||||
This->Mode->Info->HorizontalResolution,
|
This->Mode->Info->HorizontalResolution,
|
||||||
This->Mode->Info->VerticalResolution,
|
This->Mode->Info->VerticalResolution,
|
||||||
0);
|
0
|
||||||
|
);
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
return Status;
|
return Status;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>
|
Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -11,9 +11,8 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __ARM_VE_GRAPHICS_DXE_H__
|
#ifndef LCD_GRAPHICS_OUTPUT_DXE_H_
|
||||||
#define __ARM_VE_GRAPHICS_DXE_H__
|
#define LCD_GRAPHICS_OUTPUT_DXE_H_
|
||||||
|
|
||||||
|
|
||||||
#include <Base.h>
|
#include <Base.h>
|
||||||
|
|
||||||
@@ -25,7 +24,6 @@
|
|||||||
|
|
||||||
#include <Protocol/DevicePath.h>
|
#include <Protocol/DevicePath.h>
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Device structures
|
// Device structures
|
||||||
//
|
//
|
||||||
@@ -106,4 +104,4 @@ InitializeDisplay (
|
|||||||
IN LCD_INSTANCE* Instance
|
IN LCD_INSTANCE* Instance
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif /* __ARM_VE_GRAPHICS_DXE_H__ */
|
#endif /* LCD_GRAPHICS_OUTPUT_DXE_H_ */
|
||||||
|
@@ -32,9 +32,6 @@ NOR_FLASH_INSTANCE mNorFlashInstanceTemplate = {
|
|||||||
NOR_FLASH_SIGNATURE, // Signature
|
NOR_FLASH_SIGNATURE, // Signature
|
||||||
NULL, // Handle ... NEED TO BE FILLED
|
NULL, // Handle ... NEED TO BE FILLED
|
||||||
|
|
||||||
FALSE, // Initialized
|
|
||||||
NULL, // Initialize
|
|
||||||
|
|
||||||
0, // DeviceBaseAddress ... NEED TO BE FILLED
|
0, // DeviceBaseAddress ... NEED TO BE FILLED
|
||||||
0, // RegionBaseAddress ... NEED TO BE FILLED
|
0, // RegionBaseAddress ... NEED TO BE FILLED
|
||||||
0, // Size ... NEED TO BE FILLED
|
0, // Size ... NEED TO BE FILLED
|
||||||
@@ -69,7 +66,6 @@ NOR_FLASH_INSTANCE mNorFlashInstanceTemplate = {
|
|||||||
NorFlashDiskIoWriteDisk // WriteDisk
|
NorFlashDiskIoWriteDisk // WriteDisk
|
||||||
},
|
},
|
||||||
|
|
||||||
FALSE, // SupportFvb ... NEED TO BE FILLED
|
|
||||||
{
|
{
|
||||||
FvbGetAttributes, // GetAttributes
|
FvbGetAttributes, // GetAttributes
|
||||||
FvbSetAttributes, // SetAttributes
|
FvbSetAttributes, // SetAttributes
|
||||||
@@ -137,8 +133,7 @@ NorFlashCreateInstance (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (SupportFvb) {
|
if (SupportFvb) {
|
||||||
Instance->SupportFvb = TRUE;
|
NorFlashFvbInitialize (Instance);
|
||||||
Instance->Initialize = NorFlashFvbInitialize;
|
|
||||||
|
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&Instance->Handle,
|
&Instance->Handle,
|
||||||
@@ -152,8 +147,6 @@ NorFlashCreateInstance (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Instance->Initialized = TRUE;
|
|
||||||
|
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&Instance->Handle,
|
&Instance->Handle,
|
||||||
&gEfiDevicePathProtocolGuid, &Instance->DevicePath,
|
&gEfiDevicePathProtocolGuid, &Instance->DevicePath,
|
||||||
@@ -924,10 +917,6 @@ NorFlashWriteSingleBlock (
|
|||||||
|
|
||||||
PrevBlockAddress = 0;
|
PrevBlockAddress = 0;
|
||||||
|
|
||||||
if (!Instance->Initialized && Instance->Initialize) {
|
|
||||||
Instance->Initialize(Instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG ((DEBUG_BLKIO, "NorFlashWriteSingleBlock(Parameters: Lba=%ld, Offset=0x%x, *NumBytes=0x%x, Buffer @ 0x%08x)\n", Lba, Offset, *NumBytes, Buffer));
|
DEBUG ((DEBUG_BLKIO, "NorFlashWriteSingleBlock(Parameters: Lba=%ld, Offset=0x%x, *NumBytes=0x%x, Buffer @ 0x%08x)\n", Lba, Offset, *NumBytes, Buffer));
|
||||||
|
|
||||||
// Detect WriteDisabled state
|
// Detect WriteDisabled state
|
||||||
|
@@ -122,8 +122,6 @@
|
|||||||
|
|
||||||
typedef struct _NOR_FLASH_INSTANCE NOR_FLASH_INSTANCE;
|
typedef struct _NOR_FLASH_INSTANCE NOR_FLASH_INSTANCE;
|
||||||
|
|
||||||
typedef EFI_STATUS (*NOR_FLASH_INITIALIZE) (NOR_FLASH_INSTANCE* Instance);
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
VENDOR_DEVICE_PATH Vendor;
|
VENDOR_DEVICE_PATH Vendor;
|
||||||
EFI_DEVICE_PATH_PROTOCOL End;
|
EFI_DEVICE_PATH_PROTOCOL End;
|
||||||
@@ -133,9 +131,6 @@ struct _NOR_FLASH_INSTANCE {
|
|||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
EFI_HANDLE Handle;
|
EFI_HANDLE Handle;
|
||||||
|
|
||||||
BOOLEAN Initialized;
|
|
||||||
NOR_FLASH_INITIALIZE Initialize;
|
|
||||||
|
|
||||||
UINTN DeviceBaseAddress;
|
UINTN DeviceBaseAddress;
|
||||||
UINTN RegionBaseAddress;
|
UINTN RegionBaseAddress;
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
@@ -145,7 +140,6 @@ struct _NOR_FLASH_INSTANCE {
|
|||||||
EFI_BLOCK_IO_MEDIA Media;
|
EFI_BLOCK_IO_MEDIA Media;
|
||||||
EFI_DISK_IO_PROTOCOL DiskIoProtocol;
|
EFI_DISK_IO_PROTOCOL DiskIoProtocol;
|
||||||
|
|
||||||
BOOLEAN SupportFvb;
|
|
||||||
EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL FvbProtocol;
|
EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL FvbProtocol;
|
||||||
VOID* ShadowBuffer;
|
VOID* ShadowBuffer;
|
||||||
|
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
ArmPlatformPkg/ArmPlatformPkg.dec
|
ArmPlatformPkg/ArmPlatformPkg.dec
|
||||||
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
IoLib
|
IoLib
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
gEfiVariableGuid
|
gEfiVariableGuid
|
||||||
gEfiAuthenticatedVariableGuid
|
gEfiAuthenticatedVariableGuid
|
||||||
gEfiEventVirtualAddressChangeGuid
|
gEfiEventVirtualAddressChangeGuid
|
||||||
|
gEdkiiNvVarStoreFormattedGuid ## PRODUCES ## PROTOCOL
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiBlockIoProtocolGuid
|
gEfiBlockIoProtocolGuid
|
||||||
@@ -67,7 +69,4 @@
|
|||||||
gArmPlatformTokenSpaceGuid.PcdNorFlashCheckBlockLocked
|
gArmPlatformTokenSpaceGuid.PcdNorFlashCheckBlockLocked
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
#
|
gEfiCpuArchProtocolGuid
|
||||||
# NorFlashDxe must be loaded before VariableRuntimeDxe in case empty flash needs populating with default values
|
|
||||||
#
|
|
||||||
BEFORE gVariableRuntimeDxeFileGuid
|
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include <Guid/VariableFormat.h>
|
#include <Guid/VariableFormat.h>
|
||||||
#include <Guid/SystemNvDataGuid.h>
|
#include <Guid/SystemNvDataGuid.h>
|
||||||
|
#include <Guid/NvVarStoreFormatted.h>
|
||||||
|
|
||||||
#include "NorFlashDxe.h"
|
#include "NorFlashDxe.h"
|
||||||
|
|
||||||
@@ -59,10 +60,6 @@ InitializeFvAndVariableStoreHeaders (
|
|||||||
EFI_FIRMWARE_VOLUME_HEADER *FirmwareVolumeHeader;
|
EFI_FIRMWARE_VOLUME_HEADER *FirmwareVolumeHeader;
|
||||||
VARIABLE_STORE_HEADER *VariableStoreHeader;
|
VARIABLE_STORE_HEADER *VariableStoreHeader;
|
||||||
|
|
||||||
if (!Instance->Initialized && Instance->Initialize) {
|
|
||||||
Instance->Initialize (Instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
HeadersLength = sizeof(EFI_FIRMWARE_VOLUME_HEADER) + sizeof(EFI_FV_BLOCK_MAP_ENTRY) + sizeof(VARIABLE_STORE_HEADER);
|
HeadersLength = sizeof(EFI_FIRMWARE_VOLUME_HEADER) + sizeof(EFI_FV_BLOCK_MAP_ENTRY) + sizeof(VARIABLE_STORE_HEADER);
|
||||||
Headers = AllocateZeroPool(HeadersLength);
|
Headers = AllocateZeroPool(HeadersLength);
|
||||||
|
|
||||||
@@ -431,10 +428,6 @@ FvbRead (
|
|||||||
|
|
||||||
DEBUG ((DEBUG_BLKIO, "FvbRead(Parameters: Lba=%ld, Offset=0x%x, *NumBytes=0x%x, Buffer @ 0x%08x)\n", Instance->StartLba + Lba, Offset, *NumBytes, Buffer));
|
DEBUG ((DEBUG_BLKIO, "FvbRead(Parameters: Lba=%ld, Offset=0x%x, *NumBytes=0x%x, Buffer @ 0x%08x)\n", Instance->StartLba + Lba, Offset, *NumBytes, Buffer));
|
||||||
|
|
||||||
if (!Instance->Initialized && Instance->Initialize) {
|
|
||||||
Instance->Initialize(Instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
TempStatus = EFI_SUCCESS;
|
TempStatus = EFI_SUCCESS;
|
||||||
|
|
||||||
// Cache the block size to avoid de-referencing pointers all the time
|
// Cache the block size to avoid de-referencing pointers all the time
|
||||||
@@ -749,7 +742,6 @@ NorFlashFvbInitialize (
|
|||||||
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
|
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Instance->Initialized = TRUE;
|
|
||||||
mFlashNvStorageVariableBase = FixedPcdGet32 (PcdFlashNvStorageVariableBase);
|
mFlashNvStorageVariableBase = FixedPcdGet32 (PcdFlashNvStorageVariableBase);
|
||||||
|
|
||||||
// Set the index of the first LBA for the FVB
|
// Set the index of the first LBA for the FVB
|
||||||
@@ -785,6 +777,18 @@ NorFlashFvbInitialize (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// The driver implementing the variable read service can now be dispatched;
|
||||||
|
// the varstore headers are in place.
|
||||||
|
//
|
||||||
|
Status = gBS->InstallProtocolInterface (
|
||||||
|
&gImageHandle,
|
||||||
|
&gEdkiiNvVarStoreFormattedGuid,
|
||||||
|
EFI_NATIVE_INTERFACE,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Register for the virtual address change event
|
// Register for the virtual address change event
|
||||||
//
|
//
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>
|
Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -11,16 +11,14 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __LCDPLATFORMLIB_H
|
#ifndef LCD_PLATFORM_LIB_H_
|
||||||
#define __LCDPLATFORMLIB_H
|
#define LCD_PLATFORM_LIB_H_
|
||||||
|
|
||||||
#include <Protocol/GraphicsOutput.h>
|
#include <Protocol/GraphicsOutput.h>
|
||||||
|
|
||||||
#define LCD_VRAM_SIZE SIZE_8MB
|
#define LCD_VRAM_SIZE SIZE_8MB
|
||||||
|
|
||||||
//
|
|
||||||
// Modes definitions
|
// Modes definitions
|
||||||
//
|
|
||||||
#define VGA 0
|
#define VGA 0
|
||||||
#define SVGA 1
|
#define SVGA 1
|
||||||
#define XGA 2
|
#define XGA 2
|
||||||
@@ -28,10 +26,13 @@
|
|||||||
#define WSXGA 4
|
#define WSXGA 4
|
||||||
#define UXGA 5
|
#define UXGA 5
|
||||||
#define HD 6
|
#define HD 6
|
||||||
|
#define WVGA 7
|
||||||
|
#define QHD 8
|
||||||
|
#define WSVGA 9
|
||||||
|
#define HD720 10
|
||||||
|
#define WXGA 11
|
||||||
|
|
||||||
//
|
|
||||||
// VGA Mode: 640 x 480
|
// VGA Mode: 640 x 480
|
||||||
//
|
|
||||||
#define VGA_H_RES_PIXELS 640
|
#define VGA_H_RES_PIXELS 640
|
||||||
#define VGA_V_RES_PIXELS 480
|
#define VGA_V_RES_PIXELS 480
|
||||||
#define VGA_OSC_FREQUENCY 23750000 /* 0x016A6570 */
|
#define VGA_OSC_FREQUENCY 23750000 /* 0x016A6570 */
|
||||||
@@ -44,9 +45,7 @@
|
|||||||
#define VGA_V_FRONT_PORCH ( 3 - 1)
|
#define VGA_V_FRONT_PORCH ( 3 - 1)
|
||||||
#define VGA_V_BACK_PORCH ( 13 - 1)
|
#define VGA_V_BACK_PORCH ( 13 - 1)
|
||||||
|
|
||||||
//
|
|
||||||
// SVGA Mode: 800 x 600
|
// SVGA Mode: 800 x 600
|
||||||
//
|
|
||||||
#define SVGA_H_RES_PIXELS 800
|
#define SVGA_H_RES_PIXELS 800
|
||||||
#define SVGA_V_RES_PIXELS 600
|
#define SVGA_V_RES_PIXELS 600
|
||||||
#define SVGA_OSC_FREQUENCY 38250000 /* 0x0247A610 */
|
#define SVGA_OSC_FREQUENCY 38250000 /* 0x0247A610 */
|
||||||
@@ -59,9 +58,7 @@
|
|||||||
#define SVGA_V_FRONT_PORCH ( 3 - 1)
|
#define SVGA_V_FRONT_PORCH ( 3 - 1)
|
||||||
#define SVGA_V_BACK_PORCH ( 17 - 1)
|
#define SVGA_V_BACK_PORCH ( 17 - 1)
|
||||||
|
|
||||||
//
|
|
||||||
// XGA Mode: 1024 x 768
|
// XGA Mode: 1024 x 768
|
||||||
//
|
|
||||||
#define XGA_H_RES_PIXELS 1024
|
#define XGA_H_RES_PIXELS 1024
|
||||||
#define XGA_V_RES_PIXELS 768
|
#define XGA_V_RES_PIXELS 768
|
||||||
#define XGA_OSC_FREQUENCY 63500000 /* 0x03C8EEE0 */
|
#define XGA_OSC_FREQUENCY 63500000 /* 0x03C8EEE0 */
|
||||||
@@ -74,9 +71,7 @@
|
|||||||
#define XGA_V_FRONT_PORCH ( 3 - 1)
|
#define XGA_V_FRONT_PORCH ( 3 - 1)
|
||||||
#define XGA_V_BACK_PORCH ( 23 - 1)
|
#define XGA_V_BACK_PORCH ( 23 - 1)
|
||||||
|
|
||||||
//
|
|
||||||
// SXGA Mode: 1280 x 1024
|
// SXGA Mode: 1280 x 1024
|
||||||
//
|
|
||||||
#define SXGA_H_RES_PIXELS 1280
|
#define SXGA_H_RES_PIXELS 1280
|
||||||
#define SXGA_V_RES_PIXELS 1024
|
#define SXGA_V_RES_PIXELS 1024
|
||||||
#define SXGA_OSC_FREQUENCY 109000000 /* 0x067F3540 */
|
#define SXGA_OSC_FREQUENCY 109000000 /* 0x067F3540 */
|
||||||
@@ -89,9 +84,7 @@
|
|||||||
#define SXGA_V_FRONT_PORCH ( 3 - 1)
|
#define SXGA_V_FRONT_PORCH ( 3 - 1)
|
||||||
#define SXGA_V_BACK_PORCH ( 29 - 1)
|
#define SXGA_V_BACK_PORCH ( 29 - 1)
|
||||||
|
|
||||||
//
|
|
||||||
// WSXGA+ Mode: 1680 x 1050
|
// WSXGA+ Mode: 1680 x 1050
|
||||||
//
|
|
||||||
#define WSXGA_H_RES_PIXELS 1680
|
#define WSXGA_H_RES_PIXELS 1680
|
||||||
#define WSXGA_V_RES_PIXELS 1050
|
#define WSXGA_V_RES_PIXELS 1050
|
||||||
#define WSXGA_OSC_FREQUENCY 147000000 /* 0x08C30AC0 */
|
#define WSXGA_OSC_FREQUENCY 147000000 /* 0x08C30AC0 */
|
||||||
@@ -104,9 +97,7 @@
|
|||||||
#define WSXGA_V_FRONT_PORCH ( 4 - 1)
|
#define WSXGA_V_FRONT_PORCH ( 4 - 1)
|
||||||
#define WSXGA_V_BACK_PORCH ( 41 - 1)
|
#define WSXGA_V_BACK_PORCH ( 41 - 1)
|
||||||
|
|
||||||
//
|
|
||||||
// UXGA Mode: 1600 x 1200
|
// UXGA Mode: 1600 x 1200
|
||||||
//
|
|
||||||
#define UXGA_H_RES_PIXELS 1600
|
#define UXGA_H_RES_PIXELS 1600
|
||||||
#define UXGA_V_RES_PIXELS 1200
|
#define UXGA_V_RES_PIXELS 1200
|
||||||
#define UXGA_OSC_FREQUENCY 161000000 /* 0x0998AA40 */
|
#define UXGA_OSC_FREQUENCY 161000000 /* 0x0998AA40 */
|
||||||
@@ -119,9 +110,7 @@
|
|||||||
#define UXGA_V_FRONT_PORCH ( 3 - 1)
|
#define UXGA_V_FRONT_PORCH ( 3 - 1)
|
||||||
#define UXGA_V_BACK_PORCH ( 38 - 1)
|
#define UXGA_V_BACK_PORCH ( 38 - 1)
|
||||||
|
|
||||||
//
|
|
||||||
// HD Mode: 1920 x 1080
|
// HD Mode: 1920 x 1080
|
||||||
//
|
|
||||||
#define HD_H_RES_PIXELS 1920
|
#define HD_H_RES_PIXELS 1920
|
||||||
#define HD_V_RES_PIXELS 1080
|
#define HD_V_RES_PIXELS 1080
|
||||||
#define HD_OSC_FREQUENCY 165000000 /* 0x09D5B340 */
|
#define HD_OSC_FREQUENCY 165000000 /* 0x09D5B340 */
|
||||||
@@ -134,10 +123,62 @@
|
|||||||
#define HD_V_FRONT_PORCH ( 3 - 1)
|
#define HD_V_FRONT_PORCH ( 3 - 1)
|
||||||
#define HD_V_BACK_PORCH ( 32 - 1)
|
#define HD_V_BACK_PORCH ( 32 - 1)
|
||||||
|
|
||||||
//
|
// WVGA Mode: 800 x 480
|
||||||
// Colour Masks
|
#define WVGA_H_RES_PIXELS 800
|
||||||
//
|
#define WVGA_V_RES_PIXELS 480
|
||||||
|
#define WVGA_OSC_FREQUENCY 29500000 /* 0x01C22260 */
|
||||||
|
#define WVGA_H_SYNC ( 72 - 1)
|
||||||
|
#define WVGA_H_FRONT_PORCH ( 24 - 1)
|
||||||
|
#define WVGA_H_BACK_PORCH ( 96 - 1)
|
||||||
|
#define WVGA_V_SYNC ( 7 - 1)
|
||||||
|
#define WVGA_V_FRONT_PORCH ( 3 - 1)
|
||||||
|
#define WVGA_V_BACK_PORCH ( 10 - 1)
|
||||||
|
|
||||||
|
// QHD Mode: 960 x 540
|
||||||
|
#define QHD_H_RES_PIXELS 960
|
||||||
|
#define QHD_V_RES_PIXELS 540
|
||||||
|
#define QHD_OSC_FREQUENCY 40750000 /* 0x026DCBB0 */
|
||||||
|
#define QHD_H_SYNC ( 96 - 1)
|
||||||
|
#define QHD_H_FRONT_PORCH ( 32 - 1)
|
||||||
|
#define QHD_H_BACK_PORCH (128 - 1)
|
||||||
|
#define QHD_V_SYNC ( 5 - 1)
|
||||||
|
#define QHD_V_FRONT_PORCH ( 3 - 1)
|
||||||
|
#define QHD_V_BACK_PORCH ( 14 - 1)
|
||||||
|
|
||||||
|
// WSVGA Mode: 1024 x 600
|
||||||
|
#define WSVGA_H_RES_PIXELS 1024
|
||||||
|
#define WSVGA_V_RES_PIXELS 600
|
||||||
|
#define WSVGA_OSC_FREQUENCY 49000000 /* 0x02EBAE40 */
|
||||||
|
#define WSVGA_H_SYNC (104 - 1)
|
||||||
|
#define WSVGA_H_FRONT_PORCH ( 40 - 1)
|
||||||
|
#define WSVGA_H_BACK_PORCH (144 - 1)
|
||||||
|
#define WSVGA_V_SYNC ( 10 - 1)
|
||||||
|
#define WSVGA_V_FRONT_PORCH ( 3 - 1)
|
||||||
|
#define WSVGA_V_BACK_PORCH ( 11 - 1)
|
||||||
|
|
||||||
|
// HD720 Mode: 1280 x 720
|
||||||
|
#define HD720_H_RES_PIXELS 1280
|
||||||
|
#define HD720_V_RES_PIXELS 720
|
||||||
|
#define HD720_OSC_FREQUENCY 74500000 /* 0x0470C7A0 */
|
||||||
|
#define HD720_H_SYNC (128 - 1)
|
||||||
|
#define HD720_H_FRONT_PORCH ( 64 - 1)
|
||||||
|
#define HD720_H_BACK_PORCH (192 - 1)
|
||||||
|
#define HD720_V_SYNC ( 5 - 1)
|
||||||
|
#define HD720_V_FRONT_PORCH ( 3 - 1)
|
||||||
|
#define HD720_V_BACK_PORCH ( 20 - 1)
|
||||||
|
|
||||||
|
// WXGA Mode: 1280 x 800
|
||||||
|
#define WXGA_H_RES_PIXELS 1280
|
||||||
|
#define WXGA_V_RES_PIXELS 800
|
||||||
|
#define WXGA_OSC_FREQUENCY 83500000 /* 0x04FA1BE0 */
|
||||||
|
#define WXGA_H_SYNC (128 - 1)
|
||||||
|
#define WXGA_H_FRONT_PORCH ( 72 - 1)
|
||||||
|
#define WXGA_H_BACK_PORCH (200 - 1)
|
||||||
|
#define WXGA_V_SYNC ( 6 - 1)
|
||||||
|
#define WXGA_V_FRONT_PORCH ( 3 - 1)
|
||||||
|
#define WXGA_V_BACK_PORCH ( 22 - 1)
|
||||||
|
|
||||||
|
// Colour Masks
|
||||||
#define LCD_24BPP_RED_MASK 0x00FF0000
|
#define LCD_24BPP_RED_MASK 0x00FF0000
|
||||||
#define LCD_24BPP_GREEN_MASK 0x0000FF00
|
#define LCD_24BPP_GREEN_MASK 0x0000FF00
|
||||||
#define LCD_24BPP_BLUE_MASK 0x000000FF
|
#define LCD_24BPP_BLUE_MASK 0x000000FF
|
||||||
@@ -158,8 +199,9 @@
|
|||||||
#define LCD_12BPP_444_BLUE_MASK 0x0000000F
|
#define LCD_12BPP_444_BLUE_MASK 0x0000000F
|
||||||
#define LCD_12BPP_444_RESERVED_MASK 0x0000F000
|
#define LCD_12BPP_444_RESERVED_MASK 0x0000F000
|
||||||
|
|
||||||
|
/** The enumeration maps the PL111 LcdBpp values used in the LCD Control
|
||||||
// The enumeration indexes maps the PL111 LcdBpp values used in the LCD Control Register
|
Register
|
||||||
|
**/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LCD_BITS_PER_PIXEL_1 = 0,
|
LCD_BITS_PER_PIXEL_1 = 0,
|
||||||
LCD_BITS_PER_PIXEL_2,
|
LCD_BITS_PER_PIXEL_2,
|
||||||
@@ -171,51 +213,120 @@ typedef enum {
|
|||||||
LCD_BITS_PER_PIXEL_12_444
|
LCD_BITS_PER_PIXEL_12_444
|
||||||
} LCD_BPP;
|
} LCD_BPP;
|
||||||
|
|
||||||
|
// Display timing settings.
|
||||||
|
typedef struct {
|
||||||
|
UINT32 Resolution;
|
||||||
|
UINT32 Sync;
|
||||||
|
UINT32 BackPorch;
|
||||||
|
UINT32 FrontPorch;
|
||||||
|
} SCAN_TIMINGS;
|
||||||
|
|
||||||
|
/** Platform related initialization function.
|
||||||
|
|
||||||
|
@param[in] Handle Handle to the LCD device instance.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Plaform library initialized successfully.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformInitializeDisplay (
|
LcdPlatformInitializeDisplay (
|
||||||
IN EFI_HANDLE Handle
|
IN EFI_HANDLE Handle
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** Allocate VRAM memory in DRAM for the framebuffer
|
||||||
|
(unless it is reserved already).
|
||||||
|
|
||||||
|
The allocated address can be used to set the framebuffer.
|
||||||
|
|
||||||
|
@param[out] VramBaseAddress A pointer to the framebuffer address.
|
||||||
|
@param[out] VramSize A pointer to the size of the frame
|
||||||
|
buffer in bytes
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Frame buffer memory allocated successfully.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformGetVram (
|
LcdPlatformGetVram (
|
||||||
OUT EFI_PHYSICAL_ADDRESS* VramBaseAddress,
|
OUT EFI_PHYSICAL_ADDRESS* VramBaseAddress,
|
||||||
OUT UINTN* VramSize
|
OUT UINTN* VramSize
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** Return total number of modes supported.
|
||||||
|
|
||||||
|
Note: Valid mode numbers are 0 to MaxMode - 1
|
||||||
|
See Section 12.9 of the UEFI Specification 2.7
|
||||||
|
|
||||||
|
@retval UINT32 Mode Number.
|
||||||
|
**/
|
||||||
UINT32
|
UINT32
|
||||||
LcdPlatformGetMaxMode (
|
LcdPlatformGetMaxMode (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** Set the requested display mode.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Mode Number.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Mode set successfully.
|
||||||
|
@retval EFI_INVALID_PARAMETER Requested mode not found.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformSetMode (
|
LcdPlatformSetMode (
|
||||||
IN UINT32 ModeNumber
|
IN UINT32 ModeNumber
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** Return information for the requested mode number.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Mode Number.
|
||||||
|
@param[out] Info Pointer for returned mode information
|
||||||
|
(on success).
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Mode information for the requested mode
|
||||||
|
returned successfully.
|
||||||
|
@retval EFI_INVALID_PARAMETER Requested mode not found.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformQueryMode (
|
LcdPlatformQueryMode (
|
||||||
IN UINT32 ModeNumber,
|
IN UINT32 ModeNumber,
|
||||||
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info
|
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** Return display timing information for the requested mode number.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Mode Number.
|
||||||
|
|
||||||
|
@param[out] Horizontal Pointer to horizontal timing parameters.
|
||||||
|
(Resolution, Sync, Back porch, Front porch)
|
||||||
|
@param[out] Vertical Pointer to vertical timing parameters.
|
||||||
|
(Resolution, Sync, Back porch, Front porch)
|
||||||
|
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Display timing information for the requested
|
||||||
|
mode returned successfully.
|
||||||
|
@retval EFI_INVALID_PARAMETER Requested mode not found.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformGetTimings (
|
LcdPlatformGetTimings (
|
||||||
IN UINT32 ModeNumber,
|
IN UINT32 ModeNumber,
|
||||||
OUT UINT32* HRes,
|
OUT SCAN_TIMINGS **Horizontal,
|
||||||
OUT UINT32* HSync,
|
OUT SCAN_TIMINGS **Vertical
|
||||||
OUT UINT32* HBackPorch,
|
|
||||||
OUT UINT32* HFrontPorch,
|
|
||||||
OUT UINT32* VRes,
|
|
||||||
OUT UINT32* VSync,
|
|
||||||
OUT UINT32* VBackPorch,
|
|
||||||
OUT UINT32* VFrontPorch
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** Return bits per pixel information for a mode number.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Mode Number.
|
||||||
|
|
||||||
|
@param[out] Bpp Pointer to value bits per pixel information.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Bit per pixel information for the requested
|
||||||
|
mode returned successfully.
|
||||||
|
@retval EFI_INVALID_PARAMETER Requested mode not found.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformGetBpp (
|
LcdPlatformGetBpp (
|
||||||
IN UINT32 ModeNumber,
|
IN UINT32 ModeNumber,
|
||||||
OUT LCD_BPP* Bpp
|
OUT LCD_BPP* Bpp
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif /* LCD_PLATFORM_LIB_H_ */
|
||||||
|
31
ArmPlatformPkg/Include/Library/PL011UartClockLib.h
Normal file
31
ArmPlatformPkg/Include/Library/PL011UartClockLib.h
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/** @file
|
||||||
|
*
|
||||||
|
* Copyright 2018 NXP
|
||||||
|
*
|
||||||
|
* This program and the accompanying materials
|
||||||
|
* are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
* which accompanies this distribution. The full text of the license may be found at
|
||||||
|
* http://opensource.org/licenses/bsd-license.php
|
||||||
|
*
|
||||||
|
* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef __PL011UARTCLOCKLIB_H__
|
||||||
|
#define __PL011UARTCLOCKLIB_H__
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Return baud clock frequency of PL011.
|
||||||
|
|
||||||
|
@return return frequency of PL011 in Hz
|
||||||
|
|
||||||
|
**/
|
||||||
|
UINT32
|
||||||
|
EFIAPI
|
||||||
|
PL011UartClockGetFreq (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif
|
409
ArmPlatformPkg/Library/ArmMaliDp/ArmMaliDp.c
Normal file
409
ArmPlatformPkg/Library/ArmMaliDp/ArmMaliDp.c
Normal file
@@ -0,0 +1,409 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
ARM Mali DP 500/550/650 display controller driver
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.<BR>
|
||||||
|
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/IoLib.h>
|
||||||
|
#include <Library/LcdHwLib.h>
|
||||||
|
#include <Library/LcdPlatformLib.h>
|
||||||
|
#include <Library/MemoryAllocationLib.h>
|
||||||
|
|
||||||
|
#include "ArmMaliDp.h"
|
||||||
|
|
||||||
|
// CORE_ID of the MALI DP
|
||||||
|
STATIC UINT32 mDpDeviceId;
|
||||||
|
|
||||||
|
/** Disable the graphics layer
|
||||||
|
|
||||||
|
This is done by clearing the EN bit of the LG_CONTROL register.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
LayerGraphicsDisable (VOID)
|
||||||
|
{
|
||||||
|
MmioAnd32 (DP_BASE + DP_DE_LG_CONTROL, ~DP_DE_LG_ENABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Enable the graphics layer
|
||||||
|
|
||||||
|
This is done by setting the EN bit of the LG_CONTROL register.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
LayerGraphicsEnable (VOID)
|
||||||
|
{
|
||||||
|
MmioOr32 (DP_BASE + DP_DE_LG_CONTROL, DP_DE_LG_ENABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set the frame address of the graphics layer.
|
||||||
|
|
||||||
|
@param[in] FrameBaseAddress Address of the data buffer to be used as
|
||||||
|
a framebuffer.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
LayerGraphicsSetFrame (
|
||||||
|
IN CONST EFI_PHYSICAL_ADDRESS FrameBaseAddress
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Disable the graphics layer.
|
||||||
|
LayerGraphicsDisable ();
|
||||||
|
|
||||||
|
// Set up memory address of the data buffer for graphics layer.
|
||||||
|
// write lower bits of the address.
|
||||||
|
MmioWrite32 (
|
||||||
|
DP_BASE + DP_DE_LG_PTR_LOW,
|
||||||
|
DP_DE_LG_PTR_LOW_MASK & FrameBaseAddress
|
||||||
|
);
|
||||||
|
|
||||||
|
// Write higher bits of the address.
|
||||||
|
MmioWrite32 (
|
||||||
|
DP_BASE + DP_DE_LG_PTR_HIGH,
|
||||||
|
(UINT32)(FrameBaseAddress >> DP_DE_LG_PTR_HIGH_SHIFT)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Enable the graphics layer.
|
||||||
|
LayerGraphicsEnable ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configures various graphics layer characteristics.
|
||||||
|
|
||||||
|
@param[in] UefiGfxPixelFormat This must be either
|
||||||
|
PixelBlueGreenRedReserved8BitPerColor
|
||||||
|
OR
|
||||||
|
PixelRedGreenBlueReserved8BitPerColor
|
||||||
|
@param[in] HRes Horizontal resolution of the graphics layer.
|
||||||
|
@param[in] VRes Vertical resolution of the graphics layer.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
LayerGraphicsConfig (
|
||||||
|
IN CONST EFI_GRAPHICS_PIXEL_FORMAT UefiGfxPixelFormat,
|
||||||
|
IN CONST UINT32 HRes,
|
||||||
|
IN CONST UINT32 VRes
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UINT32 PixelFormat;
|
||||||
|
|
||||||
|
// Disable the graphics layer before configuring any settings.
|
||||||
|
LayerGraphicsDisable ();
|
||||||
|
|
||||||
|
// Setup graphics layer size.
|
||||||
|
MmioWrite32 (DP_BASE + DP_DE_LG_IN_SIZE, FRAME_IN_SIZE (HRes, VRes));
|
||||||
|
|
||||||
|
// Setup graphics layer composition size.
|
||||||
|
MmioWrite32 (DP_BASE + DP_DE_LG_CMP_SIZE, FRAME_CMP_SIZE (HRes, VRes));
|
||||||
|
|
||||||
|
// Setup memory stride (total visible pixels on a line * 4).
|
||||||
|
MmioWrite32 (DP_BASE + DP_DE_LG_H_STRIDE, (HRes * sizeof (UINT32)));
|
||||||
|
|
||||||
|
// Set the format.
|
||||||
|
|
||||||
|
// In PixelBlueGreenRedReserved8BitPerColor format, byte 0 represents blue,
|
||||||
|
// byte 1 represents green, byte 2 represents red, and byte 3 is reserved
|
||||||
|
// which is equivalent to XRGB format of the DP500/DP550/DP650. Whereas
|
||||||
|
// PixelRedGreenBlueReserved8BitPerColor is equivalent to XBGR of the
|
||||||
|
// DP500/DP550/DP650.
|
||||||
|
if (UefiGfxPixelFormat == PixelBlueGreenRedReserved8BitPerColor) {
|
||||||
|
PixelFormat = (mDpDeviceId == MALIDP_500) ? DP_PIXEL_FORMAT_DP500_XRGB_8888
|
||||||
|
: DP_PIXEL_FORMAT_XRGB_8888;
|
||||||
|
} else {
|
||||||
|
PixelFormat = (mDpDeviceId == MALIDP_500) ? DP_PIXEL_FORMAT_DP500_XBGR_8888
|
||||||
|
: DP_PIXEL_FORMAT_XBGR_8888;
|
||||||
|
}
|
||||||
|
|
||||||
|
MmioWrite32 (DP_BASE + DP_DE_LG_FORMAT, PixelFormat);
|
||||||
|
|
||||||
|
// Enable graphics layer.
|
||||||
|
LayerGraphicsEnable ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configure timing information of the display.
|
||||||
|
|
||||||
|
@param[in] Horizontal Pointer to horizontal timing parameters.
|
||||||
|
(Resolution, Sync, Back porch, Front porch)
|
||||||
|
@param[in] Vertical Pointer to vertical timing parameters.
|
||||||
|
(Resolution, Sync, Back porch, Front porch)
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
SetDisplayEngineTiming (
|
||||||
|
IN CONST SCAN_TIMINGS * CONST Horizontal,
|
||||||
|
IN CONST SCAN_TIMINGS * CONST Vertical
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UINTN RegHIntervals;
|
||||||
|
UINTN RegVIntervals;
|
||||||
|
UINTN RegSyncControl;
|
||||||
|
UINTN RegHVActiveSize;
|
||||||
|
|
||||||
|
if (mDpDeviceId == MALIDP_500) {
|
||||||
|
// MALI DP500 timing registers.
|
||||||
|
RegHIntervals = DP_BASE + DP_DE_DP500_H_INTERVALS;
|
||||||
|
RegVIntervals = DP_BASE + DP_DE_DP500_V_INTERVALS;
|
||||||
|
RegSyncControl = DP_BASE + DP_DE_DP500_SYNC_CONTROL;
|
||||||
|
RegHVActiveSize = DP_BASE + DP_DE_DP500_HV_ACTIVESIZE;
|
||||||
|
} else {
|
||||||
|
// MALI DP550/DP650 timing registers.
|
||||||
|
RegHIntervals = DP_BASE + DP_DE_H_INTERVALS;
|
||||||
|
RegVIntervals = DP_BASE + DP_DE_V_INTERVALS;
|
||||||
|
RegSyncControl = DP_BASE + DP_DE_SYNC_CONTROL;
|
||||||
|
RegHVActiveSize = DP_BASE + DP_DE_HV_ACTIVESIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Horizontal back porch and front porch.
|
||||||
|
MmioWrite32 (
|
||||||
|
RegHIntervals,
|
||||||
|
H_INTERVALS (Horizontal->FrontPorch, Horizontal->BackPorch)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Vertical back porch and front porch.
|
||||||
|
MmioWrite32 (
|
||||||
|
RegVIntervals,
|
||||||
|
V_INTERVALS (Vertical->FrontPorch, Vertical->BackPorch)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Sync control, Horizontal and Vertical sync.
|
||||||
|
MmioWrite32 (
|
||||||
|
RegSyncControl,
|
||||||
|
SYNC_WIDTH (Horizontal->Sync, Vertical->Sync)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Set up Horizontal and Vertical area size.
|
||||||
|
MmioWrite32 (
|
||||||
|
RegHVActiveSize,
|
||||||
|
HV_ACTIVE (Horizontal->Resolution, Vertical->Resolution)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return CORE_ID of the ARM Mali DP.
|
||||||
|
|
||||||
|
@retval 0xFFF No Mali DP found.
|
||||||
|
@retval 0x500 Mali DP core id for DP500.
|
||||||
|
@retval 0x550 Mali DP core id for DP550.
|
||||||
|
@retval 0x650 Mali DP core id for DP650.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
UINT32
|
||||||
|
ArmMaliDpGetCoreId (
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UINT32 DpCoreId;
|
||||||
|
|
||||||
|
// First check for DP500 as register offset for DP550/DP650 CORE_ID
|
||||||
|
// is beyond 3K/4K register space of the DP500.
|
||||||
|
DpCoreId = MmioRead32 (DP_BASE + DP_DE_DP500_CORE_ID);
|
||||||
|
DpCoreId >>= DP_DE_DP500_CORE_ID_SHIFT;
|
||||||
|
|
||||||
|
if (DpCoreId == MALIDP_500) {
|
||||||
|
return DpCoreId;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for DP550 or DP650.
|
||||||
|
DpCoreId = MmioRead32 (DP_BASE + DP_DC_CORE_ID);
|
||||||
|
DpCoreId >>= DP_DC_CORE_ID_SHIFT;
|
||||||
|
|
||||||
|
if ((DpCoreId == MALIDP_550) || (DpCoreId == MALIDP_650)) {
|
||||||
|
return DpCoreId;
|
||||||
|
}
|
||||||
|
|
||||||
|
return MALIDP_NOT_PRESENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Check for presence of MALI.
|
||||||
|
|
||||||
|
This function returns success if the platform implements
|
||||||
|
DP500/DP550/DP650 ARM Mali display processor.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS DP500/DP550/DP650 display processor found
|
||||||
|
on the platform.
|
||||||
|
@retval EFI_NOT_FOUND DP500/DP550/DP650 display processor not found
|
||||||
|
on the platform.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
LcdIdentify (VOID)
|
||||||
|
{
|
||||||
|
DEBUG ((DEBUG_WARN,
|
||||||
|
"Probing ARM Mali DP500/DP550/DP650 at base address 0x%p\n",
|
||||||
|
DP_BASE
|
||||||
|
));
|
||||||
|
|
||||||
|
if (mDpDeviceId == 0) {
|
||||||
|
mDpDeviceId = ArmMaliDpGetCoreId ();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mDpDeviceId == MALIDP_NOT_PRESENT) {
|
||||||
|
DEBUG ((DEBUG_WARN, "ARM Mali DP not found...\n"));
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEBUG ((DEBUG_WARN, "Found ARM Mali DP %x\n", mDpDeviceId));
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Initialize platform display.
|
||||||
|
|
||||||
|
@param[in] FrameBaseAddress Address of the frame buffer.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Display initialization successful.
|
||||||
|
@retval !(EFI_SUCCESS) Display initialization failure.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
LcdInitialize (
|
||||||
|
IN CONST EFI_PHYSICAL_ADDRESS FrameBaseAddress
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DEBUG ((DEBUG_WARN, "Framebuffer base address = %p\n", FrameBaseAddress));
|
||||||
|
|
||||||
|
if (mDpDeviceId == 0) {
|
||||||
|
mDpDeviceId = ArmMaliDpGetCoreId ();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mDpDeviceId == MALIDP_NOT_PRESENT) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "ARM Mali DP initialization failed,"
|
||||||
|
"no ARM Mali DP present\n"));
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We are using graphics layer of the Mali DP as a main framebuffer.
|
||||||
|
LayerGraphicsSetFrame (FrameBaseAddress);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set ARM Mali DP in cofiguration mode.
|
||||||
|
|
||||||
|
The ARM Mali DP must be in the configuration mode for
|
||||||
|
configuration of the H_INTERVALS, V_INTERVALS, SYNC_CONTROL
|
||||||
|
and HV_ACTIVESIZE.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
SetConfigurationMode (VOID)
|
||||||
|
{
|
||||||
|
// Request configuration Mode.
|
||||||
|
if (mDpDeviceId == MALIDP_500) {
|
||||||
|
MmioOr32 (DP_BASE + DP_DE_DP500_CONTROL, DP_DE_DP500_CONTROL_CONFIG_REQ);
|
||||||
|
} else {
|
||||||
|
MmioOr32 (DP_BASE + DP_DC_CONTROL, DP_DC_CONTROL_CM_ACTIVE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set ARM Mali DP in normal mode.
|
||||||
|
|
||||||
|
Normal mode is the main operating mode of the display processor
|
||||||
|
in which display layer data is fetched from framebuffer and
|
||||||
|
displayed.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
SetNormalMode (VOID)
|
||||||
|
{
|
||||||
|
// Disable configuration Mode.
|
||||||
|
if (mDpDeviceId == MALIDP_500) {
|
||||||
|
MmioAnd32 (DP_BASE + DP_DE_DP500_CONTROL, ~DP_DE_DP500_CONTROL_CONFIG_REQ);
|
||||||
|
} else {
|
||||||
|
MmioAnd32 (DP_BASE + DP_DC_CONTROL, ~DP_DC_CONTROL_CM_ACTIVE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set the global configuration valid flag.
|
||||||
|
|
||||||
|
Any new configuration parameters written to the display engine are not
|
||||||
|
activated until the global configuration valid flag is set in the
|
||||||
|
CONFIG_VALID register.
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
SetConfigValid (VOID)
|
||||||
|
{
|
||||||
|
if (mDpDeviceId == MALIDP_500) {
|
||||||
|
MmioOr32 (DP_BASE + DP_DP500_CONFIG_VALID, DP_DC_CONFIG_VALID);
|
||||||
|
} else {
|
||||||
|
MmioOr32 (DP_BASE + DP_DC_CONFIG_VALID, DP_DC_CONFIG_VALID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set requested mode of the display.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Display mode number.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Display mode set successful.
|
||||||
|
@retval EFI_DEVICE_ERROR Display mode not found/supported.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
LcdSetMode (
|
||||||
|
IN CONST UINT32 ModeNumber
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
SCAN_TIMINGS *Horizontal;
|
||||||
|
SCAN_TIMINGS *Vertical;
|
||||||
|
|
||||||
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION ModeInfo;
|
||||||
|
|
||||||
|
// Get the display mode timings and other relevant information.
|
||||||
|
Status = LcdPlatformGetTimings (
|
||||||
|
ModeNumber,
|
||||||
|
&Horizontal,
|
||||||
|
&Vertical
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASSERT (Horizontal != NULL);
|
||||||
|
ASSERT (Vertical != NULL);
|
||||||
|
|
||||||
|
// Get the pixel format information.
|
||||||
|
Status = LcdPlatformQueryMode (ModeNumber, &ModeInfo);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Request configuration mode.
|
||||||
|
SetConfigurationMode ();
|
||||||
|
|
||||||
|
// Configure the graphics layer.
|
||||||
|
LayerGraphicsConfig (
|
||||||
|
ModeInfo.PixelFormat,
|
||||||
|
Horizontal->Resolution,
|
||||||
|
Vertical->Resolution
|
||||||
|
);
|
||||||
|
|
||||||
|
// Set the display engine timings.
|
||||||
|
SetDisplayEngineTiming (Horizontal, Vertical);
|
||||||
|
|
||||||
|
// After configuration, set Mali DP in normal mode.
|
||||||
|
SetNormalMode ();
|
||||||
|
|
||||||
|
// Any parameters written to the display engine are not activated until
|
||||||
|
// CONFIG_VALID is set.
|
||||||
|
SetConfigValid ();
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** This function de-initializes the display.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
LcdShutdown (VOID)
|
||||||
|
{
|
||||||
|
// Disable graphics layer.
|
||||||
|
LayerGraphicsDisable ();
|
||||||
|
}
|
243
ArmPlatformPkg/Library/ArmMaliDp/ArmMaliDp.h
Normal file
243
ArmPlatformPkg/Library/ArmMaliDp/ArmMaliDp.h
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
/** @file
|
||||||
|
|
||||||
|
This header file contains the platform independent parts of ARM Mali DP
|
||||||
|
|
||||||
|
Copyright (c) 2017-2018, Arm Limited. All rights reserved.<BR>
|
||||||
|
This program and the accompanying materials
|
||||||
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
**/
|
||||||
|
#ifndef ARMMALIDP_H_
|
||||||
|
#define ARMMALIDP_H_
|
||||||
|
|
||||||
|
#define DP_BASE (FixedPcdGet64 (PcdArmMaliDpBase))
|
||||||
|
|
||||||
|
// MALI DP Ids
|
||||||
|
#define MALIDP_NOT_PRESENT 0xFFF
|
||||||
|
#define MALIDP_500 0x500
|
||||||
|
#define MALIDP_550 0x550
|
||||||
|
#define MALIDP_650 0x650
|
||||||
|
|
||||||
|
// DP500 Peripheral Ids
|
||||||
|
#define DP500_ID_PART_0 0x00
|
||||||
|
#define DP500_ID_DES_0 0xB
|
||||||
|
#define DP500_ID_PART_1 0x5
|
||||||
|
|
||||||
|
#define DP500_ID_REVISION 0x1
|
||||||
|
#define DP500_ID_JEDEC 0x1
|
||||||
|
#define DP500_ID_DES_1 0x3
|
||||||
|
|
||||||
|
#define DP500_PERIPHERAL_ID0_VAL (DP500_ID_PART_0)
|
||||||
|
#define DP500_PERIPHERAL_ID1_VAL ((DP500_ID_DES_0 << 4) \
|
||||||
|
| DP500_ID_PART_1)
|
||||||
|
#define DP500_PERIPHERAL_ID2_VAL ((DP500_ID_REVISION << 4) \
|
||||||
|
| (DP500_ID_JEDEC << 3) \
|
||||||
|
| (DP500_ID_DES_1))
|
||||||
|
|
||||||
|
// DP550 Peripheral Ids
|
||||||
|
#define DP550_ID_PART_0 0x50
|
||||||
|
#define DP550_ID_DES_0 0xB
|
||||||
|
#define DP550_ID_PART_1 0x5
|
||||||
|
|
||||||
|
#define DP550_ID_REVISION 0x0
|
||||||
|
#define DP550_ID_JEDEC 0x1
|
||||||
|
#define DP550_ID_DES_1 0x3
|
||||||
|
|
||||||
|
#define DP550_PERIPHERAL_ID0_VAL (DP550_ID_PART_0)
|
||||||
|
#define DP550_PERIPHERAL_ID1_VAL ((DP550_ID_DES_0 << 4) \
|
||||||
|
| DP550_ID_PART_1)
|
||||||
|
#define DP550_PERIPHERAL_ID2_VAL ((DP550_ID_REVISION << 4) \
|
||||||
|
| (DP550_ID_JEDEC << 3) \
|
||||||
|
| (DP550_ID_DES_1))
|
||||||
|
|
||||||
|
// DP650 Peripheral Ids
|
||||||
|
#define DP650_ID_PART_0 0x50
|
||||||
|
#define DP650_ID_DES_0 0xB
|
||||||
|
#define DP650_ID_PART_1 0x6
|
||||||
|
|
||||||
|
#define DP650_ID_REVISION 0x0
|
||||||
|
#define DP650_ID_JEDEC 0x1
|
||||||
|
#define DP650_ID_DES_1 0x3
|
||||||
|
|
||||||
|
#define DP650_PERIPHERAL_ID0_VAL (DP650_ID_PART_0)
|
||||||
|
#define DP650_PERIPHERAL_ID1_VAL ((DP650_ID_DES_0 << 4) \
|
||||||
|
| DP650_ID_PART_1)
|
||||||
|
#define DP650_PERIPHERAL_ID2_VAL ((DP650_ID_REVISION << 4) \
|
||||||
|
| (DP650_ID_JEDEC << 3) \
|
||||||
|
| (DP650_ID_DES_1))
|
||||||
|
|
||||||
|
// Display Engine (DE) control register offsets for DP550/DP650
|
||||||
|
#define DP_DE_STATUS 0x00000
|
||||||
|
#define DP_DE_IRQ_SET 0x00004
|
||||||
|
#define DP_DE_IRQ_MASK 0x00008
|
||||||
|
#define DP_DE_IRQ_CLEAR 0x0000C
|
||||||
|
#define DP_DE_CONTROL 0x00010
|
||||||
|
#define DP_DE_PROG_LINE 0x00014
|
||||||
|
#define DP_DE_AXI_CONTROL 0x00018
|
||||||
|
#define DP_DE_AXI_QOS 0x0001C
|
||||||
|
#define DP_DE_DISPLAY_FUNCTION 0x00020
|
||||||
|
|
||||||
|
#define DP_DE_H_INTERVALS 0x00030
|
||||||
|
#define DP_DE_V_INTERVALS 0x00034
|
||||||
|
#define DP_DE_SYNC_CONTROL 0x00038
|
||||||
|
#define DP_DE_HV_ACTIVESIZE 0x0003C
|
||||||
|
#define DP_DE_DISPLAY_SIDEBAND 0x00040
|
||||||
|
#define DP_DE_BACKGROUND_COLOR 0x00044
|
||||||
|
#define DP_DE_DISPLAY_SPLIT 0x00048
|
||||||
|
#define DP_DE_OUTPUT_DEPTH 0x0004C
|
||||||
|
|
||||||
|
// Display Engine (DE) control register offsets for DP500
|
||||||
|
#define DP_DE_DP500_CORE_ID 0x00018
|
||||||
|
#define DP_DE_DP500_CONTROL 0x0000C
|
||||||
|
#define DP_DE_DP500_PROG_LINE 0x00010
|
||||||
|
#define DP_DE_DP500_H_INTERVALS 0x00028
|
||||||
|
#define DP_DE_DP500_V_INTERVALS 0x0002C
|
||||||
|
#define DP_DE_DP500_SYNC_CONTROL 0x00030
|
||||||
|
#define DP_DE_DP500_HV_ACTIVESIZE 0x00034
|
||||||
|
#define DP_DE_DP500_BG_COLOR_RG 0x0003C
|
||||||
|
#define DP_DE_DP500_BG_COLOR_B 0x00040
|
||||||
|
|
||||||
|
/* Display Engine (DE) graphics layer (LG) register offsets
|
||||||
|
* NOTE: For DP500 it will be LG2.
|
||||||
|
*/
|
||||||
|
#define DE_LG_OFFSET 0x00300
|
||||||
|
#define DP_DE_LG_FORMAT (DE_LG_OFFSET)
|
||||||
|
#define DP_DE_LG_CONTROL (DE_LG_OFFSET + 0x04)
|
||||||
|
#define DP_DE_LG_COMPOSE (DE_LG_OFFSET + 0x08)
|
||||||
|
#define DP_DE_LG_IN_SIZE (DE_LG_OFFSET + 0x0C)
|
||||||
|
#define DP_DE_LG_CMP_SIZE (DE_LG_OFFSET + 0x10)
|
||||||
|
#define DP_DE_LG_OFFSET (DE_LG_OFFSET + 0x14)
|
||||||
|
#define DP_DE_LG_H_STRIDE (DE_LG_OFFSET + 0x18)
|
||||||
|
#define DP_DE_LG_PTR_LOW (DE_LG_OFFSET + 0x1C)
|
||||||
|
#define DP_DE_LG_PTR_HIGH (DE_LG_OFFSET + 0x20)
|
||||||
|
#define DP_DE_LG_CHROMA_KEY (DE_LG_OFFSET + 0x2C)
|
||||||
|
#define DP_DE_LG_AD_CONTROL (DE_LG_OFFSET + 0x30)
|
||||||
|
#define DP_DE_LG_MMU_CONTROL (DE_LG_OFFSET + 0x48)
|
||||||
|
|
||||||
|
// Display core (DC) control register offsets.
|
||||||
|
#define DP_DC_OFFSET 0x0C000
|
||||||
|
#define DP_DC_STATUS (DP_DC_OFFSET + 0x00)
|
||||||
|
#define DP_DC_IRQ_SET (DP_DC_OFFSET + 0x04)
|
||||||
|
#define DP_DC_IRQ_MASK (DP_DC_OFFSET + 0x08)
|
||||||
|
#define DP_DC_IRQ_CLEAR (DP_DC_OFFSET + 0x0C)
|
||||||
|
#define DP_DC_CONTROL (DP_DC_OFFSET + 0x10)
|
||||||
|
#define DP_DC_CONFIG_VALID (DP_DC_OFFSET + 0x14)
|
||||||
|
#define DP_DC_CORE_ID (DP_DC_OFFSET + 0x18)
|
||||||
|
|
||||||
|
// DP500 has a global configuration register.
|
||||||
|
#define DP_DP500_CONFIG_VALID (0xF00)
|
||||||
|
|
||||||
|
// Display core ID register offsets.
|
||||||
|
#define DP_DC_ID_OFFSET 0x0FF00
|
||||||
|
#define DP_DC_ID_PERIPHERAL_ID4 (DP_DC_ID_OFFSET + 0xD0)
|
||||||
|
#define DP_DC_CONFIGURATION_ID (DP_DC_ID_OFFSET + 0xD4)
|
||||||
|
#define DP_DC_PERIPHERAL_ID0 (DP_DC_ID_OFFSET + 0xE0)
|
||||||
|
#define DP_DC_PERIPHERAL_ID1 (DP_DC_ID_OFFSET + 0xE4)
|
||||||
|
#define DP_DC_PERIPHERAL_ID2 (DP_DC_ID_OFFSET + 0xE8)
|
||||||
|
#define DP_DC_COMPONENT_ID0 (DP_DC_ID_OFFSET + 0xF0)
|
||||||
|
#define DP_DC_COMPONENT_ID1 (DP_DC_ID_OFFSET + 0xF4)
|
||||||
|
#define DP_DC_COMPONENT_ID2 (DP_DC_ID_OFFSET + 0xF8)
|
||||||
|
#define DP_DC_COMPONENT_ID3 (DP_DC_ID_OFFSET + 0xFC)
|
||||||
|
|
||||||
|
#define DP_DP500_ID_OFFSET 0x0F00
|
||||||
|
#define DP_DP500_ID_PERIPHERAL_ID4 (DP_DP500_ID_OFFSET + 0xD0)
|
||||||
|
#define DP_DP500_CONFIGURATION_ID (DP_DP500_ID_OFFSET + 0xD4)
|
||||||
|
#define DP_DP500_PERIPHERAL_ID0 (DP_DP500_ID_OFFSET + 0xE0)
|
||||||
|
#define DP_DP500_PERIPHERAL_ID1 (DP_DP500_ID_OFFSET + 0xE4)
|
||||||
|
#define DP_DP500_PERIPHERAL_ID2 (DP_DP500_ID_OFFSET + 0xE8)
|
||||||
|
#define DP_DP500_COMPONENT_ID0 (DP_DP500_ID_OFFSET + 0xF0)
|
||||||
|
#define DP_DP500_COMPONENT_ID1 (DP_DP500_ID_OFFSET + 0xF4)
|
||||||
|
#define DP_DP500_COMPONENT_ID2 (DP_DP500_ID_OFFSET + 0xF8)
|
||||||
|
#define DP_DP500_COMPONENT_ID3 (DP_DP500_ID_OFFSET + 0xFC)
|
||||||
|
|
||||||
|
// Display status configuration mode activation flag
|
||||||
|
#define DP_DC_STATUS_CM_ACTIVE_FLAG (0x1U << 16)
|
||||||
|
|
||||||
|
// Display core control configuration mode
|
||||||
|
#define DP_DC_CONTROL_SRST_ACTIVE (0x1U << 18)
|
||||||
|
#define DP_DC_CONTROL_CRST_ACTIVE (0x1U << 17)
|
||||||
|
#define DP_DC_CONTROL_CM_ACTIVE (0x1U << 16)
|
||||||
|
|
||||||
|
#define DP_DE_DP500_CONTROL_SOFTRESET_REQ (0x1U << 16)
|
||||||
|
#define DP_DE_DP500_CONTROL_CONFIG_REQ (0x1U << 17)
|
||||||
|
|
||||||
|
// Display core configuration valid register
|
||||||
|
#define DP_DC_CONFIG_VALID_CVAL (0x1U)
|
||||||
|
|
||||||
|
// DC_CORE_ID
|
||||||
|
// Display core version register PRODUCT_ID
|
||||||
|
#define DP_DC_CORE_ID_SHIFT 16
|
||||||
|
#define DP_DE_DP500_CORE_ID_SHIFT DP_DC_CORE_ID_SHIFT
|
||||||
|
|
||||||
|
// Timing settings
|
||||||
|
#define DP_DE_HBACKPORCH_SHIFT 16
|
||||||
|
#define DP_DE_VBACKPORCH_SHIFT 16
|
||||||
|
#define DP_DE_VSP_SHIFT 28
|
||||||
|
#define DP_DE_VSYNCWIDTH_SHIFT 16
|
||||||
|
#define DP_DE_HSP_SHIFT 13
|
||||||
|
#define DP_DE_V_ACTIVE_SHIFT 16
|
||||||
|
|
||||||
|
// BACKGROUND_COLOR
|
||||||
|
#define DP_DE_BG_R_PIXEL_SHIFT 16
|
||||||
|
#define DP_DE_BG_G_PIXEL_SHIFT 8
|
||||||
|
|
||||||
|
//Graphics layer LG_FORMAT Pixel Format
|
||||||
|
#define DP_PIXEL_FORMAT_ARGB_8888 0x8
|
||||||
|
#define DP_PIXEL_FORMAT_ABGR_8888 0x9
|
||||||
|
#define DP_PIXEL_FORMAT_RGBA_8888 0xA
|
||||||
|
#define DP_PIXEL_FORMAT_BGRA_8888 0xB
|
||||||
|
#define DP_PIXEL_FORMAT_XRGB_8888 0x10
|
||||||
|
#define DP_PIXEL_FORMAT_XBGR_8888 0x11
|
||||||
|
#define DP_PIXEL_FORMAT_RGBX_8888 0x12
|
||||||
|
#define DP_PIXEL_FORMAT_BGRX_8888 0x13
|
||||||
|
#define DP_PIXEL_FORMAT_RGB_888 0x18
|
||||||
|
#define DP_PIXEL_FORMAT_BGR_888 0x19
|
||||||
|
|
||||||
|
// DP500 format code are different than DP550/DP650
|
||||||
|
#define DP_PIXEL_FORMAT_DP500_ARGB_8888 0x2
|
||||||
|
#define DP_PIXEL_FORMAT_DP500_ABGR_8888 0x3
|
||||||
|
#define DP_PIXEL_FORMAT_DP500_XRGB_8888 0x4
|
||||||
|
#define DP_PIXEL_FORMAT_DP500_XBGR_8888 0x5
|
||||||
|
|
||||||
|
// Graphics layer LG_PTR_LOW and LG_PTR_HIGH
|
||||||
|
#define DP_DE_LG_PTR_LOW_MASK 0xFFFFFFFFU
|
||||||
|
#define DP_DE_LG_PTR_HIGH_SHIFT 32
|
||||||
|
|
||||||
|
// Graphics layer LG_CONTROL register characteristics
|
||||||
|
#define DP_DE_LG_L_ALPHA_SHIFT 16
|
||||||
|
#define DP_DE_LG_CHK_SHIFT 15
|
||||||
|
#define DP_DE_LG_PMUL_SHIFT 14
|
||||||
|
#define DP_DE_LG_COM_SHIFT 12
|
||||||
|
#define DP_DE_LG_VFP_SHIFT 11
|
||||||
|
#define DP_DE_LG_HFP_SHIFT 10
|
||||||
|
#define DP_DE_LG_ROTATION_SHIFT 8
|
||||||
|
|
||||||
|
#define DP_DE_LG_LAYER_BLEND_NO_BG 0x0U
|
||||||
|
#define DP_DE_LG_PIXEL_BLEND_NO_BG 0x1U
|
||||||
|
#define DP_DE_LG_LAYER_BLEND_BG 0x2U
|
||||||
|
#define DP_DE_LG_PIXEL_BLEND_BG 0x3U
|
||||||
|
#define DP_DE_LG_ENABLE 0x1U
|
||||||
|
|
||||||
|
// Graphics layer LG_IN_SIZE register characteristics
|
||||||
|
#define DP_DE_LG_V_IN_SIZE_SHIFT 16
|
||||||
|
|
||||||
|
// Graphics layer LG_CMP_SIZE register characteristics
|
||||||
|
#define DP_DE_LG_V_CMP_SIZE_SHIFT 16
|
||||||
|
#define DP_DE_LG_V_OFFSET_SHIFT 16
|
||||||
|
|
||||||
|
// Helper display timing macro functions.
|
||||||
|
#define H_INTERVALS(Hfp, Hbp) ((Hbp << DP_DE_HBACKPORCH_SHIFT) | Hfp)
|
||||||
|
#define V_INTERVALS(Vfp, Vbp) ((Vbp << DP_DE_VBACKPORCH_SHIFT) | Vfp)
|
||||||
|
#define SYNC_WIDTH(Hsw, Vsw) ((Vsw << DP_DE_VSYNCWIDTH_SHIFT) | Hsw)
|
||||||
|
#define HV_ACTIVE(Hor, Ver) ((Ver << DP_DE_V_ACTIVE_SHIFT) | Hor)
|
||||||
|
|
||||||
|
// Helper layer graphics macros.
|
||||||
|
#define FRAME_IN_SIZE(Hor, Ver) ((Ver << DP_DE_LG_V_IN_SIZE_SHIFT) | Hor)
|
||||||
|
#define FRAME_CMP_SIZE(Hor, Ver) ((Ver << DP_DE_LG_V_CMP_SIZE_SHIFT) | Hor)
|
||||||
|
|
||||||
|
#endif /* ARMMALIDP_H_ */
|
43
ArmPlatformPkg/Library/ArmMaliDp/ArmMaliDp.inf
Normal file
43
ArmPlatformPkg/Library/ArmMaliDp/ArmMaliDp.inf
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#/** @file
|
||||||
|
#
|
||||||
|
# Component description file for ArmMaliDp module
|
||||||
|
#
|
||||||
|
# Copyright (c) 2017-2018, Arm Limited. All rights reserved.<BR>
|
||||||
|
# This program and the accompanying materials
|
||||||
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
#**/
|
||||||
|
|
||||||
|
[Defines]
|
||||||
|
INF_VERSION = 0x00010019
|
||||||
|
BASE_NAME = ArmMaliDp
|
||||||
|
FILE_GUID = E724AAF7-19E2-40A3-BAE1-D82A7C8B7A76
|
||||||
|
MODULE_TYPE = BASE
|
||||||
|
VERSION_STRING = 1.0
|
||||||
|
LIBRARY_CLASS = LcdHwLib
|
||||||
|
|
||||||
|
[Sources.common]
|
||||||
|
ArmMaliDp.c
|
||||||
|
|
||||||
|
[Packages]
|
||||||
|
ArmPkg/ArmPkg.dec
|
||||||
|
ArmPlatformPkg/ArmPlatformPkg.dec
|
||||||
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
MdePkg/MdePkg.dec
|
||||||
|
|
||||||
|
[LibraryClasses]
|
||||||
|
BaseLib
|
||||||
|
BaseMemoryLib
|
||||||
|
DebugLib
|
||||||
|
IoLib
|
||||||
|
LcdPlatformLib
|
||||||
|
UefiLib
|
||||||
|
|
||||||
|
[FixedPcd]
|
||||||
|
gArmPlatformTokenSpaceGuid.PcdArmMaliDpBase
|
||||||
|
|
@@ -1,6 +1,7 @@
|
|||||||
/** @file Lcd.c
|
/** @file
|
||||||
|
This file contains the platform independent parts of HdLcd
|
||||||
|
|
||||||
Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
|
Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -21,39 +22,14 @@
|
|||||||
|
|
||||||
#include "HdLcd.h"
|
#include "HdLcd.h"
|
||||||
|
|
||||||
/**********************************************************************
|
#define BYTES_PER_PIXEL 4
|
||||||
*
|
|
||||||
* This file contains all the bits of the Lcd that are
|
|
||||||
* platform independent.
|
|
||||||
*
|
|
||||||
**********************************************************************/
|
|
||||||
|
|
||||||
STATIC
|
/** Initialize display.
|
||||||
UINTN
|
|
||||||
GetBytesPerPixel (
|
|
||||||
IN LCD_BPP Bpp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
switch(Bpp) {
|
|
||||||
case LCD_BITS_PER_PIXEL_24:
|
|
||||||
return 4;
|
|
||||||
|
|
||||||
case LCD_BITS_PER_PIXEL_16_565:
|
@param[in] VramBaseAddress Address of the framebuffer.
|
||||||
case LCD_BITS_PER_PIXEL_16_555:
|
|
||||||
case LCD_BITS_PER_PIXEL_12_444:
|
|
||||||
return 2;
|
|
||||||
|
|
||||||
case LCD_BITS_PER_PIXEL_8:
|
|
||||||
case LCD_BITS_PER_PIXEL_4:
|
|
||||||
case LCD_BITS_PER_PIXEL_2:
|
|
||||||
case LCD_BITS_PER_PIXEL_1:
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Display initialization successful.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdInitialize (
|
LcdInitialize (
|
||||||
IN EFI_PHYSICAL_ADDRESS VramBaseAddress
|
IN EFI_PHYSICAL_ADDRESS VramBaseAddress
|
||||||
@@ -70,69 +46,102 @@ LcdInitialize (
|
|||||||
|
|
||||||
// Setup various registers that never change
|
// Setup various registers that never change
|
||||||
MmioWrite32 (HDLCD_REG_BUS_OPTIONS, (4 << 8) | HDLCD_BURST_8);
|
MmioWrite32 (HDLCD_REG_BUS_OPTIONS, (4 << 8) | HDLCD_BURST_8);
|
||||||
MmioWrite32(HDLCD_REG_POLARITIES, HDLCD_PXCLK_LOW | HDLCD_DATA_HIGH | HDLCD_DATEN_HIGH | HDLCD_HSYNC_LOW | HDLCD_VSYNC_HIGH);
|
|
||||||
MmioWrite32(HDLCD_REG_PIXEL_FORMAT, HDLCD_LITTLE_ENDIAN | HDLCD_4BYTES_PER_PIXEL);
|
MmioWrite32 (HDLCD_REG_POLARITIES, HDLCD_DEFAULT_POLARITIES);
|
||||||
MmioWrite32(HDLCD_REG_RED_SELECT, (0 << 16 | 8 << 8 | 0));
|
|
||||||
MmioWrite32(HDLCD_REG_GREEN_SELECT, (0 << 16 | 8 << 8 | 8));
|
MmioWrite32 (
|
||||||
MmioWrite32(HDLCD_REG_BLUE_SELECT, (0 << 16 | 8 << 8 | 16));
|
HDLCD_REG_PIXEL_FORMAT,
|
||||||
|
HDLCD_LITTLE_ENDIAN | HDLCD_4BYTES_PER_PIXEL
|
||||||
|
);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set requested mode of the display.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Display mode number.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Display mode set successfully.
|
||||||
|
@retval !(EFI_SUCCESS) Other errors.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdSetMode (
|
LcdSetMode (
|
||||||
IN UINT32 ModeNumber
|
IN UINT32 ModeNumber
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINT32 HRes;
|
SCAN_TIMINGS *Horizontal;
|
||||||
UINT32 HSync;
|
SCAN_TIMINGS *Vertical;
|
||||||
UINT32 HBackPorch;
|
|
||||||
UINT32 HFrontPorch;
|
|
||||||
UINT32 VRes;
|
|
||||||
UINT32 VSync;
|
|
||||||
UINT32 VBackPorch;
|
|
||||||
UINT32 VFrontPorch;
|
|
||||||
UINT32 BytesPerPixel;
|
|
||||||
LCD_BPP LcdBpp;
|
|
||||||
|
|
||||||
|
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
|
||||||
|
|
||||||
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION ModeInfo;
|
||||||
|
|
||||||
// Set the video mode timings and other relevant information
|
// Set the video mode timings and other relevant information
|
||||||
Status = LcdPlatformGetTimings (ModeNumber,
|
Status = LcdPlatformGetTimings (
|
||||||
&HRes,&HSync,&HBackPorch,&HFrontPorch,
|
ModeNumber,
|
||||||
&VRes,&VSync,&VBackPorch,&VFrontPorch);
|
&Horizontal,
|
||||||
ASSERT_EFI_ERROR (Status);
|
&Vertical
|
||||||
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_DEVICE_ERROR;
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = LcdPlatformGetBpp (ModeNumber,&LcdBpp);
|
ASSERT (Horizontal != NULL);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT (Vertical != NULL);
|
||||||
|
|
||||||
|
// Get the pixel format information.
|
||||||
|
Status = LcdPlatformQueryMode (ModeNumber, &ModeInfo);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_DEVICE_ERROR;
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
BytesPerPixel = GetBytesPerPixel(LcdBpp);
|
// By default PcdArmHdLcdSwapBlueRedSelect is set to false
|
||||||
|
// However on the Juno platform HW lines for BLUE and RED are swapped
|
||||||
|
// Therefore PcdArmHdLcdSwapBlueRedSelect is set to TRUE for the Juno platform
|
||||||
|
PixelFormat = FixedPcdGetBool (PcdArmHdLcdSwapBlueRedSelect)
|
||||||
|
? PixelRedGreenBlueReserved8BitPerColor
|
||||||
|
: PixelBlueGreenRedReserved8BitPerColor;
|
||||||
|
|
||||||
|
if (ModeInfo.PixelFormat == PixelFormat) {
|
||||||
|
MmioWrite32 (HDLCD_REG_RED_SELECT, (8 << 8) | 16);
|
||||||
|
MmioWrite32 (HDLCD_REG_BLUE_SELECT, (8 << 8) | 0);
|
||||||
|
} else {
|
||||||
|
MmioWrite32 (HDLCD_REG_BLUE_SELECT, (8 << 8) | 16);
|
||||||
|
MmioWrite32 (HDLCD_REG_RED_SELECT, (8 << 8) | 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
MmioWrite32 (HDLCD_REG_GREEN_SELECT, (8 << 8) | 8);
|
||||||
|
|
||||||
// Disable the controller
|
// Disable the controller
|
||||||
MmioWrite32 (HDLCD_REG_COMMAND, HDLCD_DISABLE);
|
MmioWrite32 (HDLCD_REG_COMMAND, HDLCD_DISABLE);
|
||||||
|
|
||||||
// Update the frame buffer information with the new settings
|
// Update the frame buffer information with the new settings
|
||||||
MmioWrite32(HDLCD_REG_FB_LINE_LENGTH, HRes * BytesPerPixel);
|
MmioWrite32 (
|
||||||
MmioWrite32(HDLCD_REG_FB_LINE_PITCH, HRes * BytesPerPixel);
|
HDLCD_REG_FB_LINE_LENGTH,
|
||||||
MmioWrite32(HDLCD_REG_FB_LINE_COUNT, VRes - 1);
|
Horizontal->Resolution * BYTES_PER_PIXEL
|
||||||
|
);
|
||||||
|
|
||||||
|
MmioWrite32 (
|
||||||
|
HDLCD_REG_FB_LINE_PITCH,
|
||||||
|
Horizontal->Resolution * BYTES_PER_PIXEL
|
||||||
|
);
|
||||||
|
|
||||||
|
MmioWrite32 (HDLCD_REG_FB_LINE_COUNT, Vertical->Resolution - 1);
|
||||||
|
|
||||||
// Set the vertical timing information
|
// Set the vertical timing information
|
||||||
MmioWrite32(HDLCD_REG_V_SYNC, VSync);
|
MmioWrite32 (HDLCD_REG_V_SYNC, Vertical->Sync);
|
||||||
MmioWrite32(HDLCD_REG_V_BACK_PORCH, VBackPorch);
|
MmioWrite32 (HDLCD_REG_V_BACK_PORCH, Vertical->BackPorch);
|
||||||
MmioWrite32(HDLCD_REG_V_DATA, VRes - 1);
|
MmioWrite32 (HDLCD_REG_V_DATA, Vertical->Resolution - 1);
|
||||||
MmioWrite32(HDLCD_REG_V_FRONT_PORCH, VFrontPorch);
|
MmioWrite32 (HDLCD_REG_V_FRONT_PORCH, Vertical->FrontPorch);
|
||||||
|
|
||||||
// Set the horizontal timing information
|
// Set the horizontal timing information
|
||||||
MmioWrite32(HDLCD_REG_H_SYNC, HSync);
|
MmioWrite32 (HDLCD_REG_H_SYNC, Horizontal->Sync);
|
||||||
MmioWrite32(HDLCD_REG_H_BACK_PORCH, HBackPorch);
|
MmioWrite32 (HDLCD_REG_H_BACK_PORCH, Horizontal->BackPorch);
|
||||||
MmioWrite32(HDLCD_REG_H_DATA, HRes - 1);
|
MmioWrite32 (HDLCD_REG_H_DATA, Horizontal->Resolution - 1);
|
||||||
MmioWrite32(HDLCD_REG_H_FRONT_PORCH, HFrontPorch);
|
MmioWrite32 (HDLCD_REG_H_FRONT_PORCH, Horizontal->FrontPorch);
|
||||||
|
|
||||||
// Enable the controller
|
// Enable the controller
|
||||||
MmioWrite32 (HDLCD_REG_COMMAND, HDLCD_ENABLE);
|
MmioWrite32 (HDLCD_REG_COMMAND, HDLCD_ENABLE);
|
||||||
@@ -140,6 +149,8 @@ LcdSetMode (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** De-initializes the display.
|
||||||
|
**/
|
||||||
VOID
|
VOID
|
||||||
LcdShutdown (
|
LcdShutdown (
|
||||||
VOID
|
VOID
|
||||||
@@ -149,10 +160,21 @@ LcdShutdown (
|
|||||||
MmioWrite32 (HDLCD_REG_COMMAND, HDLCD_DISABLE);
|
MmioWrite32 (HDLCD_REG_COMMAND, HDLCD_DISABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Check for presence of HDLCD.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Returns success if platform implements a HDLCD
|
||||||
|
controller.
|
||||||
|
@retval EFI_NOT_FOUND HDLCD display controller not found on the
|
||||||
|
platform.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdIdentify (
|
LcdIdentify (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if ((MmioRead32 (HDLCD_REG_VERSION) >> 16) == HDLCD_PRODUCT_ID) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/** @file HDLcd.h
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
|
Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -12,13 +12,10 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef _HDLCD_H_
|
#ifndef HDLCD_H_
|
||||||
#define _HDLCD_H_
|
#define HDLCD_H_
|
||||||
|
|
||||||
//
|
|
||||||
// HDLCD Controller Register Offsets
|
// HDLCD Controller Register Offsets
|
||||||
//
|
|
||||||
|
|
||||||
#define HDLCD_REG_VERSION ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x000)
|
#define HDLCD_REG_VERSION ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x000)
|
||||||
#define HDLCD_REG_INT_RAWSTAT ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x010)
|
#define HDLCD_REG_INT_RAWSTAT ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x010)
|
||||||
#define HDLCD_REG_INT_CLEAR ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x014)
|
#define HDLCD_REG_INT_CLEAR ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x014)
|
||||||
@@ -44,10 +41,7 @@
|
|||||||
#define HDLCD_REG_GREEN_SELECT ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x248)
|
#define HDLCD_REG_GREEN_SELECT ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x248)
|
||||||
#define HDLCD_REG_BLUE_SELECT ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x24C)
|
#define HDLCD_REG_BLUE_SELECT ((UINTN)PcdGet32 (PcdArmHdLcdBase) + 0x24C)
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// HDLCD Values of registers
|
// HDLCD Values of registers
|
||||||
//
|
|
||||||
|
|
||||||
// HDLCD Interrupt mask, clear and status register
|
// HDLCD Interrupt mask, clear and status register
|
||||||
#define HDLCD_DMA_END BIT0 /* DMA has finished reading a frame */
|
#define HDLCD_DMA_END BIT0 /* DMA has finished reading a frame */
|
||||||
@@ -79,6 +73,11 @@
|
|||||||
#define HDLCD_DATA_LOW 0
|
#define HDLCD_DATA_LOW 0
|
||||||
#define HDLCD_PXCLK_LOW 0
|
#define HDLCD_PXCLK_LOW 0
|
||||||
|
|
||||||
|
// Default polarities
|
||||||
|
#define HDLCD_DEFAULT_POLARITIES (HDLCD_PXCLK_LOW | HDLCD_DATA_HIGH | \
|
||||||
|
HDLCD_DATEN_HIGH | HDLCD_HSYNC_LOW | \
|
||||||
|
HDLCD_VSYNC_HIGH)
|
||||||
|
|
||||||
// Pixel Format
|
// Pixel Format
|
||||||
#define HDLCD_LITTLE_ENDIAN (0 << 31)
|
#define HDLCD_LITTLE_ENDIAN (0 << 31)
|
||||||
#define HDLCD_BIG_ENDIAN (1 << 31)
|
#define HDLCD_BIG_ENDIAN (1 << 31)
|
||||||
@@ -86,4 +85,6 @@
|
|||||||
// Number of bytes per pixel
|
// Number of bytes per pixel
|
||||||
#define HDLCD_4BYTES_PER_PIXEL ((4 - 1) << 3)
|
#define HDLCD_4BYTES_PER_PIXEL ((4 - 1) << 3)
|
||||||
|
|
||||||
#endif /* _HDLCD_H_ */
|
#define HDLCD_PRODUCT_ID 0x1CDC
|
||||||
|
|
||||||
|
#endif /* HDLCD_H_ */
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Component description file for HDLCD module
|
# Component description file for HDLCD module
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
|
# Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -40,3 +40,5 @@
|
|||||||
|
|
||||||
[FixedPcd]
|
[FixedPcd]
|
||||||
gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase
|
gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase
|
||||||
|
gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2017, Linaro, Ltd. All rights reserved.
|
Copyright (c) 2017, Linaro, Ltd. All rights reserved.
|
||||||
|
Copyright (c) 2018, Arm Limited. All rights reserved.
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -17,6 +18,12 @@
|
|||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/LcdPlatformLib.h>
|
#include <Library/LcdPlatformLib.h>
|
||||||
|
|
||||||
|
/** Platform related initialization function.
|
||||||
|
|
||||||
|
@param[in] Handle Handle to the LCD device instance.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformInitializeDisplay (
|
LcdPlatformInitializeDisplay (
|
||||||
IN EFI_HANDLE Handle
|
IN EFI_HANDLE Handle
|
||||||
@@ -26,6 +33,17 @@ LcdPlatformInitializeDisplay (
|
|||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Allocate VRAM memory in DRAM for the framebuffer
|
||||||
|
(unless it is reserved already).
|
||||||
|
|
||||||
|
The allocated address can be used to set the framebuffer.
|
||||||
|
|
||||||
|
@param[out] VramBaseAddress A pointer to the framebuffer address.
|
||||||
|
@param[out] VramSize A pointer to the size of the frame
|
||||||
|
buffer in bytes
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformGetVram (
|
LcdPlatformGetVram (
|
||||||
OUT EFI_PHYSICAL_ADDRESS* VramBaseAddress,
|
OUT EFI_PHYSICAL_ADDRESS* VramBaseAddress,
|
||||||
@@ -36,6 +54,14 @@ LcdPlatformGetVram (
|
|||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return total number of modes supported.
|
||||||
|
|
||||||
|
Note: Valid mode numbers are 0 to MaxMode - 1
|
||||||
|
See Section 12.9 of the UEFI Specification 2.7
|
||||||
|
|
||||||
|
@retval UINT32 Zero number of modes supported
|
||||||
|
in a NULL library implementation.
|
||||||
|
**/
|
||||||
UINT32
|
UINT32
|
||||||
LcdPlatformGetMaxMode (
|
LcdPlatformGetMaxMode (
|
||||||
VOID
|
VOID
|
||||||
@@ -45,6 +71,12 @@ LcdPlatformGetMaxMode (
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set the requested display mode.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Mode Number.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformSetMode (
|
LcdPlatformSetMode (
|
||||||
IN UINT32 ModeNumber
|
IN UINT32 ModeNumber
|
||||||
@@ -54,6 +86,15 @@ LcdPlatformSetMode (
|
|||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return information for the requested mode number.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Mode Number.
|
||||||
|
@param[out] Info Pointer for returned mode information
|
||||||
|
(on success).
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformQueryMode (
|
LcdPlatformQueryMode (
|
||||||
IN UINT32 ModeNumber,
|
IN UINT32 ModeNumber,
|
||||||
@@ -64,23 +105,41 @@ LcdPlatformQueryMode (
|
|||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return display timing information for the requested mode number.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Mode Number.
|
||||||
|
|
||||||
|
@param[out] HRes Pointer to horizontal resolution.
|
||||||
|
@param[out] HSync Pointer to horizontal sync width.
|
||||||
|
@param[out] HBackPorch Pointer to horizontal back porch.
|
||||||
|
@param[out] HFrontPorch Pointer to horizontal front porch.
|
||||||
|
@param[out] VRes Pointer to vertical resolution.
|
||||||
|
@param[out] VSync Pointer to vertical sync width.
|
||||||
|
@param[out] VBackPorch Pointer to vertical back porch.
|
||||||
|
@param[out] VFrontPorch Pointer to vertical front porch.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformGetTimings (
|
LcdPlatformGetTimings (
|
||||||
IN UINT32 ModeNumber,
|
IN UINT32 ModeNumber,
|
||||||
OUT UINT32* HRes,
|
OUT SCAN_TIMINGS **Horizontal,
|
||||||
OUT UINT32* HSync,
|
OUT SCAN_TIMINGS **Vertical
|
||||||
OUT UINT32* HBackPorch,
|
|
||||||
OUT UINT32* HFrontPorch,
|
|
||||||
OUT UINT32* VRes,
|
|
||||||
OUT UINT32* VSync,
|
|
||||||
OUT UINT32* VBackPorch,
|
|
||||||
OUT UINT32* VFrontPorch
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return bits per pixel information for a mode number.
|
||||||
|
|
||||||
|
@param[in] ModeNumber Mode Number.
|
||||||
|
|
||||||
|
@param[out] Bpp Pointer to value bits per pixel information.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformGetBpp (
|
LcdPlatformGetBpp (
|
||||||
IN UINT32 ModeNumber,
|
IN UINT32 ModeNumber,
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <Library/IoLib.h>
|
#include <Library/IoLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
|
#include <Library/PL011UartClockLib.h>
|
||||||
#include <Library/PL011UartLib.h>
|
#include <Library/PL011UartLib.h>
|
||||||
#include <Library/SerialPortLib.h>
|
#include <Library/SerialPortLib.h>
|
||||||
|
|
||||||
@@ -48,7 +49,7 @@ SerialPortInitialize (
|
|||||||
|
|
||||||
return PL011UartInitializePort (
|
return PL011UartInitializePort (
|
||||||
(UINTN)FixedPcdGet64 (PcdSerialRegisterBase),
|
(UINTN)FixedPcdGet64 (PcdSerialRegisterBase),
|
||||||
FixedPcdGet32 (PL011UartClkInHz),
|
PL011UartClockGetFreq(),
|
||||||
&BaudRate,
|
&BaudRate,
|
||||||
&ReceiveFifoDepth,
|
&ReceiveFifoDepth,
|
||||||
&Parity,
|
&Parity,
|
||||||
@@ -156,7 +157,7 @@ SerialPortSetAttributes (
|
|||||||
{
|
{
|
||||||
return PL011UartInitializePort (
|
return PL011UartInitializePort (
|
||||||
(UINTN)FixedPcdGet64 (PcdSerialRegisterBase),
|
(UINTN)FixedPcdGet64 (PcdSerialRegisterBase),
|
||||||
FixedPcdGet32 (PL011UartClkInHz),
|
PL011UartClockGetFreq(),
|
||||||
BaudRate,
|
BaudRate,
|
||||||
ReceiveFifoDepth,
|
ReceiveFifoDepth,
|
||||||
Parity,
|
Parity,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user