diff options
| author | Nick Desaulniers <ndesaulniers@google.com> | 2016-07-12 14:51:04 -0700 |
|---|---|---|
| committer | Ed Tam <etam@google.com> | 2016-07-14 22:40:40 +0000 |
| commit | 25c9774debc7525f2d9d0897f65e6f547ad59faa (patch) | |
| tree | 4eba4089ee725f2aba5bd8602666009810175187 /common | |
| parent | 04c71b56ffcf4e20c97993d4b9b879b423768221 (diff) | |
marlin: start removing device/google/marlin/common
Removes all but critical .mk files
Bug: 27720827
Change-Id: I3219f8355ee02e27caf38212dbd16afcbd8f4d95
Diffstat (limited to 'common')
58 files changed, 1 insertions, 12312 deletions
diff --git a/common/Android.mk b/common/Android.mk deleted file mode 100644 index 65711611..00000000 --- a/common/Android.mk +++ /dev/null @@ -1 +0,0 @@ -include $(all-subdir-makefiles) diff --git a/common/audio/dq_maskfile_audio.dat b/common/audio/dq_maskfile_audio.dat Binary files differdeleted file mode 100755 index dc518449..00000000 --- a/common/audio/dq_maskfile_audio.dat +++ /dev/null diff --git a/common/audio/dq_maskfile_audio.dmc b/common/audio/dq_maskfile_audio.dmc deleted file mode 100755 index c193e94a..00000000 --- a/common/audio/dq_maskfile_audio.dmc +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0"?>
-<QXDMProfessional><Persistence><MultiInstance>0</MultiInstance><FixedFontSize>0</FixedFontSize><DynamicParsersPath>C:\Users\Public\Documents\Qualcomm\QXDM\Parsers\</DynamicParsersPath><DroppedMessages>0</DroppedMessages><ParsingPreference>0</ParsingPreference><EmptyHexadecimalPane>1</EmptyHexadecimalPane><DIAGRequestTimeout>500</DIAGRequestTimeout><ScriptCommandTimeout>15000</ScriptCommandTimeout><GPSCOMPort>Disconnect</GPSCOMPort><TrackNMEA>0</TrackNMEA><OSCoreDump>1</OSCoreDump><AutoSyncNV>1</AutoSyncNV><RegExEngine>0</RegExEngine><MessagesView><Appearance><ShowDate>0</ShowDate><ShowMilliseconds>1</ShowMilliseconds><TypeSpecificTime>1</TypeSpecificTime><UseLegacyFormat>0</UseLegacyFormat><IncludeHeader>0</IncludeHeader><Order>0,1,2,3,4</Order><Columns>0/80,1/80,2/99,3/120,4/896,5/400</Columns></Appearance><ISVConfig><AcceptUnknowns>1</AcceptUnknowns><DelayedSubsysOnly>0</DelayedSubsysOnly><Items>5,6</Items><MessageLevels>00004/01,00004/02,00004/03,00004/04,00035/02,00035/03,00035/04,00054/01,00054/02,00054/03,00054/04,04500/01,04500/02,04500/03,04500/04,04501/01,04501/02,04501/03,04501/04,04502/01,04502/02,04502/03,04502/04,04503/01,04503/02,04503/03,04503/04,04504/01,04504/02,04504/03,04504/04,04505/01,04505/02,04505/03,04505/04,04506/01,04506/02,04506/03,04506/04,04507/01,04507/02,04507/03,04507/04,04508/01,04508/02,04508/03,04508/04,04509/01,04509/02,04509/03,04509/04,04510/01,04510/02,04510/03,04510/04,04511/01,04511/02,04511/03,04511/04,04512/01,04512/02,04512/03,04512/04,04513/01,04513/02,04513/03,04513/04,04514/01,04514/02,04514/03,04514/04,04515/01,04515/02,04515/03,04515/04,04516/01,04516/02,04516/03,04516/04,04517/01,04517/02,04517/03,04517/04,04518/01,04518/02,04518/03,04518/04,04519/01,04519/02,04519/03,04519/04,04520/01,04520/02,04520/03,04520/04,04521/01,04521/02,04521/03,04521/04,04522/01,04522/02,04522/03,04522/04,04523/01,04523/02,04523/03,04523/04,04524/01,04524/02,04524/03,04524/04,04525/01,04525/02,04525/03,04525/04,04526/01,04526/02,04526/03,04526/04,08500/00,08500/01,08500/02,08500/03,08500/04,08501/00,08501/01,08501/02,08501/03,08501/04,08502/00,08502/01,08502/02,08502/03,08502/04,08503/00,08503/01,08503/02,08503/03,08503/04,08504/00,08504/01,08504/02,08504/03,08504/04,08505/00,08505/01,08505/02,08505/03,08505/04,08506/00,08506/01,08506/02,08506/03,08506/04,08507/00,08507/01,08507/02,08507/03,08507/04,08508/00,08508/01,08508/02,08508/03,08508/04,08509/00,08509/01,08509/02,08509/03,08509/04,08510/00,08510/01,08510/02,08510/03,08510/04,08511/00,08511/01,08511/02,08511/03,08511/04,08520/00,08520/01,08520/02,08520/03,08520/04,08521/00,08521/01,08521/02,08521/03,08521/04,08522/00,08522/01,08522/02,08522/03,08522/04,08523/00,08523/01,08523/02,08523/03,08523/04</MessageLevels><LogCodes>0x101B,0x1021,0x1022,0x1023,0x1024,0x1027,0x103E,0x103F,0x1040,0x1041,0x1042,0x1043,0x1044,0x1045,0x1046,0x1047,0x104A,0x104B,0x104E,0x104F,0x1050,0x1051,0x1054,0x1055,0x1056,0x1057,0x1058,0x1059,0x105A,0x105B,0x105C,0x1075,0x1081,0x10BB,0x10D4,0x10D5,0x10E5,0x10E6,0x10E7,0x10E8,0x10E9,0x10EA,0x10EB,0x10EC,0x10ED,0x10EE,0x10EF,0x10F0,0x10F1,0x1116,0x1117,0x1118,0x1119,0x111A,0x111B,0x111C,0x111D,0x111E,0x111F,0x1120,0x1121,0x1122,0x1126,0x1127,0x1128,0x1129,0x112A,0x112B,0x112C,0x112D,0x112E,0x112F,0x1130,0x1131,0x1132,0x1136,0x1137,0x1138,0x1139,0x113A,0x113B,0x113C,0x113D,0x113E,0x113F,0x1140,0x1141,0x1142,0x1146,0x1147,0x1148,0x1149,0x114A,0x114B,0x114C,0x114D,0x114E,0x114F,0x1150,0x1151,0x1152,0x1153,0x1159,0x115A,0x115B,0x115C,0x115D,0x11C9,0x11CA,0x11CB,0x11CC,0x11CD,0x11CE,0x11CF,0x11D0,0x11D1,0x11D2,0x11D3,0x11D4,0x11D5,0x11D6,0x11D7,0x11D8,0x11D9,0x11DA,0x11DB,0x11DC,0x11DD,0x11DE,0x11DF,0x11E0,0x1201,0x1217,0x123E,0x123F,0x1240,0x1242,0x1243,0x1244,0x1245,0x1246,0x1247,0x1248,0x1249,0x124A,0x124B,0x124C,0x124D,0x124E,0x124F,0x1287,0x1288,0x12C0,0x12C2,0x12C3,0x12C4,0x12C5,0x12C6,0x12C7,0x12C8,0x12C9,0x12CA,0x12CB,0x12CC,0x12CD,0x12CE,0x12CF,0x12D0,0x12D1,0x12D2,0x12D3,0x12D4,0x12D5,0x12D6,0x12D7,0x12D8,0x12D9,0x12DA,0x12DB,0x12DC,0x12DD,0x12DE,0x12DF,0x12E0,0x12E1,0x12E2,0x12EA,0x12EB,0x12EC,0x12ED,0x12EE,0x12EF,0x12F0,0x12F2,0x12F3,0x12F4,0x12F5,0x12F6,0x12F7,0x12F8,0x12F9,0x12FA,0x12FB,0x12FC,0x12FD,0x12FE,0x12FF,0x1300,0x1301,0x1302,0x1303,0x1304,0x1305,0x1306,0x1307,0x1308,0x1309,0x130A,0x130B,0x130C,0x130D,0x130E,0x130F,0x1310,0x1311,0x1312,0x1313,0x1314,0x1315,0x1316,0x1317,0x1318,0x1319,0x131A,0x131B,0x131C,0x131D,0x131E,0x131F,0x1320,0x1321,0x1322,0x1323,0x1324,0x1325,0x1326,0x1327,0x1328,0x1329,0x132A,0x1354,0x1355,0x1357,0x1358,0x1365,0x1366,0x1367,0x1368,0x1369,0x13AE,0x13B1,0x13E8,0x13E9,0x146E,0x1485,0x148B,0x1492,0x1493,0x1496,0x1497,0x1498,0x1499,0x149A,0x149B,0x149C,0x149D,0x149E,0x14A0,0x14A1,0x14A2,0x14A3,0x14A4,0x14A5,0x14AE,0x14AF,0x14DF,0x14EE,0x1558,0x158A,0x158B,0x15CE,0x15CF,0x15D0,0x15D1,0x15D4,0x15D5,0x15D6,0x15D7,0x15D8,0x15D9,0x15DA,0x15DB,0x15DC,0x15DD,0x15DE,0x15DF,0x15E0,0x15E1,0x15E2,0x15E3,0x15E4,0x15E5,0x15E6,0x15E7,0x15E8,0x15E9,0x15EA,0x15EB,0x15EC,0x15ED,0x15EE,0x15EF,0x15F0,0x15F1,0x15F2,0x15F3,0x15F4,0x15F5,0x15F6,0x15F7,0x15F8,0x15F9,0x15FA,0x15FB,0x15FC,0x15FD,0x15FE,0x15FF,0x1600,0x1601,0x1602,0x1603,0x1604,0x1605,0x1606,0x1607,0x1608,0x1609,0x160A,0x160B,0x160C,0x160D,0x160E,0x160F,0x1610,0x1611,0x1612,0x1613,0x1614,0x1615,0x1616,0x1617,0x1618,0x1619,0x161C,0x161D,0x161E,0x161F,0x1620,0x1621,0x1622,0x1623,0x1624,0x1625,0x1626,0x1627,0x1628,0x1629,0x162A,0x162B,0x162C,0x162D,0x162E,0x162F,0x1630,0x1631,0x1632,0x164B,0x164C,0x164D,0x164E,0x164F,0x1655,0x1656,0x1657,0x1658,0x1659,0x165A,0x165B,0x165C,0x165D,0x165E,0x165F,0x1660,0x1661,0x1662,0x1663,0x1664,0x1665,0x1666,0x1667,0x1668,0x1669,0x166A,0x166B,0x166C,0x166D,0x166E,0x166F,0x1670,0x1671,0x1672,0x1673,0x1674,0x1675,0x1676,0x1677,0x1678,0x1679,0x167A,0x167B,0x167C,0x167D,0x167E,0x167F,0x1680,0x1681,0x1682,0x1683,0x1684,0x1685,0x1686,0x1687,0x1688,0x1689,0x168A,0x168B,0x168C,0x168D,0x168E,0x168F,0x1690,0x1691,0x1692,0x1693,0x1694,0x1695,0x1696,0x1697,0x1698,0x1699,0x169A,0x169B,0x169C,0x169D,0x169E,0x169F,0x16A0,0x16A1,0x16A2,0x16A3,0x16A4,0x16A5,0x16A6,0x16A7,0x16A8,0x16A9,0x16AA,0x16AB,0x16AC,0x16AD,0x16AE,0x16AF,0x16B0,0x16B1,0x16B2,0x16B3,0x16B4,0x16B5,0x16B6,0x16B7,0x16B8,0x16B9,0x16BA,0x16BB,0x16BC,0x16BD,0x16BE,0x16BF,0x16C0,0x16C1,0x16C2,0x16C3,0x16C4,0x16C5,0x16C6,0x16C7,0x16C8,0x16C9,0x16CA,0x16CB,0x16CC,0x16CD,0x16CE,0x16CF,0x16D0,0x16D1,0x16D2,0x16D3,0x16D4,0x16D5,0x16D6,0x16D7,0x16D8,0x16D9,0x16DA,0x16DB,0x16DC,0x16DD,0x16DE,0x16DF,0x16E0,0x16E1,0x16E2,0x16E3,0x16E4,0x16E5,0x16E6,0x16E7,0x16E8,0x16E9,0x16EA,0x16EB,0x16EC,0x16ED,0x16EE,0x16EF,0x16F0,0x16F1,0x16F2,0x16F3,0x16F4,0x16F5,0x16F6,0x16F7,0x16F8,0x16F9,0x16FA,0x16FB,0x16FC,0x16FD,0x16FE,0x16FF,0x1700,0x1701,0x1702,0x1703,0x1704,0x1705,0x1706,0x1707,0x1708,0x1709,0x170A,0x170B,0x170C,0x170D,0x170E,0x170F,0x1710,0x1711,0x1712,0x1713,0x1714,0x1715,0x1716,0x1717,0x1718,0x1719,0x171A,0x171B,0x171C,0x171D,0x171E,0x171F,0x1720,0x1721,0x1722,0x1723,0x1724,0x1725,0x1726,0x1727,0x1728,0x1729,0x172A,0x172B,0x172C,0x172D,0x172E,0x172F,0x1730,0x1731,0x1732,0x1733,0x1734,0x1735,0x1736,0x1737,0x1738,0x1739,0x173A,0x173B,0x173C,0x173D,0x173E,0x173F,0x1740,0x1741,0x1742,0x1743,0x1744,0x1745,0x1746,0x1747,0x174A,0x174B,0x174C,0x174D,0x174E,0x174F,0x175A,0x175B,0x175C,0x175D,0x175E,0x175F,0x1760,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1768,0x1769,0x176A,0x176B,0x176C,0x176D,0x176E,0x176F,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x1776,0x1777,0x1778,0x1779,0x177A,0x177B,0x177C,0x177D,0x177E,0x177F,0x1780,0x1781,0x1782,0x1783,0x1784,0x1785,0x1786,0x1787,0x1788,0x1789,0x178A,0x178B,0x178C,0x178D,0x178E,0x178F,0x1790,0x1791,0x1792,0x1793,0x1794,0x1795,0x1796,0x1797,0x1798,0x1799,0x179A,0x179B,0x179C,0x179D,0x179E,0x179F,0x17A0,0x17A1,0x17A2,0x17A3,0x17A4,0x17A5,0x17A6,0x17A7,0x17A8,0x17A9,0x17AA,0x17AB,0x17AC,0x17AD,0x17AE,0x17AF,0x17B0,0x17B1,0x17B2,0x17B3,0x17B4,0x17B5,0x17B6,0x17B7,0x17B8,0x17B9,0x17BA,0x17BB,0x17BC,0x17BD,0x17BE,0x17BF,0x17C0,0x17C1,0x17C2,0x17C3,0x17C4,0x17C5,0x17C6,0x17C7,0x17C8,0x17C9,0x17CA,0x17CB,0x17CC,0x17CD,0x17CE,0x17CF,0x17D0,0x17D1,0x17D2,0x17D3,0x17D4,0x17D5,0x17D6,0x17D7,0x1813,0x1814,0x1815,0x1816,0x1817,0x1818,0x1819,0x181A,0x181B,0x181C,0x181D,0x181E,0x181F,0x1820,0x1821,0x1822,0x1823,0x1824,0x1825,0x1826,0x1827,0x1828,0x1829,0x182A,0x182B,0x1841,0x1842,0x1843,0x1844,0x1845,0x1846,0x1847,0x1848,0x4007,0x4009,0x400A,0x400B,0x400C,0x400D,0x400E,0x400F,0x4012,0x4020,0x4021,0x4022,0x4028,0x4029,0x402A,0x402B,0x402C,0x402D,0x402E,0x402F,0x4030,0x4032,0x4033,0x4034,0x4036,0x4037,0x4038,0x4039,0x403A,0x403B,0x403C,0x403D,0x403E,0x403F,0x4040,0x4041,0x4042,0x4043,0x4044,0x4045,0x4046,0x4047,0x4048,0x4049,0x404A,0x404B,0x404C,0x404D,0x404E,0x404F,0x4050,0x4051,0x4052,0x4053,0x4054,0x4055,0x4056,0x4057,0x4058,0x4059,0x405A,0x405B,0x405C,0x405D,0x405E,0x405F,0x4060,0x4061,0x4062,0x4063,0x4064,0x4065,0x4066,0x4067,0x4068,0x4069,0x406A,0x406B,0x406C,0x406D,0x406E,0x406F,0x4070,0x4071,0x4072,0x4073,0x4074,0x4075,0x4076,0x4077,0x4078,0x4079,0x407A,0x407B,0x407C,0x407D,0x407E,0x407F,0x4080,0x4081,0x4082,0x4083,0x4084,0x4085,0x4086,0x4087,0x4088,0x4089,0x408A,0x408B,0x408C,0x408D,0x408E,0x408F,0x4090,0x4091,0x4092,0x4093,0x4094,0x4095,0x4096,0x4097,0x4098,0x4099,0x409A,0x409B,0x409C,0x409D,0x409E,0x409F,0x40A0,0x40A1,0x40A2,0x40A3,0x40A4,0x40A5,0x40A6,0x40A7,0x40A8,0x40A9,0x40AA,0x40AB,0x40AC,0x40AD,0x40AE,0x40AF,0x40B0,0x40B1,0x40B2,0x40B3,0x40B4,0x40B5,0x40B6,0x40B7,0x40B8,0x40B9,0x40BA,0x40BB,0x40BC,0x40BD,0x40BE,0x40BF,0x40C0,0x40C1,0x40C2,0x40C3,0x40C4,0x40C5,0x40C6,0x40C7,0x40C8,0x40C9,0x40CA,0x40CB,0x40CC,0x40CD,0x40CE,0x40CF,0x40D0,0x40D1,0x40D2,0x40D3,0x40D4,0x40D5,0x40D6,0x40D7,0x40D8,0x40D9,0x40DA,0x40DB,0x40DC,0x40DD,0x40DE,0x40DF,0x40E0,0x40E1,0x40E2,0x40E3,0x40E4,0x40E5,0x40E6,0x40E7,0x40E8,0x40E9,0x40EA,0x40EB,0x40EC,0x40ED,0x40EE,0x40EF,0x40F0,0x40F1,0x40F2,0x40F3,0x40F4,0x40F5,0x40F6,0x40F7,0x40F8,0x40F9,0x40FA,0x40FB,0x40FC,0x40FD,0x40FE,0x40FF,0x410F,0x412C,0x412D,0x4130,0x4131,0x4136,0x4137,0x413D,0x413E,0x4140,0x4154,0x4157,0x415A,0x415B,0x415C,0x415D,0x415E,0x415F,0x4164,0x4167,0x416A,0x416C,0x416D,0x416E,0x416F,0x417B,0x418F,0x4190,0x4192,0x419E,0x419F,0x41A0,0x41A1,0x41A2,0x41A3,0x41A4,0x41A5,0x41A6,0x41A7,0x41A8,0x41A9,0x41AB,0x41AD,0x41B1,0x41B7,0x41B8,0x41BB,0x41BC,0x41BD,0x41BE,0x41BF,0x41C0,0x41C1,0x41C2,0x41C3,0x41C4,0x41C5,0x41C6,0x41C7,0x41C8,0x41C9,0x41CA,0x41CB,0x41CC,0x41CD,0x41CE,0x41CF,0x41D0,0x41D1,0x41D2,0x41D3,0x41D4,0x41D5,0x41D6,0x41D7,0x41D8,0x41D9,0x41DA,0x41DB,0x41DC,0x41DD,0x41DE,0x41DF,0x41E0,0x41E1,0x41E2,0x41E3,0x41E4,0x41E5,0x41E6,0x41E7,0x41E8,0x41E9,0x41EA,0x41EB,0x41EC,0x41ED,0x41EE,0x41EF,0x41F0,0x41F1,0x41F2,0x41F3,0x41F4,0x41F5,0x41F6,0x41F7,0x41F8,0x41F9,0x41FA,0x41FB,0x41FC,0x41FD,0x41FE,0x41FF,0x422B,0x422D,0x422F,0x4232,0x4233,0x4234,0x4237,0x423C,0x423D,0x4240,0x4241,0x4242,0x4243,0x4244,0x4245,0x4246,0x4247,0x4248,0x4249,0x424A,0x424B,0x424C,0x424D,0x424E,0x424F,0x4250,0x4251,0x4252,0x4253,0x4254,0x4255,0x4256,0x4257,0x4258,0x4259,0x425A,0x425B,0x425C,0x425D,0x425E,0x425F,0x4260,0x4261,0x4262,0x4263,0x4264,0x4265,0x4266,0x4267,0x4268,0x4269,0x426A,0x426B,0x426C,0x426D,0x426E,0x426F,0x4270,0x4271,0x4272,0x4273,0x4274,0x4275,0x4276,0x4277,0x4278,0x4279,0x427A,0x427B,0x427C,0x427D,0x427E,0x427F,0x4280,0x4281,0x4282,0x4283,0x4284,0x4285,0x4286,0x4287,0x4288,0x4289,0x428A,0x428B,0x428C,0x428D,0x428E,0x428F,0x4290,0x4291,0x4292,0x4293,0x4294,0x4295,0x4296,0x4297,0x4298,0x4299,0x429A,0x429B,0x429C,0x429D,0x429E,0x429F,0x42A0,0x42A1,0x42A2,0x42A3,0x42A4,0x42A5,0x42A6,0x42A7,0x42A8,0x42A9,0x42AA,0x42AB,0x42AC,0x42AD,0x42AE,0x42AF,0x42B0,0x42B1,0x42B2,0x42B3,0x42B4,0x42B5,0x42B6,0x42B7,0x42B8,0x42B9,0x42BA,0x42BB,0x42BC,0x42BD,0x42BE,0x42BF,0x42C0,0x42C1,0x42C2,0x42C3,0x42C4,0x42C5,0x42C6,0x42C7,0x42C8,0x42C9,0x42CA,0x42CB,0x42CC,0x42CD,0x42CE,0x42CF,0x42D0,0x42D1,0x42D2,0x42D3,0x42D4,0x42D5,0x42D6,0x42D7,0x42D8,0x42D9,0x42DA,0x42DB,0x42DC,0x42DD,0x42DE,0x42DF,0x42E0,0x42E1,0x42E2,0x42E3,0x42E4,0x42E5,0x42E6,0x42E7,0x42E8,0x42E9,0x42EA,0x42EB,0x42EC,0x42ED,0x42EE,0x42EF,0x42F0,0x42F1,0x42F2,0x42F3,0x42F4,0x42F5,0x42F6,0x42F7,0x42F8,0x42F9,0x42FA,0x42FB,0x42FC,0x42FD,0x42FE,0x42FF,0x4300,0x430D,0x4315,0x4316,0x4317,0x4318,0x4319,0x431A,0x431B,0x431C,0x431D,0x431E,0x431F,0x4320,0x4327,0x4328,0x4329,0x432A,0x432B,0x432C,0x432D,0x432E,0x432F,0x4330,0x4334,0x4335,0x4337,0x4338,0x4339,0x433A,0x433B,0x433C,0x433D,0x433E,0x433F,0x434A,0x434B,0x434C,0x434D,0x434E,0x434F,0x4350,0x4351,0x4352,0x4353,0x4354,0x4355,0x4356,0x4357,0x4358,0x4359,0x435E,0x435F,0x4360,0x4361,0x4362,0x4363,0x4364,0x4365,0x4366,0x4367,0x4368,0x4369,0x436A,0x436B,0x436C,0x436D,0x436E,0x436F,0x4370,0x4371,0x4372,0x4373,0x4374,0x4375,0x4376,0x4377,0x4378,0x4379,0x437A,0x437B,0x437C,0x437D,0x437E,0x437F,0x4380,0x4381,0x4382,0x4383,0x4384,0x4385,0x4386,0x4387,0x4388,0x4389,0x438A,0x438B,0x438C,0x438D,0x438E,0x438F,0x4390,0x4391,0x4392,0x4393,0x4394,0x4395,0x4396,0x4397,0x4398,0x4399,0x439A,0x439B,0x439C,0x439D,0x439E,0x439F,0x43A0,0x43A1,0x43A2,0x43A3,0x43A4,0x43A5,0x43A6,0x43A7,0x43A8,0x43A9,0x43AA,0x43AB,0x43AC,0x43AD,0x43AE,0x43AF,0x43B0,0x43B1,0x43B2,0x43B3,0x43B4,0x43B5,0x43B6,0x43B7,0x43B8,0x43B9,0x43BA,0x43BB,0x43BC,0x43BD,0x43BE,0x43BF,0x43C0,0x43C1,0x43C2,0x43C3,0x43C4,0x43C5,0x43C6,0x43C7,0x43C8,0x43C9,0x43CA,0x43CB,0x43CC,0x43CD,0x43CE,0x43CF,0x43D0,0x43D1,0x43D2,0x43D3,0x43D4,0x43D5,0x43D6,0x43D7,0x43D8,0x43D9,0x43DA,0x43DB,0x43DC,0x43DD,0x43DE,0x43DF,0x43E0,0x43E1,0x43E2,0x43E3,0x43E4,0x43E5,0x43E6,0x43E7,0x43E8,0x43E9,0x43EA,0x43EB,0x43EC,0x43ED,0x43EE,0x43EF,0x43F0,0x43F1,0x43F2,0x43F3,0x43F4,0x43F5,0x43F6,0x43F7,0x43F8,0x43F9,0x43FA,0x43FB,0x43FC,0x43FD,0x43FE,0x43FF,0x4400,0x4401,0x4402,0x4403,0x4404,0x4405,0x4406,0x4407,0x4408,0x4409,0x440A,0x440B,0x440C,0x440D,0x440E,0x440F,0x4410,0x4411,0x4412,0x4413,0x4414,0x4415,0x4416,0x4417,0x4418,0x4419,0x441A,0x441B,0x441C,0x441D,0x441E,0x441F,0x4420,0x4421,0x4422,0x4423,0x4424,0x4425,0x4426,0x4427,0x4428,0x4429,0x442A,0x442B,0x442C,0x442D,0x442E,0x442F,0x4430,0x4431,0x4432,0x4433,0x4434,0x4435,0x4436,0x4437,0x4438,0x4439,0x443A,0x443B,0x443C,0x443D,0x443E,0x443F,0x4440,0x4441,0x4442,0x4443,0x4444,0x4445,0x4446,0x4447,0x4448,0x4449,0x444A,0x444B,0x444C,0x444D,0x444E,0x444F,0x4450,0x4451,0x4452,0x4453,0x4454,0x4455,0x4456,0x4457,0x4458,0x4459,0x445A,0x445B,0x445C,0x445D,0x445E,0x445F,0x4460,0x4461,0x4462,0x4463,0x4464,0x4465,0x4466,0x4467,0x4468,0x4469,0x446A,0x446B,0x446C,0x446D,0x446E,0x446F,0x4470,0x4471,0x4472,0x4473,0x4474,0x4475,0x4476,0x4477,0x4478,0x4479,0x447A,0x447B,0x447C,0x447D,0x447E,0x447F,0x4480,0x4481,0x4482,0x4483,0x4484,0x4485,0x4486,0x4487,0x4488,0x4489,0x448A,0x448B,0x448C,0x448D,0x448E,0x448F,0x4490,0x4491,0x4492,0x4493,0x4494,0x4495,0x4496,0x4497,0x4498,0x4499,0x449A,0x449B,0x449C,0x449D,0x449E,0x449F,0x44A0,0x44A1,0x44A2,0x44A3,0x44A4,0x44A5,0x44A6,0x44A7,0x44A8,0x44A9,0x44AA,0x44AB,0x44AC,0x44AD,0x44AE,0x44AF,0x44B0,0x44B1,0x44B2,0x44B3,0x44B4,0x44B5,0x44B6,0x44B7,0x44B8,0x44B9,0x44BA,0x44BB,0x44BC,0x44BD,0x44BE,0x44BF,0x44C0,0x44C1,0x44C2,0x44C3,0x44C4,0x44C5,0x44C6,0x44C7,0x44C8,0x44C9,0x44CA,0x44CB,0x44CC,0x44CD,0x44CE,0x44CF,0x44D0,0x44D1,0x44D2,0x44D3,0x44D4,0x44D5,0x44D6,0x44D7,0x44D8,0x44D9,0x44DA,0x44DB,0x44DC,0x44DD,0x44DE,0x44DF,0x44E0,0x44E1,0x44E2,0x44E3,0x44E4,0x44E5,0x44E6,0x44E7,0x44E8,0x44E9,0x44EA,0x44EB,0x44EC,0x44ED,0x44EE,0x44EF,0x44F0,0x44F1,0x44F2,0x44F3,0x44F4,0x44F5,0x44F6,0x44F7,0x44F8,0x44F9,0x44FA,0x44FB,0x44FC,0x44FD,0x44FE,0x44FF,0x4500,0x4501,0x4502,0x4503,0x4504,0x4505,0x4506,0x4507,0x4508,0x4509,0x450A,0x450B,0x450C,0x450D,0x450E,0x450F,0x4510,0x4511,0x4512,0x4513,0x4514,0x4515,0x4516,0x4517,0x4518,0x4519,0x451A,0x451B,0x451C,0x451D,0x451E,0x451F,0x4520,0x4521,0x4522,0x4523,0x4524,0x4525,0x4526,0x4527,0x4528,0x4529,0x452A,0x452B,0x452C,0x452D,0x452E,0x452F,0x4530,0x4531,0x4532,0x4533,0x4534,0x4535,0x4536,0x4537,0x4538,0x4539,0x453A,0x453B,0x453C,0x453D,0x453E,0x453F,0x4540,0x4541,0x4542,0x4543,0x4544,0x4545,0x4546,0x4547,0x4548,0x4549,0x454A,0x454B,0x454C,0x454D,0x454E,0x454F,0x4550,0x4551,0x4552,0x4553,0x4554,0x4555,0x4556,0x4557,0x4558,0x4559,0x455A,0x455B,0x455C,0x455D,0x455E,0x455F,0x4560,0x4561,0x4562,0x4563,0x4564,0x4565,0x4566,0x4567,0x4568,0x4569,0x456A,0x456B,0x456C,0x456D,0x456E,0x456F,0x4570,0x4571,0x4572,0x4573,0x4574,0x4575,0x4576,0x4577,0x4578,0x4579,0x457A,0x457B,0x457C,0x457D,0x457E,0x457F,0x4580,0x4581,0x4582,0x4583,0x4584,0x4585,0x4586,0x4587,0x4588,0x4589,0x458A,0x458B,0x458C,0x458D,0x458E,0x458F,0x4590,0x4591,0x4592,0x4593,0x4594,0x4595,0x4596,0x4597,0x4598,0x4599,0x459A,0x459B,0x459C,0x459D,0x459E,0x459F,0x45A0,0x45A1,0x45A2,0x45A3,0x45A4,0x45A5,0x45A6,0x45A7,0x45A8,0x45A9,0x45AA,0x45AB,0x45AC,0x45AD,0x45AE,0x45AF,0x45B0,0x45B1,0x45B2,0x45B3,0x45B4,0x45B5,0x45B6,0x45B7,0x45B8,0x45B9,0x45BA,0x45BB,0x45BC,0x45BD,0x45BE,0x45BF,0x45C0,0x45C1,0x45C2,0x45C3,0x45C4,0x45C5,0x45C6,0x45C7,0x45C8,0x45C9,0x45CA,0x45CB,0x45CC,0x45CD,0x45CE,0x45CF,0x45D0,0x45D1,0x45D2,0x45D3,0x45D4,0x45D5,0x45D6,0x45D7,0x45D8,0x45D9,0x45DA,0x45DB,0x45DC,0x45DD,0x45DE,0x45DF,0x45E0,0x45E1,0x45E2,0x45E3,0x45E4,0x45E5,0x45E6,0x45E7,0x45E8,0x45E9,0x45EA,0x45EB,0x45EC,0x45ED,0x45EE,0x45EF,0x45F0,0x45F1,0x45F2,0x45F3,0x45F4,0x45F5,0x45F6,0x45F7,0x45F8,0x45F9,0x45FA,0x45FB,0x45FC,0x45FD,0x45FE,0x45FF,0x4600,0x4601,0x4602,0x4603,0x4604,0x4605,0x4606,0x4607,0x4608,0x4609,0x460A,0x460B,0x460C,0x460D,0x460E,0x460F,0x4610,0x4611,0x4612,0x4613,0x4614,0x4615,0x4616,0x4617,0x4618,0x4619,0x461A,0x461B,0x461C,0x461D,0x461E,0x461F,0x4620,0x4621,0x4622,0x4623,0x4624,0x4625,0x4626,0x4627,0x4628,0x4629,0x462A,0x462B,0x462C,0x462D,0x462E,0x462F,0x4630,0x4631,0x4632,0x4633,0x4634,0x4635,0x4636,0x4637,0x4638,0x4639,0x463A,0x463B,0x463C,0x463D,0x463E,0x463F,0x4640,0x4641,0x4642,0x4643,0x4644,0x4645,0x4646,0x4647,0x4648,0x4649,0x464A,0x464B,0x464C,0x464D,0x464E,0x464F,0x4650,0x4651,0x4652,0x4653,0x4654,0x4655,0x4656,0x4657,0x4658,0x4659,0x465A,0x465B,0x465C,0x465D,0x465E,0x465F,0x4660,0x4661,0x4662,0x4663,0x4664,0x4665,0x4666,0x4667,0x4668,0x4669,0x466A,0x466B,0x466C,0x466D,0x466E,0x466F,0x4670,0x4671,0x4672,0x4673,0x4674,0x4675,0x4676,0x4677,0x4678,0x4679,0x467A,0x467B,0x467C,0x467D,0x467E,0x467F,0x4680,0x4681,0x4682,0x4683,0x4684,0x4685,0x4686,0x4687,0x4688,0x4689,0x468A,0x468B,0x468C,0x468D,0x468E,0x468F,0x4690,0x4691,0x4692,0x4693,0x4694,0x4695,0x4696,0x4697,0x4698,0x4699,0x469A,0x469B,0x469C,0x469D,0x469E,0x469F,0x46A0,0x46A1,0x46A2,0x46A3,0x46A4,0x46A5,0x46A6,0x46A7,0x46A8,0x46A9,0x46AA,0x46AB,0x46AC,0x46AD,0x46AE,0x46AF,0x46B0,0x46B1,0x46B2,0x46B3,0x46B4,0x46B5,0x46B6,0x46B7,0x46B8,0x46B9,0x46BA,0x46BB,0x46BC,0x46BD,0x46BE,0x46BF,0x46C0,0x46C1,0x46C2,0x46C3,0x46C4,0x46C5,0x46C6,0x46C7,0x46C8,0x46C9,0x46CA,0x46CB,0x46CC,0x46CD,0x46CE,0x46CF,0x46D0,0x46D1,0x46D2,0x46D3,0x46D4,0x46D5,0x46D6,0x46D7,0x46D8,0x46D9,0x46DA,0x46DB,0x46DC,0x46DD,0x46DE,0x46DF,0x46E0,0x46E1,0x46E2,0x46E3,0x46E4,0x46E5,0x46E6,0x46E7,0x46E8,0x46E9,0x46EA,0x46EB,0x46EC,0x46ED,0x46EE,0x46EF,0x46F0,0x46F1,0x46F2,0x46F3,0x46F4,0x46F5,0x46F6,0x46F7,0x46F8,0x46F9,0x46FA,0x46FB,0x46FC,0x46FD,0x46FE,0x46FF,0x4700,0x4701,0x4702,0x4703,0x4704,0x4705,0x4706,0x4707,0x4708,0x4709,0x470A,0x470B,0x470C,0x470D,0x470E,0x470F,0x4710,0x4711,0x4712,0x4713,0x4714,0x4715,0x4716,0x4717,0x4718,0x4719,0x471A,0x471B,0x471C,0x471D,0x471E,0x471F,0x4720,0x4721,0x4723,0x4724,0x4725,0x4726,0x4727,0x4728,0x4729,0x472A,0x472B,0x472C,0x472D,0x472E,0x472F,0x4730,0x4731,0x4732,0x4733,0x4734,0x4735,0x4736,0x4737,0x4738,0x4739,0x473A,0x473B,0x473C,0x473D,0x473E,0x473F,0x4740,0x4741,0x4742,0x4743,0x4744,0x4745,0x4746,0x4747,0x4748,0x4749,0x474A,0x474B,0x474C,0x474D,0x474E,0x474F,0x4750,0x4751,0x4752,0x4753,0x4754,0x4755,0x4756,0x4757,0x4758,0x4759,0x475A,0x475B,0x475C,0x475D,0x475E,0x475F,0x4760,0x4761,0x4762,0x4763,0x4764,0x4765,0x4766,0x4767,0x4768,0x4769,0x476A,0x476B,0x476C,0x476D,0x476E,0x476F,0x4772,0x4775,0x4777,0x4779,0x477A,0x477B,0x477C,0x477D,0x477E,0x477F,0x4780,0x4781,0x4782,0x4783,0x4784,0x4785,0x4786,0x4787,0x4788,0x4789,0x478A,0x478B,0x478C,0x478D,0x478E,0x478F,0x4790,0x4791,0x4792,0x4793,0x4794,0x4795,0x4796,0x4797,0x4798,0x4799,0x479A,0x479B,0x479C,0x479D,0x479E,0x479F,0x47A0,0x47A1,0x47A2,0x47A3,0x47A4,0x47A5,0x47A6,0x47A7,0x47A8,0x47A9,0x47AA,0x47AB,0x47AC,0x47AD,0x47AE,0x47AF,0x47B0,0x47B1,0x47B2,0x47B3,0x47B4,0x47B5,0x47B6,0x47B7,0x47B8,0x47B9,0x47BA,0x47BB,0x47BC,0x47BD,0x47BE,0x47BF,0x47C0,0x47C1,0x47C2,0x47C3,0x47C4,0x47C5,0x47C6,0x47C7,0x47C8,0x47C9,0x47CA,0x47CB,0x47CC,0x47CD,0x47CE,0x47CF,0x47D0,0x47D1,0x47D2,0x47D3,0x47D4,0x47D5,0x47D6,0x47D7,0x47D8,0x47D9,0x47DA,0x47DB,0x47DC,0x47DD,0x47DE,0x47DF,0x47E0,0x47E1,0x47E2,0x47E3,0x47E4,0x47E5,0x47E6,0x47E7,0x47E8,0x47E9,0x47EA,0x47EB,0x47EC,0x47ED,0x47EE,0x47EF,0x47F0,0x47F1,0x47F2,0x47F3,0x47F4,0x47F5,0x47F6,0x47F7,0x47F8,0x47F9,0x47FA,0x47FB,0x47FC,0x47FD,0x47FE,0x47FF,0x4800,0x4801,0x4802,0x4803,0x4804,0x4805,0x4806,0x4807,0x4808,0x4809,0x480A,0x480B,0x480C,0x480D,0x480E,0x480F,0x4810,0x4811,0x4812,0x4813,0x4814,0x4815,0x4816,0x4817,0x4818,0x4819,0x481A,0x481B,0x481C,0x481D,0x481E,0x481F,0x4820,0x4821,0x4822,0x4823,0x4824,0x4825,0x4826,0x4827,0x4828,0x4829,0x482A,0x482B,0x482C,0x482D,0x482E,0x482F,0x4830,0x4831,0x4832,0x4833,0x4834,0x4835,0x4836,0x4837,0x4838,0x4839,0x483A,0x483B,0x483C,0x483D,0x483E,0x483F,0x4840,0x4841,0x4842,0x4843,0x4844,0x4845,0x4846,0x4847,0x4848,0x4849,0x484A,0x484B,0x484C,0x484D,0x484E,0x484F,0x4850,0x4851,0x4852,0x4853,0x4854,0x4855,0x4856,0x4857,0x4858,0x4859,0x485A,0x485B,0x485C,0x485D,0x485E,0x485F,0x4860,0x4861,0x4862,0x4863,0x4864,0x4865,0x4866,0x4867,0x4868,0x4869,0x486A,0x486B,0x486C,0x486D,0x486E,0x486F,0x4870,0x4871,0x4872,0x4873,0x4874,0x4875,0x4876,0x4877,0x4878,0x4879,0x487A,0x487B,0x487C,0x487D,0x487E,0x487F,0x4880,0x4881,0x4882,0x4883,0x4884,0x4885,0x4886,0x4887,0x4888,0x4889,0x488A,0x488B,0x488C,0x488D,0x488E,0x488F,0x4890,0x4891,0x4892,0x4893,0x4894,0x4895,0x4896,0x4897,0x4898,0x4899,0x489A,0x489B,0x489C,0x489D,0x489E,0x489F,0x48A0,0x48A1,0x48A2,0x48A3,0x48A4,0x48A5,0x48A6,0x48A7,0x48A8,0x48A9,0x48AA,0x48AB,0x48AC,0x48AD,0x48AE,0x48AF,0x48B0,0x48B1,0x48B2,0x48B3,0x48B4,0x48B5,0x48B6,0x48B7,0x48B8,0x48B9,0x48BA,0x48BB,0x48BC,0x48BD,0x48BE,0x48BF,0x48C0,0x48C1,0x48C2,0x48C3,0x48C4,0x48C5,0x48C6,0x48C7,0x48C8,0x48C9,0x48CA,0x48CB,0x48CC,0x48CD,0x48CE,0x48CF,0x48D0,0x48D1,0x48D2,0x48D3,0x48D4,0x48D5,0x48D6,0x48D7,0x48D8,0x48D9,0x48DA,0x48DB,0x48DC,0x48DD,0x48DE,0x48DF,0x48E0,0x48E1,0x48E2,0x48E3,0x48E4,0x48E5,0x48E6,0x48E7,0x48E8,0x48E9,0x48EA,0x48EB,0x48EC,0x48ED,0x48EE,0x48EF,0x48F0,0x48F1,0x48F2,0x48F3,0x48F4,0x48F5,0x48F6,0x48F7,0x48F8,0x48F9,0x48FA,0x48FB,0x48FC,0x48FD,0x48FE,0x48FF,0x5002,0x5003,0x5004,0x5005,0x5006,0x5007,0x5008,0x5009,0x500A,0x500B,0x500C,0x500D,0x500E,0x500F,0x5010,0x5011,0x5012,0x5013,0x5014,0x5015,0x5016,0x5017,0x5018,0x5019,0x501A,0x501B,0x501C,0x501D,0x501E,0x501F,0x5020,0x5021,0x5022,0x5023,0x5024,0x5025,0x5026,0x5027,0x5028,0x5029,0x502A,0x502B,0x502C,0x502D,0x502E,0x502F,0x5030,0x5031,0x5032,0x5033,0x5034,0x5035,0x5036,0x5037,0x5038,0x5039,0x503A,0x503B,0x503C,0x503D,0x503E,0x503F,0x5040,0x5041,0x5042,0x5043,0x5044,0x5045,0x5046,0x5047,0x5048,0x5049,0x504A,0x504B,0x504C,0x504D,0x504E,0x504F,0x5050,0x5051,0x5052,0x5053,0x5054,0x5055,0x5056,0x5057,0x5058,0x5059,0x505A,0x505B,0x505C,0x505D,0x505E,0x505F,0x5060,0x5061,0x5062,0x5063,0x5067,0x5068,0x506D,0x506E,0x507E,0x507F,0x5080,0x5081,0x5089,0x508A,0x508B,0x508F,0x5093,0x5095,0x5097,0x5098,0x5099,0x509A,0x509B,0x509C,0x509D,0x509E,0x509F,0x50A2,0x50A3,0x50A4,0x50A5,0x50A6,0x50A7,0x50A8,0x50A9,0x50AA,0x50AB,0x50AC,0x50AD,0x50AE,0x50AF,0x50B0,0x50B1,0x50B2,0x50B3,0x50B4,0x50B5,0x50B6,0x50B7,0x50B8,0x50B9,0x50BA,0x50BB,0x50BC,0x50BD,0x50BE,0x50BF,0x50C0,0x50C1,0x50C2,0x50C3,0x50C4,0x50C5,0x50C6,0x50C7,0x50CB,0x50CC,0x50CD,0x50CE,0x50CF,0x50D0,0x50D1,0x50D2,0x50D3,0x50D4,0x50D5,0x50D6,0x50D7,0x50D8,0x50D9,0x50DA,0x50DB,0x50DC,0x50DD,0x50DE,0x50DF,0x50E0,0x50E1,0x50E2,0x50E3,0x50E4,0x50E5,0x50E6,0x50E7,0x50E8,0x50E9,0x50EA,0x50EB,0x50EC,0x50ED,0x50EE,0x50EF,0x50F0,0x50F1,0x50F2,0x50F3,0x50F4,0x50F5,0x50F6,0x50F7,0x50F8,0x50F9,0x50FA,0x50FB,0x50FC,0x50FD,0x50FE,0x50FF,0x5100,0x5101,0x5102,0x5103,0x5104,0x5105,0x5106,0x5107,0x5108,0x5109,0x510A,0x510B,0x510C,0x510D,0x510E,0x510F,0x5110,0x5111,0x5112,0x5113,0x5114,0x5115,0x5116,0x5117,0x5118,0x5119,0x511A,0x511B,0x511C,0x511D,0x511E,0x511F,0x5120,0x5121,0x5122,0x5123,0x5124,0x5125,0x5126,0x5127,0x5128,0x5129,0x512A,0x512B,0x513B,0x513D,0x5140,0x5141,0x5142,0x5143,0x5144,0x5145,0x5146,0x5147,0x5148,0x5149,0x514A,0x514B,0x514C,0x514D,0x514E,0x514F,0x5150,0x5151,0x5152,0x5153,0x5154,0x5155,0x5156,0x5157,0x5158,0x5159,0x515A,0x515B,0x515C,0x515D,0x515E,0x515F,0x5160,0x5161,0x5162,0x5163,0x5164,0x5165,0x5166,0x5167,0x5168,0x5169,0x516A,0x516B,0x516C,0x516D,0x516E,0x516F,0x5170,0x5171,0x5172,0x5173,0x5174,0x5175,0x5176,0x5177,0x5178,0x5179,0x517A,0x517B,0x517C,0x517D,0x517E,0x517F,0x5180,0x5181,0x5182,0x5183,0x5184,0x5185,0x5186,0x5187,0x5188,0x5189,0x518A,0x518B,0x518C,0x518D,0x518E,0x518F,0x5192,0x5193,0x5194,0x5195,0x5196,0x5197,0x5198,0x5199,0x519A,0x519B,0x519C,0x519D,0x519E,0x519F,0x51A0,0x51A1,0x51A2,0x51A3,0x51A4,0x51A5,0x51A6,0x51A7,0x51A8,0x51A9,0x51AA,0x51AB,0x51AC,0x51AD,0x51AE,0x51AF,0x51B0,0x51B1,0x51B2,0x51B3,0x51B4,0x51B5,0x51B6,0x51B7,0x51B8,0x51B9,0x51BA,0x51BB,0x51BC,0x51BD,0x51BE,0x51BF,0x51C0,0x51C1,0x51C2,0x51C3,0x51C4,0x51C5,0x51C6,0x51C7,0x51C8,0x51C9,0x51CA,0x51CB,0x51CC,0x51CD,0x51CE,0x51CF,0x51D0,0x51D1,0x51D2,0x51D3,0x51D4,0x51D5,0x51D6,0x51D7,0x51D8,0x51D9,0x51DA,0x51DB,0x51DC,0x51DD,0x51DE,0x51DF,0x51E0,0x51E1,0x51E2,0x51E3,0x51E4,0x51E5,0x51E6,0x51E7,0x51E8,0x51E9,0x51EA,0x51EB,0x51EC,0x51ED,0x51EE,0x51EF,0x51F0,0x51F1,0x51F2,0x51F3,0x5203,0x5204,0x521B,0x5222,0x5223,0x5224,0x5225,0x522F,0x5238,0x5239,0x523B,0x523C,0x523D,0x523E,0x5240,0x5241,0x5242,0x5243,0x5244,0x524A,0x524B,0x524C,0x5261,0x5264,0x5265,0x5266,0x5267,0x5268,0x5269,0x526A,0x526B,0x526C,0x526D,0x526E,0x526F,0x5274,0x5275,0x5276,0x5277,0x5278,0x5279,0x527A,0x527B,0x527C,0x527D,0x527E,0x527F,0x5280,0x5281,0x5282,0x5283,0x5284,0x5285,0x5286,0x5287,0x5288,0x5289,0x528A,0x528B,0x528C,0x528D,0x528E,0x528F,0x5290,0x5291,0x5292,0x5293,0x5294,0x5295,0x5296,0x5297,0x5298,0x5299,0x529A,0x529B,0x529C,0x529D,0x529E,0x529F,0x52A0,0x52A1,0x52A2,0x52A3,0x52A4,0x52A5,0x52A6,0x52A7,0x52A8,0x52A9,0x52AA,0x52AB,0x52AC,0x52AD,0x52AE,0x52AF,0x52B0,0x52B1,0x52B2,0x52B3,0x52B4,0x52B5,0x52B6,0x52B7,0x52B8,0x52B9,0x52BA,0x52BB,0x52BC,0x52BD,0x52BE,0x52BF,0x52C0,0x52C1,0x52C2,0x52C3,0x52C4,0x52C5,0x52C6,0x52C7,0x52C8,0x52C9,0x52CA,0x52CB,0x52CC,0x52CD,0x52CE,0x52CF,0x52D0,0x52D1,0x52D2,0x52D3,0x52D4,0x52D5,0x52D6,0x52D7,0x52D8,0x52D9,0x52DA,0x52DB,0x52DC,0x52DD,0x52DE,0x52DF,0x52E0,0x52E1,0x52E2,0x52E3,0x52E4,0x52E5,0x52E6,0x52E7,0x52E8,0x52E9,0x52EA,0x52EB,0x52EC,0x52ED,0x52EE,0x52EF,0x52F0,0x52F1,0x52F2,0x52F3,0x52F4,0x52F5,0x52F6,0x52F7,0x52F8,0x52F9,0x52FA,0x52FB,0x52FC,0x52FD,0x52FE,0x52FF,0x5300,0x5301,0x5302,0x5303,0x5304,0x5305,0x5306,0x5307,0x5308,0x5309,0x530A,0x530B,0x530C,0x530D,0x530E,0x530F,0x5310,0x5311,0x5312,0x5313,0x5314,0x5315,0x5316,0x5317,0x5318,0x5319,0x531A,0x531B,0x531C,0x531D,0x531E,0x531F,0x5320,0x5321,0x5322,0x5323,0x5324,0x5325,0x5326,0x5327,0x5328,0x5329,0x532A,0x532B,0x532C,0x532D,0x532E,0x532F,0x5330,0x5331,0x5332,0x5333,0x5334,0x5335,0x5336,0x5337,0x5338,0x5339,0x533A,0x533B,0x533C,0x533D,0x533E,0x533F,0x5340,0x5341,0x5342,0x5343,0x5344,0x5345,0x5346,0x5347,0x5348,0x5349,0x534A,0x534B,0x534C,0x534D,0x534E,0x534F,0x5350,0x5351,0x5352,0x5353,0x5354,0x5355,0x5356,0x5357,0x5358,0x5359,0x535A,0x535B,0x535C,0x535D,0x535E,0x535F,0x5360,0x5361,0x5362,0x5363,0x5364,0x5365,0x5366,0x5367,0x5368,0x5369,0x536A,0x536B,0x536C,0x536D,0x536E,0x536F,0x5370,0x5371,0x5372,0x5373,0x5374,0x5375,0x5376,0x5377,0x5378,0x5379,0x537A,0x537B,0x537C,0x537D,0x537E,0x537F,0x5380,0x5381,0x5382,0x5383,0x5385,0x5386,0x5387,0x5388,0x5389,0x538A,0x538B,0x538C,0x538D,0x538E,0x538F,0x5390,0x5391,0x5392,0x5393,0x5394,0x5395,0x5396,0x5397,0x5398,0x5399,0x539A,0x539B,0x539C,0x539D,0x539E,0x539F,0x53A0,0x53A1,0x53A2,0x53A3,0x53A4,0x53A5,0x53A6,0x53A7,0x53A8,0x53A9,0x53AA,0x53AB,0x53AC,0x53AD,0x53AE,0x53AF,0x53B0,0x53B1,0x53B2,0x53B3,0x53B4,0x53B5,0x53B6,0x53B7,0x53B8,0x53B9,0x53BA,0x53BB,0x53BC,0x53BD,0x53BE,0x53BF,0x53C0,0x53C1,0x53C2,0x53C3,0x53C4,0x53C5,0x53C6,0x53C7,0x53C8,0x53C9,0x53CA,0x53CB,0x53CC,0x53CD,0x53CE,0x53CF,0x53D0,0x53D1,0x53D2,0x53D3,0x53D4,0x53D5,0x53D6,0x53D7,0x53D8,0x53D9,0x53DA,0x53DB,0x53DC,0x53DD,0x53DE,0x53DF,0x53E0,0x53E1,0x53E2,0x53E3,0x53E4,0x53E5,0x53E6,0x53E7,0x53E8,0x53E9,0x53EA,0x53EB,0x53EC,0x53ED,0x53EE,0x53EF,0x53F0,0x53F1,0x53F2,0x53F3,0x53F4,0x53F5,0x53F6,0x53F7,0x53F8,0x53F9,0x53FA,0x53FB,0x53FC,0x53FD,0x53FE,0x53FF,0x5401,0x5402,0x5403,0x5404,0x5405,0x5406,0x5407,0x5409,0x540A,0x540B,0x540C,0x540D,0x540E,0x540F,0x5412,0x5413,0x5414,0x5415,0x5416,0x5417,0x5418,0x5419,0x541A,0x541B,0x541C,0x541D,0x541E,0x541F,0x5420,0x5421,0x5422,0x5423,0x5424,0x5425,0x5426,0x5427,0x7000,0x700F,0x7020,0x7021,0x7022,0x7023,0x7024,0x7025,0x7026,0x7027,0x7028,0x7029,0x702A,0x702B,0x702C,0x702D,0x702E,0x702F,0x7030,0x7031,0x7032,0x7033,0x7034,0x7035,0x7036,0x7037,0x7038,0x7039,0x703A,0x703B,0x703C,0x703D,0x703E,0x703F,0x7040,0x7041,0x7042,0x7043,0x7044,0x7045,0x7046,0x7047,0x7048,0x7049,0x704A,0x704B,0x704C,0x704D,0x704E,0x704F,0x7050,0x7051,0x7052,0x7053,0x7054,0x7055,0x7056,0x7057,0x7058,0x7059,0x705A,0x705B,0x705C,0x705D,0x705E,0x705F,0x7060,0x7061,0x7062,0x7063,0x7064,0x7065,0x7066,0x7067,0x7068,0x7069,0x706A,0x706B,0x706C,0x706D,0x706E,0x706F,0x7070,0x7071,0x7072,0x7073,0x7074,0x7075,0x7076,0x7077,0x7078,0x7079,0x707A,0x707B,0x707C,0x707D,0x707E,0x707F,0x7080,0x7081,0x7082,0x7083,0x7084,0x7085,0x7086,0x7087,0x7088,0x7089,0x708A,0x708B,0x708C,0x708D,0x708E,0x708F,0x7090,0x7091,0x7092,0x7093,0x7094,0x7095,0x7096,0x7097,0x7098,0x7099,0x709A,0x709B,0x709C,0x709D,0x709E,0x709F,0x70A0,0x70A1,0x70A2,0x70A3,0x70A4,0x70A5,0x70A6,0x70A7,0x70A8,0x70A9,0x70AA,0x70AB,0x70AC,0x70AD,0x70AE,0x70AF,0x70B0,0x70B1,0x70B2,0x70B3,0x70B4,0x70B5,0x70B6,0x70B7,0x70B8,0x70B9,0x70BA,0x70BB,0x70BC,0x70BD,0x70BE,0x70BF,0x70C0,0x70C1,0x70C2,0x70C3,0x70C4,0x70C5,0x70C6,0x70C7,0x70C8,0x70C9,0x70CA,0x70CB,0x70CC,0x70CD,0x70CE,0x70CF,0x70D0,0x70D1,0x70D2,0x70D3,0x70D4,0x70D5,0x70D6,0x70D7,0x70D8,0x70D9,0x70DA,0x70DB,0x70DC,0x70DD,0x70DE,0x70DF,0x70E0,0x70E1,0x70E2,0x70E3,0x70E4,0x70E5,0x70E6,0x70E7,0x70E8,0x70E9,0x70EA,0x70EB,0x70EC,0x70ED,0x70EE,0x70EF,0x70F0,0x70F1,0x70F2,0x70F3,0x70F4,0x70F5,0x70F6,0x70F7,0x70F8,0x70F9,0x70FA,0x70FB,0x70FC,0x70FD,0x70FE,0x70FF,0x7100,0x7101,0x7102,0x7103,0x7104,0x7105,0x7106,0x7107,0x7108,0x7109,0x710A,0x710B,0x710C,0x710D,0x710E,0x710F,0x7110,0x7111,0x7112,0x7113,0x7114,0x7115,0x7116,0x7117,0x7118,0x7119,0x711A,0x711B,0x711C,0x711D,0x711E,0x711F,0x7120,0x7121,0x7122,0x7123,0x7124,0x7125,0x7126,0x7127,0x7128,0x7129,0x712A,0x712B,0x712C,0x712D,0x712E,0x712F,0x7145,0x7146,0x7147,0x7148,0x7149,0x714A,0x714B,0x714C,0x714D,0x714E,0x714F,0x715A,0x715B,0x715C,0x715D,0x715E,0x715F,0x7160,0x7161,0x7162,0x7163,0x7164,0x7165,0x7166,0x7167,0x7168,0x7169,0x716A,0x716B,0x716C,0x716D,0x716E,0x716F,0x7170,0x7171,0x7172,0x7173,0x7174,0x7175,0x7176,0x7177,0x7178,0x7179,0x717A,0x717B,0x717C,0x717D,0x717E,0x717F,0x7180,0x7181,0x7182,0x7183,0x7184,0x7185,0x7186,0x7187,0x7188,0x7189,0x718A,0x718B,0x718C,0x718D,0x718E,0x718F,0x7190,0x7191,0x7192,0x7193,0x7194,0x7195,0x7196,0x7197,0x7198,0x7199,0x719A,0x719B,0x719C,0x719D,0x719E,0x719F,0x71A0,0x71A1,0x71A2,0x71A3,0x71A4,0x71A5,0x71A6,0x71A7,0x71A8,0x71A9,0x71AA,0x71AB,0x71AC,0x71AD,0x71AE,0x71AF,0x71B0,0x71B1,0x71B2,0x71B3,0x71B4,0x71B5,0x71B6,0x71B7,0x71B8,0x71B9,0x71BA,0x71BB,0x71BC,0x71BD,0x71BE,0x71BF,0x71C0,0x71C1,0x71C2,0x71C3,0x71C4,0x71C5,0x71C6,0x71C7,0x71C8,0x71C9,0x71CA,0x71CB,0x71CC,0x71CD,0x71CE,0x71CF,0x71D0,0x71D1,0x71D2,0x71D3,0x71D4,0x71D5,0x71D6,0x71D7,0x71D8,0x71D9,0x71DA,0x71DB,0x71DC,0x71DD,0x71DE,0x71DF,0x71E0,0x71E1,0x71E2,0x71E3,0x71E4,0x71E5,0x71E6,0x71E7,0x71E8,0x71E9,0x71EA,0x71EB,0x71EC,0x71ED,0x71EE,0x71EF,0x71F0,0x71F1,0x71F2,0x71F3,0x71F4,0x71F5,0x71F6,0x71F7,0x71F8,0x71F9,0x71FA,0x71FB,0x71FC,0x71FD,0x71FE,0x71FF,0x720B,0x720E,0x720F,0x7210,0x7213,0x7214,0x7215,0x7216,0x7217,0x7218,0x721A,0x721C,0x7223,0x7224,0x7225,0x7226,0x7227,0x7228,0x7229,0x722A,0x722B,0x722C,0x722D,0x722E,0x722F,0x7233,0x7234,0x7235,0x7236,0x7237,0x7238,0x7239,0x723A,0x723B,0x723C,0x723D,0x723E,0x723F,0x7240,0x7241,0x7242,0x7243,0x7244,0x7245,0x7246,0x7247,0x7248,0x7249,0x724A,0x724B,0x724C,0x724D,0x724E,0x724F,0x7250,0x7251,0x7252,0x7253,0x7254,0x7255,0x7256,0x7257,0x7258,0x7259,0x7260,0x7261,0x7262,0x7263,0x7268,0x7269,0x726A,0x726B,0x726C,0x726E,0x726F,0x7270,0x7271,0x7272,0x7273,0x7274,0x7275,0x7276,0x7277,0x7278,0x7279,0x727A,0x727B,0x727C,0x727D,0x727E,0x727F,0x7280,0x7281,0x7282,0x7283,0x7284,0x7285,0x7286,0x7287,0x7288,0x7289,0x728A,0x728B,0x728C,0x728D,0x728E,0x728F,0x7290,0x7291,0x7292,0x7293,0x7294,0x7295,0x7296,0x7297,0x7298,0x7299,0x729A,0x729B,0x729C,0x729D,0x729E,0x729F,0x72A0,0x72A1,0x72A2,0x72A3,0x72A4,0x72A5,0x72A6,0x72A7,0x72A8,0x72A9,0x72AA,0x72AB,0x72AC,0x72AD,0x72AE,0x72AF,0x72B0,0x72B1,0x72B2,0x72B3,0x72B4,0x72B5,0x72B6,0x72B7,0x72B8,0x72B9,0x72BA,0x72BB,0x72BC,0x72BD,0x72BE,0x72BF,0x72C0,0x72C1,0x72C2,0x72C3,0x72C4,0x72C5,0x72C6,0x72C7,0x72D1,0x72D2,0x72D3,0x72D4,0x72D5,0x72D6,0x72D7,0x72D8,0x72D9,0x72DA,0x72DB,0x72DC,0x72DD,0x72DE,0x72DF,0x72E0,0x72E1,0x72E2,0x72E3,0x72E4,0x72E5,0x72E6,0x72E7,0x72E8,0x72E9,0x72EA,0x72EB,0x72EC,0x72ED,0x72EE,0x72EF,0x72F0,0x72F1,0x72F2,0x72F3,0x72F4,0x72F5,0x72F6,0x72F7,0x72F8,0x72F9,0x72FA,0x72FB,0x72FC,0x72FD,0x72FE,0x72FF,0x7300,0x7301,0x7302,0x7303,0x7304,0x7305,0x7306,0x7307,0x7308,0x7309,0x730A,0x730B,0x730C,0x730D,0x730E,0x730F,0x7310,0x7311,0x7312,0x7313,0x7314,0x7315,0x7316,0x7317,0x7318,0x7319,0x731A,0x731B,0x731C,0x731D,0x731E,0x731F,0x7320,0x7321,0x7322,0x7323,0x7324,0x7325,0x7326,0x7327,0x7328,0x7329,0x732A,0x732B,0x732C,0x732D,0x732E,0x732F,0x7330,0x7331,0x7332,0x7333,0x7334,0x7335,0x7336,0x7337,0x7338,0x7339,0x733A,0x733B,0x733C,0x733D,0x733E,0x733F,0x7340,0x7341,0x7342,0x7343,0x7344,0x7345,0x7346,0x7347,0x7348,0x7349,0x734A,0x734B,0x734C,0x734D,0x734E,0x734F,0x7350,0x7351,0x7352,0x7353,0x7354,0x7355,0x7356,0x7357,0x7358,0x7359,0x735A,0x735B,0x735C,0x735D,0x735E,0x735F,0x7360,0x7361,0x7362,0x7363,0x7364,0x7365,0x7366,0x7367,0x7368,0x7369,0x736A,0x736B,0x736C,0x736D,0x736E,0x736F,0x7370,0x7371,0x7372,0x7373,0x7374,0x7375,0x7376,0x7377,0x7378,0x7379,0x737A,0x737B,0x737C,0x737D,0x737E,0x737F,0x7380,0x7381,0x7382,0x7383,0x7384,0x7385,0x7386,0x7387,0x7388,0x7389,0x738A,0x738B,0x738C,0x738D,0x738E,0x738F,0x7390,0x7391,0x7392,0x7393,0x7394,0x7395,0x7396,0x7397,0x7398,0x7399,0x739A,0x739B,0x739C,0x739D,0x739E,0x739F,0x73A0,0x73A1,0x73A2,0x73A3,0x73A4,0x73A5,0x73A6,0x73A7,0x73A8,0x73A9,0x73AA,0x73AB,0x73AC,0x73AD,0x73AE,0x73AF,0x73B0,0x73B1,0x73B2,0x73B3,0x73B4,0x73B5,0x73B6,0x73B7,0x73B8,0x73B9,0x73BA,0x73BB,0x73BC,0x73BD,0x73BE,0x73BF,0x73C0,0x73C1,0x73C2,0x73C3,0x73C4,0x73C5,0x73C6,0x73C7,0x73C8,0x73C9,0x73CA,0x73CB,0x73CC,0x73CD,0x73CE,0x73CF,0x73D0,0x73D1,0x73D2,0x73D3,0x73D4,0x73D5,0x73D6,0x73D7,0x73D8,0x73D9,0x73DA,0x73DB,0x73DC,0x73DD,0x73DE,0x73DF,0x73E0,0x73E1,0x73E2,0x73E3,0x73E4,0x73E5,0x73E6,0x73E7,0x73E8,0x73E9,0x73EA,0x73EB,0x73EC,0x73ED,0x73EE,0x73EF,0x73F0,0x73F1,0x73F2,0x73F3,0x73F4,0x73F5,0x73F6,0x73F7,0x73F8,0x73F9,0x73FA,0x73FB,0x73FC,0x73FD,0x73FE,0x73FF,0x7400,0x7401,0x7402,0x7403,0x7405,0x7406,0x7407,0x7408,0x7409,0x740A,0x740B,0x740C,0x740D,0x740E,0x740F,0x7410,0x7411,0x7412,0x7413,0x7414,0x7415,0x7416,0x7417,0x7418,0x7419,0x741A,0x741B,0x741C,0x741D,0x741E,0x741F,0x7420,0x7421,0x7422,0x7423,0x7424,0x7425,0x7426,0x7427,0x7428,0x7429,0x742A,0x742B,0x742C,0x742D,0x742E,0x742F,0x7430,0x7431,0x7432,0x7433,0x7434,0x7435,0x7436,0x7437,0x7438,0x7439,0x743A,0x743B,0x743C,0x743D,0x743E,0x743F,0x7440,0x7441,0x7442,0x7443,0x7444,0x7445,0x7446,0x7447,0x7448,0x7449,0x744A,0x744B,0x744C,0x744D,0x744E,0x744F,0x7450,0x7451,0x7452,0x7453,0x7454,0x7455,0x7456,0x7457,0x7458,0x7459,0x745A,0x745B,0x745C,0x745D,0x745E,0x745F,0x7460,0x7461,0x7462,0x7463,0x7464,0x7465,0x7466,0x7467,0x7468,0x7469,0x746A,0x746B,0x746C,0x746D,0x746E,0x746F,0x7470,0x7471,0x7472,0x7473,0x7474,0x7475,0x7476,0x7477,0x7478,0x7479,0x747A,0x747B,0x747C,0x747D,0x747E,0x747F,0x7480,0x7481,0x7482,0x7483,0x7484,0x7485,0x7486,0x7487,0x7488,0x7489,0x748A,0x748B,0x748C,0x748D,0x748E,0x748F,0x7490,0x7491,0x7492,0x7493,0x7494,0x7495,0x7496,0x7497,0x7498,0x7499,0x749A,0x749B,0x749C,0x749D,0x749E,0x749F,0x74A0,0x74A1,0x74A2,0x74A3,0x74A4,0x74A5,0x74A6,0x74A7,0x74A8,0x74A9,0x74AA,0x74AB,0x74AC,0x74AD,0x74AE,0x74AF,0x74B0,0x74B1,0x74B2,0x74B3,0x74B4,0x74B5,0x74B6,0x74B7,0x74B8,0x74B9,0x74BA,0x74BB,0x74BC,0x74BD,0x74BE,0x74BF,0x74C0,0x74C1,0x74C2,0x74C3,0x74C4,0x74C5,0x74C6,0x74C7,0x74C8,0x74C9,0x74CA,0x74CB,0x74CC,0x74CD,0x74CE,0x74CF,0x74D0,0x74D1,0x74D2,0x74D3,0x74D4,0x74D5,0x74D6,0x74D7,0x74D8,0x74D9,0x74DA,0x74DB,0x74DC,0x74DD,0x74DE,0x74DF,0x74E0,0x74E1,0x74E2,0x74E3,0x74E4,0x74E5,0x74E6,0x74E7,0x74E8,0x74E9,0x74EA,0x74EB,0x74EC,0x74ED,0x74EE,0x74EF,0x74F0,0x74F1,0x74F2,0x74F3,0x74F4,0x74F5,0x74F6,0x74F7,0x74F8,0x74F9,0x74FA,0x74FB,0x74FC,0x74FD,0x74FE,0x74FF,0x7500,0x7501,0x7502,0x7503,0x7504,0x7505,0x7506,0x7507,0x7508,0x7509,0x750A,0x750B,0x750C,0x750D,0x750E,0x750F,0x7510,0x7511,0x7512,0x7513,0x7514,0x7515,0x7516,0x7517,0x7518,0x7519,0x751A,0x751B,0x751C,0x751D,0x751E,0x751F,0x7520,0x7521,0x7522,0x7523,0x7524,0x7525,0x7526,0x7527,0x7528,0x7529,0x752A,0x752B,0x752C,0x752D,0x752E,0x752F,0x7530,0x7531,0x7532,0x7533,0x7534,0x7535,0x7536,0x7537,0x7538,0x7539,0x753A,0x753B,0x753C,0x753D,0x753E,0x753F,0x7540,0x7541,0x7542,0x7543,0x7544,0x7545,0x7546,0x7547,0x7548,0x7549,0x754A,0x754B,0x754C,0x754D,0x754E,0x754F,0x7550,0x7551,0x7552,0x7553,0x7554,0x7555,0x7556,0x7557,0x7558,0x7559,0x755A,0x755B,0x755C,0x755D,0x755E,0x755F,0x7560,0x7561,0x7562,0x7563,0x7564,0x7565,0x7566,0x7567,0x7568,0x7569,0x756A,0x756B,0x756C,0x756D,0x756E,0x756F,0x7570,0x7571,0x7572,0x7573,0x7574,0x7575,0x7576,0x7577,0x7578,0x7579,0x757A,0x757B,0x757C,0x757D,0x757E,0x757F,0x7580,0x7581,0x7582,0x7583,0x7584,0x7585,0x7586,0x7587,0x7588,0x7589,0x758A,0x758B,0x758C,0x758D,0x758E,0x758F,0x7590,0x7591,0x7592,0x7593,0x7594,0x7595,0x7596,0x7597,0x7598,0x7599,0x759A,0x759B,0x759C,0x759D,0x759E,0x759F,0x75A0,0x75A1,0x75A2,0x75A3,0x75A4,0x75A5,0x75A6,0x75A7,0x75A8,0x75A9,0x75AA,0x75AB,0x75AC,0x75AD,0x75AE,0x75AF,0x75B0,0x75B1,0x75B2,0x75B3,0x75B4,0x75B5,0x75B6,0x75B7,0x75B8,0x75B9,0x75BA,0x75BB,0x75BC,0x75BD,0x75BE,0x75BF,0x75C0,0x75C1,0x75C2,0x75C3,0x75C4,0x75C5,0x75C6,0x75C7,0x75C8,0x75C9,0x75CA,0x75CB,0x75CC,0x75CD,0x75CE,0x75CF,0x75D0,0x75D1,0x75D2,0x75D3,0x75D4,0x75D5,0x75D6,0x75D7,0x75D8,0x75D9,0x75DA,0x75DB,0x75DC,0x75DD,0x75DE,0x75DF,0x75E0,0x75E1,0x75E2,0x75E3,0x75E4,0x75E5,0x75E6,0x75E7,0x75E8,0x75E9,0x75EA,0x75EB,0x75EC,0x75ED,0x75EE,0x75EF,0x75F0,0x75F1,0x75F2,0x75F3,0x75F4,0x75F5,0x75F6,0x75F7,0x75F8,0x75F9,0x75FA,0x75FB,0x75FC,0x75FD,0x75FE,0x75FF,0x7600,0x7601,0x7602,0x7603,0x7604,0x7605,0x7606,0x7607,0x7608,0x7609,0x760A,0x760B,0x760C,0x760D,0x760E,0x760F,0x7610,0x7611,0x7612,0x7613,0x7614,0x7615,0x7616,0x7617,0x7618,0x7619,0x761A,0x761B,0x761C,0x761D,0x761E,0x761F,0x7620,0x7621,0x7622,0x7623,0x7624,0x7625,0x7626,0x7627,0x7628,0x7629,0x762A,0x762B,0x762C,0x762D,0x762E,0x762F,0x7630,0x7631,0x7632,0x7633,0x7634,0x7635,0x7636,0x7637,0x7638,0x7639,0x763A,0x763B,0x763C,0x763D,0x763E,0x763F,0x7640,0x7641,0x7642,0x7643,0x7644,0x7645,0x7646,0x7647,0x7648,0x7649,0x764A,0x764B,0x764C,0x764D,0x764E,0x764F,0x7650,0x7651,0x7652,0x7653,0x7654,0x7655,0x7656,0x7657,0x7658,0x7659,0x765A,0x765B,0x765C,0x765D,0x765E,0x765F,0x7660,0x7661,0x7662,0x7663,0x7664,0x7665,0x7666,0x7667,0x7668,0x7669,0x766A,0x766B,0x766C,0x766D,0x766E,0x766F,0x7670,0x7671,0x7672,0x7673,0x7674,0x7675,0x7676,0x7677,0x7678,0x7679,0x767A,0x767B,0x767C,0x767D,0x767E,0x767F,0x7680,0x7681,0x7682,0x7683,0x7684,0x7685,0x7686,0x7687,0x7688,0x7689,0x768A,0x768B,0x768C,0x768D,0x768E,0x768F,0x7690,0x7691,0x7692,0x7693,0x7694,0x7695,0x7696,0x7697,0x7698,0x7699,0x769A,0x769B,0x769C,0x769D,0x769E,0x769F,0x76A0,0x76A1,0x76A2,0x76A3,0x76A4,0x76A5,0x76A6,0x76A7,0x76A8,0x76A9,0x76AA,0x76AB,0x76AC,0x76AD,0x76AE,0x76AF,0x76B0,0x76B1,0x76B2,0x76B3,0x76B4,0x76B5,0x76B6,0x76B7,0x76B8,0x76B9,0x76BA,0x76BB,0x76BC,0x76BD,0x76BE,0x76BF,0x76C0,0x76C1,0x76C2,0x76C3,0x76C4,0x76C5,0x76C6,0x76C7,0x76C8,0x76C9,0x76CA,0x76CB,0x76CC,0x76CD,0x76CE,0x76CF,0x76D0,0x76D1,0x76D2,0x76D3,0x76D4,0x76D5,0x76D6,0x76D7,0x76D8,0x76D9,0x76DA,0x76DB,0x76DC,0x76DD,0x76DE,0x76DF,0x76E0,0x76E1,0x76E2,0x76E3,0x76E4,0x76E5,0x76E6,0x76E7,0x76E8,0x76E9,0x76EA,0x76EB,0x76EC,0x76ED,0x76EE,0x76EF,0x76F0,0x76F1,0x76F2,0x76F3,0x76F4,0x76F5,0x76F6,0x76F7,0x76F8,0x76F9,0x76FA,0x76FB,0x76FC,0x76FD,0x76FE,0x76FF,0x7700,0x7701,0x7702,0x7703,0x7704,0x7705,0x7706,0x7707,0x7708,0x7709,0x770A,0x770B,0x770C,0x770D,0x770E,0x770F,0x7710,0x7711,0x7712,0x7713,0x7714,0x7715,0x7716,0x7717,0x7718,0x7719,0x771A,0x771B,0x771C,0x771D,0x771E,0x771F,0x7720,0x7721,0x7722,0x7723,0x7724,0x7725,0x7726,0x7727,0x7728,0x7729,0x772A,0x772B,0x772C,0x772D,0x772E,0x772F,0x7730,0x7731,0x7732,0x7733,0x7734,0x7735,0x7736,0x7737,0x7738,0x7739,0x773A,0x773B,0x773C,0x773D,0x773E,0x773F,0x7740,0x7741,0x7742,0x7743,0x7744,0x7745,0x7746,0x7747,0x7748,0x7749,0x774A,0x774B,0x774C,0x774D,0x774E,0x774F,0x7750,0x7751,0x7752,0x7753,0x7754,0x7755,0x7756,0x7757,0x7758,0x7759,0x775A,0x775B,0x775C,0x775D,0x775E,0x775F,0x7760,0x7761,0x7762,0x7763,0x7764,0x7765,0x7766,0x7767,0x7768,0x7769,0x776A,0x776B,0x776C,0x776D,0x776E,0x776F,0x7770,0x7771,0x7772,0x7773,0x7774,0x7775,0x7776,0x7777,0x7778,0x7779,0x777A,0x777B,0x777C,0x777D,0x777E,0x777F,0x7780,0x7781,0x7782,0x7783,0x7784,0x7785,0x7786,0x7787,0x7788,0x7789,0x778A,0x778B,0x778C,0x778D,0x778E,0x778F,0x7790,0x7791,0x7792,0x7793,0x7794,0x7795,0x7796,0x7797,0x7798,0x7799,0x779A,0x779B,0x779C,0x779D,0x779E,0x779F,0x77A0,0x77A1,0x77A2,0x77A3,0x77A4,0x77A5,0x77A6,0x77A7,0x77A8,0x77A9,0x77AA,0x77AB,0x77AC,0x77AD,0x77AE,0x77AF,0x77B0,0x77B1,0x77B2,0x77B3,0x77B4,0x77B5,0x77B6,0x77B7,0x77B8,0x77B9,0x77BA,0x77BB,0x77BC,0x77BD,0x77BE,0x77BF,0x77C0,0x77C1,0x77C2,0x77C3,0x77C4,0x77C5,0x77C6,0x77C7,0x77C8,0x77C9,0x77CA,0x77CB,0x77CC,0x77CD,0x77CE,0x77CF,0x77D0,0x77D1,0x77D2,0x77D3,0x77D4,0x77D5,0x77D6,0x77D7,0x77D8,0x77D9,0x77DA,0x77DB,0x77DC,0x77DD,0x77DE,0x77DF,0x77E0,0x77E1,0x77E2,0x77E3,0x77E4,0x77E5,0x77E6,0x77E7,0x77E8,0x77E9,0x77EA,0x77EB,0x77EC,0x77ED,0x77EE,0x77EF,0x77F0,0x77F1,0x77F2,0x77F3,0x77F4,0x77F5,0x77F6,0x77F7,0x77F8,0x77F9,0x77FA,0x77FB,0x77FC,0x77FD,0x77FE,0x77FF,0x7800,0x7801,0x7802,0x7803,0x7804,0x7805,0x7806,0x7807,0x7808,0x7809,0x780A,0x780B,0x780C,0x780D,0x780E,0x780F,0x7810,0x7811,0x7812,0x7813,0x7814,0x7815,0x7816,0x7817,0x7818,0x7819,0x781A,0x781B,0x781C,0x781D,0x781E,0x781F,0x7820,0x7821,0x7822,0x7823,0x7824,0x7825,0x7826,0x7827,0x7828,0x7829,0x782A,0x782B,0x782C,0x782D,0x782E,0x782F,0x7830,0x7831,0x7832,0x7833,0x7834,0x7835,0x7836,0x7837,0x7838,0x7839,0x783A,0x783B,0x783C,0x783D,0x783E,0x783F,0x7840,0x7841,0x7842,0x7843,0x7844,0x7845,0x7846,0x7847,0x7848,0x7849,0x784A,0x784B,0x784C,0x784D,0x784E,0x784F,0x7850,0x7851,0x7852,0x7853,0x7854,0x7855,0x7856,0x7857,0x7858,0x7859,0x785A,0x785B,0x785C,0x785D,0x785E,0x785F,0x7860,0x7861,0x7862,0x7863,0x7864,0x7865,0x7866,0x7867,0x7868,0x7869,0x786A,0x786B,0x786C,0x786D,0x786E,0x786F,0x7870,0x7871,0x7872,0x7873,0x7874,0x7875,0x7876,0x7877,0x7878,0x7879,0x787A,0x787B,0x787C,0x787D,0x787E,0x787F,0x7880,0x7881,0x7882,0x7883,0x7884,0x7885,0x7886,0x7887,0x7888,0x7889,0x788A,0x788B,0x788C,0x788D,0x788E,0x788F,0x7890,0x7891,0x7892,0x7893,0x7894,0x7895,0x7896,0x7897,0x7898,0x7899,0x789A,0x789B,0x789C,0x789D,0x789E,0x789F,0x78A0,0x78A1,0x78A2,0x78A3,0x78A4,0x78A5,0x78A6,0x78A7,0x78A8,0x78A9,0x78AA,0x78AB,0x78AC,0x78AD,0x78AE,0x78AF,0x78B0,0x78B1,0x78B2,0x78B3,0x78B4,0x78B5,0x78B6,0x78B7,0x78B8,0x78B9,0x78BA,0x78BB,0x78BC,0x78BD,0x78BE,0x78BF,0x78C0,0x78C1,0x78C2,0x78C3,0x78C4,0x78C5,0x78C6,0x78C7,0x78C8,0x78C9,0x78CA,0x78CB,0x78CC,0x78CD,0x78CE,0x78CF,0x78D0,0x78D1,0x78D2,0x78D3,0x78D4,0x78D5,0x78D6,0x78D7,0x78D8,0x78D9,0x78DA,0x78DB,0x78DC,0x78DD,0x78DE,0x78DF,0x78E0,0x78E1,0x78E2,0x78E3,0x78E4,0x78E5,0x78E6,0x78E7,0x78E8,0x78E9,0x78EA,0x78EB,0x78EC,0x78ED,0x78EE,0x78EF,0x78F0,0x78F1,0x78F2,0x78F3,0x78F4,0x78F5,0x78F6,0x78F7,0x78F8,0x78F9,0x78FA,0x78FB,0x78FC,0x78FD,0x78FE,0x78FF,0x7900,0x7901,0x7902,0x7903,0x7904,0x7905,0x7906,0x7907,0x7908,0x7909,0x790A,0x790B,0x790C,0x790D,0x790E,0x790F,0x7910,0x7911,0x7912,0x7913,0x7914,0x7915,0x7916,0x7917,0x7918,0x7919,0x791A,0x791B,0x791C,0x791D,0x791E,0x791F,0x7920,0x7921,0x7922,0x7923,0x7924,0x7925,0x7926,0x7927,0x7928,0x7929,0x792A,0x792B,0x792C,0x792D,0x792E,0x792F,0x7930,0x7931,0x7932,0x7933,0x7934,0x7935,0x7936,0x7937,0x7938,0x7939,0x793A,0x793B,0x793C,0x793D,0x793E,0x793F,0x7940,0x7941,0x7942,0x7943,0x7944,0x7945,0x7946,0x7947,0x7948,0x7949,0x794A,0x794B,0x794C,0x794D,0x794E,0x794F,0x7950,0x7951,0x7952,0x7953,0x7954,0x7955,0x7956,0x7957,0x7958,0x7959,0x795A,0x795B,0x795C,0x795D,0x795E,0x795F,0x7960,0x7961,0x7962,0x7963,0x7964,0x7965,0x7966,0x7967,0x7968,0x7969,0x796A,0x796B,0x796C,0x796D,0x796E,0x796F,0x7970,0x7971,0x7972,0x7973,0x7974,0x7975,0x7976,0x7977,0x7978,0x7979,0x797A,0x797B,0x797C,0x797D,0x797E,0x797F,0x7980,0x7981,0x7982,0x7983,0x7984,0x7985,0x7986,0x7987,0x7988,0x7989,0x798A,0x798B,0x798C,0x798D,0x798E,0x798F,0x7990,0x7991,0x7992,0x7993,0x7994,0x7995,0x7996,0x7997,0x7998,0x7999,0x799A,0x799B,0x799C,0x799D,0x799E,0x799F,0x79A0,0x79A1,0x79A2,0x79A3,0x79A4,0x79A5,0x79A6,0x79A7,0x79A8,0x79A9,0x79AA,0x79AB,0x79AC,0x79AD,0x79AE,0x79AF,0x79B0,0x79B1,0x79B2,0x79B3,0x79B4,0x79B5,0x79B6,0x79B7,0x79B8,0x79B9,0x79BA,0x79BB,0x79BC,0x79BD,0x79BE,0x79BF,0x79C0,0x79C1,0x79C2,0x79C3,0x79C4,0x79C5,0x79C6,0x79C7,0x79C8,0x79C9,0x79CA,0x79CB,0x79CC,0x79CD,0x79CE,0x79CF,0x79D0,0x79D1,0x79D2,0x79D3,0x79D4,0x79D5,0x79D6,0x79D7,0x79D8,0x79D9,0x79DA,0x79DB,0x79DC,0x79DD,0x79DE,0x79DF,0x79E0,0x79E1,0x79E2,0x79E3,0x79E4,0x79E5,0x79E6,0x79E7,0x79E8,0x79E9,0x79EA,0x79EB,0x79EC,0x79ED,0x79EE,0x79EF,0x79F0,0x79F1,0x79F2,0x79F3,0x79F4,0x79F5,0x79F6,0x79F7,0x79F8,0x79F9,0x79FA,0x79FB,0x79FC,0x79FD,0x79FE,0x79FF,0x7A00,0x7A01,0x7A02,0x7A03,0x7A04,0x7A05,0x7A06,0x7A07,0x7A08,0x7A09,0x7A0A,0x7A0B,0x7A0C,0x7A0D,0x7A0E,0x7A0F,0x7A10,0x7A11,0x7A12,0x7A13,0x7A14,0x7A15,0x7A16,0x7A17,0x7A18,0x7A19,0x7A1A,0x7A1B,0x7A1C,0x7A1D,0x7A1E,0x7A1F,0x7A20,0x7A21,0x7A22,0x7A23,0x7A24,0x7A25,0x7A26,0x7A27,0x7A28,0x7A29,0x7A2A,0x7A2B,0x7A2C,0x7A2D,0x7A2E,0x7A2F,0x7A30,0x7A31,0x7A32,0x7A33,0x7A34,0x7A35,0x7A36,0x7A37,0x7A38,0x7A39,0x7A3A,0x7A3B,0x7A3C,0x7A3D,0x7A3E,0x7A3F,0x7A40,0x7A41,0x7A42,0x7A43,0x7A44,0x7A45,0x7A46,0x7A47,0x7A48,0x7A49,0x7A4A,0x7A4B,0x7A4C,0x7A4D,0x7A4E,0x7A4F,0x7A50,0x7A51,0x7A52,0x7A53,0x7A54,0x7A55,0x7A56,0x7A57,0x7A58,0x7A59,0x7A5A,0x7A5B,0x7A5C,0x7A5D,0x7A5E,0x7A5F,0x7A60,0x7A61,0x7A62,0x7A63,0x7A64,0x7A65,0x7A66,0x7A67,0x7A68,0x7A69,0x7A6A,0x7A6B,0x7A6C,0x7A6D,0x7A6E,0x7A6F,0x7A70,0x7A71,0x7A72,0x7A73,0x7A74,0x7A75,0x7A76,0x7A77,0x7A78,0x7A79,0x7A7A,0x7A7B,0x7A7C,0x7A7D,0x7A7E,0x7A7F,0x7A80,0x7A81,0x7A82,0x7A83,0x7A84,0x7A85,0x7A86,0x7A87,0x7A88,0x7A89,0x7A8A,0x7A8B,0x7A8C,0x7A8D,0x7A8E,0x7A8F,0x7A90,0x7A91,0x7A92,0x7A93,0x7A94,0x7A95,0x7A96,0x7A97,0x7A98,0x7A99,0x7A9A,0x7A9B,0x7A9C,0x7A9D,0x7A9E,0x7A9F,0x7AA0,0x7AA1,0x7AA2,0x7AA3,0x7AA4,0x7AA5,0x7AA6,0x7AA7,0x7AA8,0x7AA9,0x7AAA,0x7AAB,0x7AAC,0x7AAD,0x7AAE,0x7AAF,0x7AB0,0x7AB1,0x7AB2,0x7AB3,0x7AB4,0x7AB5,0x7AB6,0x7AB7,0x7AB8,0x7AB9,0x7ABA,0x7ABB,0x7ABC,0x7ABD,0x7ABE,0x7ABF,0x7AC0,0x7AC1,0x7AC2,0x7AC3,0x7AC4,0x7AC5,0x7AC6,0x7AC7,0x7AC8,0x7AC9,0x7ACA,0x7ACB,0x7ACC,0x7ACD,0x7ACE,0x7ACF,0x7AD0,0x7AD1,0x7AD2,0x7AD3,0x7AD4,0x7AD5,0x7AD6,0x7AD7,0x7AD8,0x7AD9,0x7ADA,0x7ADB,0x7ADC,0x7ADD,0x7ADE,0x7ADF,0x7AE0,0x7AE1,0x7AE2,0x7AE3,0x7AE4,0x7AE5,0x7AE6,0x7AE7,0x7AE8,0x7AE9,0x7AEA,0x7AEB,0x7AEC,0x7AED,0x7AEE,0x7AEF,0x7AF0,0x7AF1,0x7AF2,0x7AF3,0x7AF4,0x7AF5,0x7AF6,0x7AF7,0x7AF8,0x7AF9,0x7AFA,0x7AFB,0x7AFC,0x7AFD,0x7AFE,0x7AFF,0x7B00,0x7B01,0x7B02,0x7B03,0x7B04,0x7B05,0x7B06,0x7B07,0x7B08,0x7B09,0x7B0A,0x7B0B,0x7B0C,0x7B0D,0x7B0E,0x7B0F,0x7B10,0x7B11,0x7B12,0x7B13,0x7B14,0x7B15,0x7B16,0x7B17,0x7B18,0x7B19,0x7B1A,0x7B1B,0x7B1C,0x7B1D,0x7B1E,0x7B1F,0x7B20,0x7B21,0x7B22,0x7B23,0x7B24,0x7B25,0x7B26,0x7B27,0x7B28,0x7B29,0x7B2A,0x7B2B,0x7B2C,0x7B2D,0x7B2E,0x7B2F,0x7B3B,0x7B3F,0x7B40,0x7B41,0x7B42,0x7B43,0x7B44,0x7B45,0x7B46,0x7B47,0x7B48,0x7B49,0x7B4A,0x7B4B,0x7B4C,0x7B4D,0x7B4E,0x7B4F,0x7B57,0x7B58,0x7B59,0x7B5A,0x7B5B,0x7B5C,0x7B5D,0xA001,0xA002,0xA003,0xA004,0xA005,0xA006,0xA007,0xA008,0xA009,0xA00A,0xA00B,0xA00C,0xA00D,0xA00E,0xA00F,0xA010,0xA011,0xA012,0xA013,0xA014,0xA015,0xA016,0xA017,0xA018,0xA019,0xA01A,0xA01B,0xA01C,0xA01D,0xA01E,0xA01F,0xA020,0xA021,0xA022,0xA023,0xA024,0xA025,0xA026,0xA027,0xA028,0xA029,0xA02A,0xA02B,0xA02C,0xA02D,0xA02E,0xA02F,0xA030,0xA031,0xA032,0xA033,0xA034,0xA035,0xA036,0xA037,0xA038,0xA039,0xA03A,0xA03B,0xA03C,0xA03D,0xA03E,0xA03F,0xA040,0xA041,0xA042,0xA043,0xA044,0xA045,0xA046,0xA047,0xA048,0xA049,0xA04A,0xA04B,0xA04C,0xA04D,0xA04E,0xA04F,0xA050,0xA051,0xA052,0xA053,0xA054,0xA055,0xA056,0xA057,0xA058,0xA059,0xA05A,0xA05B,0xA05C,0xA05D,0xA05E,0xA05F,0xA060,0xA061,0xA062,0xA063,0xA064,0xA065,0xA066,0xA067,0xA068,0xA069,0xA06A,0xA06B,0xA06C,0xA06D,0xA06E,0xA06F,0xA070,0xA071,0xA072,0xA073,0xA074,0xA075,0xA076,0xA077,0xA078,0xA079,0xA07A,0xA07B,0xA07C,0xA07D,0xA07E,0xA07F,0xA080,0xA081,0xA082,0xA083,0xA084,0xA085,0xA086,0xA087,0xA088,0xA089,0xA08A,0xA08B,0xA08C,0xA08D,0xA08E,0xA08F,0xA090,0xA091,0xA092,0xA093,0xA094,0xA095,0xA096,0xA097,0xA098,0xA099,0xA09A,0xA09B,0xA09C,0xA09D,0xA09E,0xA09F,0xA0A0,0xA0A1,0xA0A2,0xA0A3,0xA0A4,0xA0A5,0xA0A6,0xA0A7,0xA0A8,0xA0A9,0xA0AA,0xA0AB,0xA0AC,0xA0AD,0xA0AE,0xA0AF,0xA0B0,0xA0B1,0xA0B2,0xA0B3,0xA0B4,0xA0B5,0xA0B6,0xA0B7,0xA0B8,0xA0B9,0xA0BA,0xA0BB,0xA0BC,0xA0BD,0xA0BE,0xA0BF,0xA0C0,0xA0C1,0xA0C2,0xA0C3,0xA0C4,0xA0C5,0xA0C6,0xA0C7,0xA0C8,0xA0C9,0xA0CA,0xA0CB,0xA0CC,0xA0CD,0xA0CE,0xA0CF,0xA0D0,0xA0D1,0xA0D2,0xA0D3,0xA0D4,0xA0D5,0xA0D6,0xA0D7,0xA0D8,0xA0D9,0xA0DA,0xA0DB,0xA0DC,0xA0DD,0xA0DE,0xA0DF,0xA0E0,0xA0E1,0xA0E2,0xA0E3,0xA0E4,0xA0E5,0xA0E6,0xA0E7,0xA0E8,0xA0E9,0xA0EA,0xA0EB,0xA0EC,0xA0ED,0xA0EE,0xA0EF,0xA0F0,0xA0F1,0xA0F2,0xA0F3,0xA0F4,0xA0F5,0xA0F6,0xA0F7,0xA0F8,0xA0F9,0xA0FA,0xA0FB,0xA0FC,0xA0FD,0xA0FE,0xA0FF,0xA111,0xA112,0xA113,0xA114,0xA115,0xA116,0xA117,0xA118,0xA119,0xA11A,0xA11B,0xA11C,0xA11D,0xA11E,0xA11F,0xA123,0xA124,0xA125,0xA126,0xA127,0xA128,0xA129,0xA12A,0xA12B,0xA12C,0xA12D,0xA12E,0xA12F,0xA130,0xA131,0xA132,0xA133,0xA134,0xA135,0xA136,0xA137,0xA138,0xA139,0xA13A,0xA13B,0xA13C,0xA13D,0xA13E,0xA13F,0xA140,0xA141,0xA142,0xA143,0xA144,0xA145,0xA146,0xA147,0xA148,0xA149,0xA14A,0xA14B,0xA14C,0xA14D,0xA14E,0xA14F,0xA153,0xA154,0xA155,0xA156,0xA157,0xA158,0xA159,0xA15A,0xA15B,0xA15C,0xA15D,0xA15E,0xA15F,0xA160,0xA161,0xA162,0xA163,0xA164,0xA165,0xA166,0xA167,0xA168,0xA169,0xA16A,0xA16B,0xA16C,0xA16D,0xA16E,0xA16F,0xA170,0xA171,0xA172,0xA173,0xA174,0xA175,0xA176,0xA177,0xA178,0xA179,0xA17A,0xA17B,0xA17C,0xA17D,0xA17E,0xA17F,0xA180,0xA181,0xA182,0xA183,0xA184,0xA185,0xA186,0xA187,0xA188,0xA189,0xA18A,0xA18B,0xA18C,0xA18D,0xA18E,0xA18F,0xA190,0xA191,0xA192,0xA193,0xA194,0xA195,0xA196,0xA197,0xA198,0xA199,0xA19A,0xA19B,0xA19C,0xA19D,0xA19E,0xA19F,0xA1A0,0xA1A1,0xA1A2,0xA1A3,0xA1A4,0xA1A5,0xA1A6,0xA1A7,0xA1A8,0xA1A9,0xA1AA,0xA1AB,0xA1AC,0xA1AD,0xA1AE,0xA1AF,0xA1B0,0xA1B1,0xA1B2,0xA1B3,0xA1B4,0xA1B5,0xA1B6,0xA1B7,0xA1B8,0xA1B9,0xA1BA,0xA1BB,0xA1BC,0xA1BD,0xA1BE,0xA1BF,0xA1C0,0xA1C1,0xA1C2,0xA1C3,0xA1C4,0xA1C5,0xA1C6,0xA1C7,0xA1C8,0xA1C9,0xA1CA,0xA1CB,0xA1CC,0xA1CD,0xA1CE,0xA1CF,0xA1D0,0xA1D1,0xA1D2,0xA1D3,0xA1D4,0xA1D5,0xA1D6,0xA1D7,0xA1D8,0xA1D9,0xA1DA,0xA1DB,0xA1DC,0xA1DD,0xA1DE,0xA1DF,0xA1E0,0xA1E1,0xA1E2,0xA1E3,0xA1E4,0xA1E5,0xA1E6,0xA1E7,0xA1E8,0xA1E9,0xA1EA,0xA1EB,0xA1EC,0xA1ED,0xA1EE,0xA1EF,0xA1F0,0xA1F1,0xA1F2,0xA1F3,0xA1F4,0xA1F5,0xA1F6,0xA1F7,0xA1F8,0xA1F9,0xA1FA,0xA1FB,0xA1FC,0xA1FD,0xA1FE,0xA1FF,0xA200,0xA201,0xA202,0xA203,0xA204,0xA205,0xA206,0xA207,0xA208,0xA20A,0xA20B,0xA20C,0xA20D,0xA20E,0xA20F,0xA210,0xA211,0xA212,0xA213,0xA214,0xA215,0xA216,0xA217,0xA218,0xA219,0xA21A,0xA21B,0xA21C,0xA21D,0xA21E,0xA21F,0xA220,0xA221,0xA222,0xA223,0xA224,0xA225,0xA226,0xA227,0xA228,0xA229,0xA22A,0xA22B,0xA22C,0xA22D,0xA22E,0xA22F,0xA230,0xA231,0xA232,0xA233,0xA234,0xA235,0xA236,0xA237,0xA238,0xA239,0xA23A,0xA23B,0xA23C,0xA23D,0xA23E,0xA23F,0xA240,0xA241,0xA242,0xA243,0xA244,0xA245,0xA246,0xA247,0xA248,0xA249,0xA24A,0xA24B,0xA24C,0xA24D,0xA24E,0xA24F,0xA250,0xA251,0xA252,0xA253,0xA254,0xA255,0xA256,0xA257,0xA258,0xA259,0xA25A,0xA25B,0xA25C,0xA25D,0xA25E,0xA25F,0xA260,0xA261,0xA262,0xA263,0xA264,0xA265,0xA266,0xA267,0xA268,0xA269,0xA26A,0xA26B,0xA26C,0xA26D,0xA26E,0xA26F,0xA270,0xA271,0xA272,0xA273,0xA274,0xA275,0xA276,0xA277,0xA278,0xA279,0xA27A,0xA27B,0xA27C,0xA27D,0xA27E,0xA27F,0xA280,0xA281,0xA282,0xA283,0xA284,0xA285,0xA286,0xA287,0xA288,0xA289,0xA28A,0xA28B,0xA28C,0xA28D,0xA28E,0xA28F,0xA290,0xA291,0xA292,0xA293,0xA294,0xA295,0xA296,0xA297,0xA298,0xA299,0xA29A,0xA29B,0xA29C,0xA29D,0xA29E,0xA29F,0xA2A0,0xA2A1,0xA2A2,0xA2A3,0xA2A4,0xA2A5,0xA2A6,0xA2A7,0xA2A8,0xA2A9,0xA2AA,0xA2AB,0xA2AC,0xA2AD,0xA2AE,0xA2AF,0xA2B0,0xA2B1,0xA2B2,0xA2B3,0xA2B4,0xA2B5,0xA2B6,0xA2B7,0xA2B8,0xA2B9,0xA2BA,0xA2BB,0xA2BC,0xA2BD,0xA2BE,0xA2BF,0xA2C0,0xA2C1,0xA2C2,0xA2C3,0xA2C4,0xA2C5,0xA2C6,0xA2C7,0xA2C8,0xA2C9,0xA2CA,0xA2CB,0xA2CC,0xA2CD,0xA2CE,0xA2CF,0xA2D0,0xA2D1,0xA2D2,0xA2D3,0xA2D4,0xA2D5,0xA2D6,0xA2D7,0xA2D8,0xA2D9,0xA2DA,0xA2DB,0xA2DC,0xA2DD,0xA2DE,0xA2DF,0xA2E0,0xA2E1,0xA2E2,0xA2E3,0xA2E4,0xA2E5,0xA2E6,0xA2E7,0xA2E8,0xA2E9,0xA2EA,0xA2EB,0xA2EC,0xA2ED,0xA2EE,0xA2EF,0xA2F0,0xA2F1,0xA2F2,0xA2F3,0xA2F4,0xA2F5,0xA2F6,0xA2F7,0xA2F8,0xA2F9,0xA2FA,0xA2FB,0xA2FC,0xA2FD,0xA2FE,0xA2FF,0xA300,0xA316,0xA317,0xA318,0xA319,0xA31A,0xA31B,0xA31C,0xA31D,0xA31E,0xA31F,0xA320,0xA321,0xA322,0xA323,0xA324,0xA325,0xA326,0xA327,0xA328,0xA329,0xA32A,0xA32B,0xA32C,0xA32D,0xA32E,0xA32F,0xA330,0xA331,0xA332,0xA333,0xA334,0xA335,0xA336,0xA337,0xA338,0xA339,0xA33A,0xA33B,0xA33C,0xA33D,0xA33E,0xA33F,0xA340,0xA341,0xA342,0xA343,0xA344,0xA345,0xA346,0xA347,0xA348,0xA349,0xA34A,0xA34B,0xA34C,0xA34D,0xA34E,0xA34F,0xA350,0xA351,0xA352,0xA353,0xA354,0xA355,0xA356,0xA357,0xA358,0xA359,0xA35A,0xA35B,0xA35C,0xA35D,0xA35E,0xA35F,0xA360,0xA361,0xA362,0xA363,0xA364,0xA365,0xA366,0xA367,0xA368,0xA369,0xA36A,0xA36B,0xA36C,0xA36D,0xA36E,0xA36F,0xA370,0xA371,0xA372,0xA373,0xA374,0xA375,0xA376,0xA377,0xA378,0xA379,0xA37A,0xA37B,0xA37C,0xA37D,0xA37E,0xA37F,0xA380,0xA381,0xA382,0xA383,0xA384,0xA385,0xA386,0xA387,0xA388,0xA389,0xA38A,0xA38B,0xA38C,0xA38D,0xA38E,0xA38F,0xA390,0xA391,0xB000,0xB003,0xB004,0xB005,0xB006,0xB007,0xB008,0xB009,0xB00A,0xB00B,0xB00C,0xB00D,0xB00E,0xB00F,0xB02A,0xB02B,0xB02C,0xB02D,0xB02E,0xB02F,0xB034,0xB035,0xB036,0xB037,0xB038,0xB039,0xB03A,0xB03B,0xB03C,0xB03D,0xB03E,0xB03F,0xB040,0xB041,0xB042,0xB043,0xB044,0xB045,0xB046,0xB047,0xB048,0xB049,0xB04A,0xB04B,0xB04C,0xB04D,0xB04E,0xB04F,0xB050,0xB051,0xB052,0xB053,0xB054,0xB055,0xB056,0xB057,0xB058,0xB059,0xB05A,0xB05B,0xB05C,0xB05D,0xB05E,0xB05F,0xB069,0xB06A,0xB06B,0xB06C,0xB06D,0xB06E,0xB06F,0xB070,0xB071,0xB072,0xB073,0xB074,0xB075,0xB076,0xB077,0xB078,0xB079,0xB07A,0xB07B,0xB07C,0xB07D,0xB07E,0xB07F,0xB080,0xB08C,0xB08D,0xB08E,0xB08F,0xB090,0xB09A,0xB09B,0xB09C,0xB09D,0xB09E,0xB09F,0xB0A6,0xB0A7,0xB0A8,0xB0A9,0xB0AA,0xB0AB,0xB0AC,0xB0AD,0xB0AE,0xB0AF,0xB0B6,0xB0B7,0xB0B8,0xB0B9,0xB0BA,0xB0BB,0xB0BC,0xB0BD,0xB0BE,0xB0BF,0xB0CB,0xB0CD,0xB0CE,0xB0D0,0xB0D1,0xB0D2,0xB0D3,0xB0D4,0xB0D5,0xB0D6,0xB0D7,0xB0D8,0xB0D9,0xB0DA,0xB0DB,0xB0DC,0xB0DD,0xB0DE,0xB0DF,0xB0E7,0xB0E8,0xB0E9,0xB0F0,0xB0F1,0xB0F6,0xB0F7,0xB0F8,0xB0F9,0xB0FA,0xB0FB,0xB0FC,0xB0FD,0xB0FE,0xB0FF,0xB100,0xB101,0xB102,0xB103,0xB104,0xB105,0xB106,0xB107,0xB108,0xB109,0xB10A,0xB10B,0xB10C,0xB10D,0xB10E,0xB10F,0xB118,0xB136,0xB137,0xB138,0xB13A,0xB13E,0xB148,0xB150,0xB151,0xB152,0xB153,0xB154,0xB155,0xB156,0xB157,0xB158,0xB159,0xB15A,0xB15B,0xB15C,0xB15D,0xB15E,0xB15F,0xB17B,0xB182,0xB184,0xB18F,0xB190,0xB191,0xB199,0xB19A,0xB19F,0xB1A8,0xB1A9,0xB1AA,0xB1AB,0xB1AC,0xB1AD,0xB1AE,0xB1AF,0xB1B3,0xB1B4,0xB1B6,0xB1C0,0xB1C5,0xB1C6,0xB1C7,0xB1C8,0xB1C9,0xB1CA,0xB1CB,0xB1CC,0xB1CD,0xB1CE,0xB1CF,0xB1D0,0xB1D1,0xB1D2,0xB1D3,0xB1D4,0xB1D5,0xB1D6,0xB1D7,0xB1D8,0xB1D9,0xB1DA,0xB1DB,0xB1DC,0xB1DD,0xB1DE,0xB1DF,0xB1E0,0xB1E1,0xB1E2,0xB1E3,0xB1E4,0xB1E5,0xB1E6,0xB1E7,0xB1E8,0xB1E9,0xB1EA,0xB1EB,0xB1EC,0xB1ED,0xB1EE,0xB1EF,0xB1F0,0xB1F1,0xB1F2,0xB1F3,0xB1F4,0xB1F5,0xB1F6,0xB1F7,0xB1F8,0xB1F9,0xB1FA,0xB1FB,0xB1FC,0xB1FD,0xB1FE,0xB1FF,0xB200,0xB201,0xB202,0xB203,0xB204,0xB205,0xB206,0xB207,0xB208,0xD02A,0xD02B,0xD02C,0xD02E,0xD035,0xD036,0xD037,0xD038,0xD039,0xD03A,0xD03B,0xD03C,0xD03D,0xD03E,0xD03F,0xD049,0xD04A,0xD04B,0xD04C,0xD04D,0xD04E,0xD04F,0xD051,0xD05C,0xD05D,0xD05E,0xD065,0xD06F,0xD070,0xD071,0xD072,0xD073,0xD074,0xD075,0xD076,0xD077,0xD078,0xD079,0xD07A,0xD07B,0xD07C,0xD07D,0xD07E,0xD07F,0xD097,0xD098,0xD099,0xD09A,0xD09B,0xD09C,0xD09D,0xD09E,0xD09F,0xD0A0,0xD0A1,0xD0A2,0xD0A3,0xD0A4,0xD0A5,0xD0A6,0xD0A7,0xD0A8,0xD0A9,0xD0AA,0xD0AB,0xD0AC,0xD0AD,0xD0AE,0xD0AF,0xD0BD,0xD0BE,0xD0BF,0xD0C0,0xD0C1,0xD0C2,0xD0C3,0xD0C4,0xD0C5,0xD0C6,0xD0C7,0xD0C8,0xD0C9,0xD0CA,0xD0CB,0xD0CC,0xD0CD,0xD0CE,0xD0CF,0xD0D0,0xD0D1,0xD0D2,0xD0D3,0xD0D4,0xD0D5,0xD0D6,0xD0D7,0xD0D8,0xD0D9,0xD0DA,0xD0DB,0xD0DC,0xD0DD,0xD0DE,0xD0DF,0xD0E7,0xD0E8,0xD0E9,0xD0EA,0xD0EB,0xD0EC,0xD0ED,0xD0EE,0xD0EF,0xD0F0,0xD0F1,0xD0F2,0xD0F3,0xD0F4,0xD0F5,0xD0F6,0xD0F7,0xD0F8,0xD0F9,0xD0FA,0xD0FB,0xD0FC,0xD0FD,0xD0FE,0xD0FF,0xD129,0xD138,0xD139,0xD13A,0xD13B,0xD13C,0xD13D,0xD13E,0xD13F,0xD140,0xD141,0xD142,0xD143,0xD144,0xD145,0xD146,0xD147,0xD148,0xD149,0xD14A,0xD14B,0xD14C,0xD14D,0xD14E,0xD14F,0xD150,0xD151,0xD152,0xD153,0xD154,0xD155,0xD156,0xD157,0xD158,0xD159,0xD15A,0xD15B,0xD15C,0xD15D,0xD15E,0xD15F,0xD160,0xD161,0xD162,0xD163,0xD164,0xD165,0xD166,0xD167,0xD168,0xD169,0xD16A,0xD16B,0xD16C,0xD16D,0xD16E,0xD16F,0xD170,0xD171,0xD172,0xD173,0xD174,0xD175,0xD176,0xD177,0xD178,0xD179,0xD17A,0xD17B,0xD17C,0xD17D,0xD17E,0xD17F,0xD180,0xD181,0xD182,0xD183,0xD184,0xD185,0xD186,0xD187,0xD188,0xD189,0xD18A,0xD18B,0xD18C,0xD18D,0xD18E,0xD18F,0xD190,0xD191,0xD192,0xD193,0xD194,0xD195,0xD196,0xD197,0xD198,0xD199,0xD19A,0xD19B,0xD19C,0xD19D,0xD19E,0xD19F,0xD1A0,0xD1A1,0xD1A2,0xD1A3,0xD1A4,0xD1A5,0xD1A6,0xD1A7,0xD1A8,0xD1A9,0xD1AA,0xD1AB,0xD1AC,0xD1AD,0xD1AE,0xD1AF,0xD1B0,0xD1B1,0xD1B2,0xD1B3,0xD1B4,0xD1B5,0xD1B6,0xD1B7,0xD1B8,0xD1B9,0xD1BA,0xD1BB,0xD1BC,0xD1BD,0xD1BE,0xD1BF,0xD1C0,0xD1C1,0xD1C2,0xD1C3,0xD1C4,0xD1C5,0xD1C6,0xD1C7,0xD1C8,0xD1C9,0xD1CA,0xD1CB,0xD1CC,0xD1CD,0xD1CE,0xD1CF,0xD1D0,0xD1D1,0xD1D2,0xD1D3,0xD1D4,0xD1D5,0xD1D6,0xD1D7,0xD1D8,0xD1D9,0xD1DA,0xD1DB,0xD1DC,0xD1DD,0xD1DE,0xD1DF,0xD1E0,0xD1E1,0xD1E2,0xD1E3,0xD1E4,0xD1E5,0xD1E6,0xD1E7,0xD1E8,0xD1E9,0xD1EA,0xD1EB,0xD1EC,0xD1ED,0xD1EE,0xD1EF,0xD1F0,0xD1F1,0xD1F2,0xD1F3,0xD1F4,0xD1F5,0xD1F6,0xD1F7,0xD1F8,0xD1F9,0xD1FA,0xD1FB,0xD1FC,0xD1FD,0xD1FE,0xD1FF,0xD200,0xD201,0xD202,0xD203,0xD204,0xD205,0xD206</LogCodes></ISVConfig></MessagesView><TargetCOMPort>Disconnect</TargetCOMPort><Replay><Auto-Skip>0</Auto-Skip><PlaybackSpeed>1</PlaybackSpeed><Compact>0</Compact></Replay><FixedFontFace/><ScriptPath/><SourceFilesPath/><LoggingView><Appearance><ShowDate>0</ShowDate><ShowMilliseconds>1</ShowMilliseconds><TypeSpecificTime>1</TypeSpecificTime><UseLegacyFormat>0</UseLegacyFormat><IncludeHeader>0</IncludeHeader><Order>0,1,2,3,4</Order><Columns>0/80,1/80,2/240,3/120,4/400,5/400</Columns></Appearance><ISVConfig><Items>4,5,6</Items><EventIDs>00000,00256,00257,00258,00259,00260,00261,00262,00263,00264,00265,00266,00267,00268,00269,00270,00271,00272,00273,00274,00275,00276,00277,00278,00279,00280,00281,00282,00283,00284,00285,00286,00287,00288,00289,00290,00291,00292,00293,00294,00295,00296,00297,00298,00299,00300,00301,00302,00303,00304,00305,00306,00307,00308,00309,00310,00311,00312,00313,00314,00315,00316,00317,00318,00319,00320,00321,00322,00323,00324,00325,00326,00327,00328,00329,00330,00331,00332,00333,00334,00335,00336,00337,00338,00339,00340,00341,00342,00343,00344,00345,00346,00347,00348,00349,00350,00351,00352,00353,00354,00355,00356,00357,00358,00359,00360,00361,00362,00363,00364,00365,00366,00367,00368,00369,00370,00371,00372,00373,00374,00375,00376,00377,00378,00379,00380,00381,00382,00383,00384,00385,00386,00387,00388,00389,00390,00391,00392,00393,00394,00395,00396,00397,00398,00399,00400,00401,00402,00403,00404,00405,00406,00407,00408,00409,00410,00411,00412,00413,00414,00415,00416,00417,00418,00419,00420,00421,00422,00423,00424,00425,00426,00427,00428,00429,00430,00431,00432,00433,00434,00435,00436,00437,00438,00439,00440,00441,00442,00443,00444,00445,00446,00447,00448,00449,00450,00451,00452,00453,00454,00455,00456,00457,00458,00459,00460,00461,00462,00463,00464,00465,00466,00467,00468,00469,00470,00471,00472,00473,00474,00475,00476,00477,00478,00479,00480,00481,00482,00483,00484,00485,00486,00487,00488,00489,00490,00491,00492,00493,00494,00495,00496,00497,00498,00499,00500,00501,00502,00503,00504,00505,00506,00507,00508,00509,00510,00511,00512,00513,00514,00515,00516,00517,00518,00519,00520,00521,00522,00523,00524,00525,00526,00527,00528,00529,00530,00531,00532,00533,00534,00535,00536,00537,00538,00539,00540,00541,00542,00543,00544,00545,00546,00547,00548,00549,00550,00551,00552,00553,00554,00555,00556,00557,00558,00559,00560,00561,00562,00563,00564,00565,00566,00567,00568,00569,00570,00571,00572,00573,00574,00575,00576,00577,00578,00579,00580,00581,00582,00583,00584,00585,00586,00587,00588,00589,00590,00591,00592,00593,00594,00595,00596,00597,00598,00599,00600,00601,00602,00603,00604,00605,00606,00607,00608,00609,00610,00611,00612,00613,00614,00615,00616,00617,00618,00619,00620,00621,00622,00623,00624,00625,00626,00627,00628,00629,00630,00631,00632,00633,00634,00635,00636,00637,00638,00639,00640,00641,00642,00643,00644,00645,00646,00647,00648,00649,00650,00651,00652,00653,00654,00655,00656,00657,00658,00659,00660,00661,00662,00663,00664,00665,00666,00667,00668,00669,00670,00671,00672,00673,00674,00675,00676,00677,00678,00679,00680,00681,00682,00683,00684,00685,00686,00687,00688,00689,00690,00691,00692,00693,00694,00695,00696,00697,00698,00699,00700,00701,00702,00703,00704,00705,00706,00707,00708,00709,00710,00711,00712,00713,00714,00715,00716,00717,00718,00719,00720,00721,00722,00723,00724,00725,00726,00727,00728,00729,00730,00731,00732,00733,00734,00735,00736,00737,00738,00739,00740,00741,00742,00743,00744,00745,00746,00747,00748,00749,00750,00751,00752,00753,00754,00755,00756,00757,00758,00759,00760,00761,00762,00763,00764,00765,00766,00767,00768,00769,00770,00771,00772,00773,00774,00775,00776,00777,00778,00779,00780,00781,00782,00783,00784,00785,00786,00787,00788,00789,00790,00791,00792,00793,00794,00795,00796,00797,00798,00799,00800,00801,00802,00803,00804,00805,00806,00807,00808,00809,00810,00811,00812,00813,00814,00815,00816,00817,00818,00819,00820,00821,00822,00823,00824,00825,00826,00827,00828,00829,00830,00831,00832,00833,00834,00835,00836,00837,00838,00839,00840,00841,00842,00843,00844,00845,00846,00847,00848,00849,00850,00851,00852,00853,00854,00855,00856,00857,00858,00859,00860,00861,00862,00863,00864,00865,00866,00867,00868,00869,00870,00871,00872,00873,00874,00875,00876,00877,00878,00879,00880,00881,00882,00883,00884,00885,00886,00887,00888,00889,00890,00891,00892,00893,00894,00895,00896,00897,00898,00899,00900,00901,00902,00903,00904,00905,00906,00907,00908,00909,00910,00911,00912,00913,00914,00915,00916,00917,00918,00919,00920,00921,00922,00923,00924,00925,00926,00927,00928,00929,00930,00931,00932,00933,00934,00935,00936,00937,00938,00939,00940,00941,00942,00943,00944,00945,00946,00947,00948,00949,00950,00951,00952,00953,00954,00955,00956,00957,00958,00959,00960,00961,00962,00963,00964,00965,00966,00967,00968,00969,00970,00971,00972,00973,00974,00975,00976,00977,00978,00979,00980,00981,00982,00983,00984,00985,00986,00987,00988,00989,00990,00991,00992,00993,00994,00995,00996,00997,00998,00999,01000,01001,01002,01003,01004,01005,01006,01007,01008,01009,01010,01011,01012,01013,01014,01015,01016,01017,01018,01019,01020,01021,01022,01023,01024,01025,01026,01027,01028,01029,01030,01031,01032,01033,01034,01035,01036,01037,01038,01039,01040,01041,01042,01043,01044,01045,01046,01047,01048,01049,01050,01051,01052,01053,01054,01055,01056,01057,01058,01059,01060,01061,01062,01063,01064,01065,01066,01067,01068,01069,01071,01072,01073,01074,01075,01076,01077,01078,01079,01080,01081,01082,01083,01084,01085,01086,01087,01088,01089,01090,01091,01092,01093,01094,01095,01096,01097,01098,01099,01100,01101,01102,01103,01104,01105,01106,01107,01108,01109,01110,01111,01112,01113,01114,01115,01116,01117,01118,01119,01120,01121,01122,01123,01124,01125,01126,01127,01128,01129,01130,01131,01132,01133,01134,01135,01136,01137,01138,01139,01140,01141,01142,01143,01144,01145,01146,01147,01148,01149,01150,01156,01157,01158,01159,01160,01161,01162,01163,01164,01165,01166,01167,01168,01169,01170,01171,01172,01173,01174,01175,01176,01177,01178,01179,01180,01181,01182,01183,01184,01185,01186,01187,01188,01189,01190,01191,01192,01193,01194,01195,01196,01197,01198,01199,01200,01201,01202,01203,01204,01205,01206,01207,01208,01209,01210,01211,01212,01213,01214,01215,01216,01217,01218,01219,01220,01221,01222,01223,01224,01225,01226,01227,01228,01229,01230,01231,01232,01233,01234,01235,01236,01237,01238,01239,01240,01241,01242,01243,01244,01245,01246,01247,01248,01249,01250,01251,01252,01253,01254,01255,01256,01257,01258,01259,01260,01261,01262,01263,01264,01265,01266,01267,01268,01269,01270,01271,01272,01273,01274,01275,01276,01277,01278,01279,01280,01281,01282,01283,01284,01285,01286,01287,01288,01289,01290,01291,01292,01293,01294,01295,01296,01297,01298,01299,01300,01301,01302,01303,01304,01305,01306,01307,01308,01309,01310,01311,01312,01313,01314,01315,01316,01317,01318,01319,01320,01321,01322,01323,01324,01325,01326,01327,01328,01329,01330,01331,01332,01333,01334,01335,01336,01337,01338,01339,01340,01341,01342,01343,01344,01345,01346,01347,01348,01349,01350,01351,01352,01353,01354,01355,01356,01357,01358,01359,01375,01376,01377,01378,01379,01380,01381,01382,01383,01384,01385,01386,01387,01388,01389,01390,01391,01392,01393,01394,01395,01396,01397,01398,01402,01403,01404,01405,01406,01407,01408,01409,01410,01411,01412,01413,01414,01415,01416,01417,01418,01419,01420,01421,01422,01423,01424,01425,01426,01427,01428,01429,01430,01431,01432,01433,01434,01435,01436,01437,01438,01439,01440,01441,01442,01443,01444,01445,01446,01447,01448,01449,01450,01451,01452,01453,01454,01455,01456,01457,01458,01459,01460,01461,01462,01463,01464,01465,01466,01467,01468,01469,01470,01471,01472,01473,01474,01475,01476,01477,01478,01479,01480,01481,01482,01483,01484,01485,01486,01487,01488,01489,01490,01491,01492,01493,01494,01495,01496,01497,01498,01499,01500,01501,01502,01503,01504,01505,01506,01507,01508,01509,01510,01511,01512,01513,01514,01515,01516,01517,01518,01519,01520,01521,01522,01523,01524,01525,01526,01527,01528,01529,01530,01531,01532,01533,01534,01535,01536,01537,01538,01539,01540,01541,01542,01543,01544,01545,01546,01547,01548,01549,01550,01551,01552,01553,01554,01555,01556,01557,01558,01559,01560,01561,01562,01563,01564,01565,01566,01567,01568,01569,01570,01571,01572,01573,01574,01575,01576,01577,01578,01579,01580,01581,01582,01583,01584,01585,01586,01587,01588,01589,01590,01591,01592,01593,01594,01595,01596,01597,01598,01599,01600,01601,01602,01603,01604,01605,01606,01607,01608,01609,01610,01611,01612,01613,01614,01615,01616,01617,01618,01619,01620,01621,01622,01623,01624,01625,01626,01627,01628,01629,01630,01631,01632,01633,01634,01635,01636,01637,01638,01639,01640,01641,01642,01643,01644,01645,01646,01647,01648,01649,01650,01651,01652,01653,01654,01655,01656,01657,01658,01659,01660,01661,01662,01663,01664,01665,01666,01667,01668,01669,01670,01671,01672,01673,01674,01675,01676,01677,01678,01679,01680,01681,01682,01683,01684,01685,01686,01687,01688,01689,01690,01691,01692,01693,01694,01695,01696,01697,01698,01699,01700,01701,01702,01703,01704,01705,01706,01707,01708,01709,01710,01711,01712,01713,01714,01715,01716,01717,01718,01719,01720,01721,01722,01723,01724,01725,01726,01727,01728,01729,01730,01731,01732,01733,01734,01735,01736,01737,01738,01739,01740,01741,01742,01743,01744,01745,01746,01747,01748,01749,01750,01751,01752,01753,01754,01755,01756,01757,01758,01759,01760,01761,01762,01763,01764,01765,01766,01767,01768,01769,01770,01771,01772,01773,01774,01775,01776,01777,01778,01779,01780,01781,01782,01783,01784,01785,01786,01787,01788,01789,01790,01791,01792,01793,01794,01795,01796,01797,01798,01799,01800,01801,01802,01803,01804,01805,01806,01807,01808,01809,01810,01811,01812,01813,01814,01815,01816,01817,01818,01819,01820,01821,01822,01823,01824,01825,01826,01827,01828,01829,01830,01831,01832,01833,01834,01835,01836,01837,01838,01839,01840,01841,01842,01843,01844,01845,01846,01847,01848,01849,01850,01851,01852,01853,01854,01855,01856,01857,01858,01859,01860,01861,01862,01863,01864,01865,01866,01867,01868,01869,01870,01871,01872,01873,01874,01875,01876,01877,01878,01879,01880,01881,01882,01883,01884,01885,01886,01887,01888,01889,01890,01891,01892,01893,01894,01895,01896,01897,01898,01899,01900,01901,01902,01903,01904,01905,01906,01907,01908,01909,01910,01911,01912,01913,01914,01915,01916,01917,01918,01919,01920,01921,01922,01923,01924,01925,01926,01927,01928,01929,01930,01931,01932,01933,01934,01935,01936,01937,01938,01939,01940,01941,01942,01943,01944,01945,01946,01947,01948,01949,01950,01951,01952,01953,01954,01955,01956,01957,01958,01959,01960,01961,01962,01963,01964,01965,01966,01967,01968,01969,01970,01971,01972,01973,01974,01975,01976,01977,01978,01979,01980,01981,01982,01983,01984,01985,01986,01987,01988,01989,01990,01991,01992,01993,01994,01995,01996,01997,01998,01999,02000,02001,02002,02003,02004,02005,02006,02007,02008,02009,02010,02011,02012,02013,02014,02016,02017,02018,02019,02020,02021,02022,02023,02024,02025,02026,02027,02028,02029,02030,02031,02032,02033,02034,02040,02041,02042,02043,02044,02045,02046,02047,02049,02050,02051,02052,02053,02054,02055,02056,02057,02058,02059,02060,02061,02062,02063,02064,02065,02066,02067,02068,02069,02070,02071,02072,02073,02074,02075,02076,02077,02078,02079,02080,02081,02082,02083,02084,02085,02086,02087,02088,02089,02090,02091,02092,02093,02094,02095,02096,02097,02098,02099,02100,02101,02102,02103,02104,02105,02106,02107,02108,02109,02110,02111,02112,02113,02114,02115,02116,02117,02118,02119,02120,02121,02122,02123,02124,02125,02126,02127,02128,02129,02130,02131,02132,02133,02134,02135,02136,02137,02138,02139,02140,02141,02142,02143,02144,02145,02146,02147,02148,02149,02150,02151,02152,02153,02154,02155,02156,02157,02158,02159,02160,02161,02162,02163,02164,02165,02166,02167,02168,02169,02170,02171,02172,02173,02174,02175,02176,02177,02178,02179,02180,02181,02182,02183,02184,02185,02186,02187,02188,02189,02190,02191,02192,02193,02194,02195,02196,02197,02198,02199,02200,02201,02202,02203,02204,02205,02206,02207,02208,02209,02210,02211,02222,02223,02224,02225,02226,02227,02228,02229,02230,02231,02232,02233,02234,02235,02236,02237,02238,02239,02240,02241,02242,02243,02244,02245,02246,02247,02248,02249,02250,02251,02252,02253,02254,02255,02256,02257,02258,02259,02460,02461,02462,02463,02464,02465,02466,02467,02468,02469,02470,02471,02472,02473,02474,02475,02476,02477,02478,02479,02480,02481,02482,02483,02484,02485,02486,02487,02488,02489,02490,02491,02492,02493,02494,02495,02496,02497,02498,02499,02500,02501,02502,02503,02504,02505,02506,02507,02508,02509,02510,02511,02512,02513,02514,02515,02516,02517,02518,02519,02520,02521,02522,02523,02524,02525,02526,02527,02528,02529,02530,02531,02532,02533,02534,02535,02536,02537,02538,02539,02540,02541,02542,02543,02544</EventIDs><AcceptUnknowns>1</AcceptUnknowns><DelayedSubsysOnly>0</DelayedSubsysOnly><RestartOnDisconnect>0</RestartOnDisconnect><FragmentSize>4294967295</FragmentSize><LogFilePath>C:\Program Files (x86)\Qualcomm\QXDM\Bin\</LogFilePath><LogCodes>0x103E,0x103F,0x1040,0x1041,0x1042,0x1043,0x1044,0x1045,0x1046,0x104A,0x104B,0x104E,0x104F,0x1050,0x1051,0x1054,0x1055,0x1357,0x1358,0x1365,0x1366,0x1367,0x1368,0x1369,0x1485,0x1558</LogCodes><MessageLevels>00004/01,00004/02,00004/03,00004/04,00035/02,00035/03,00035/04,00054/01,00054/02,00054/03,00054/04,04500/01,04500/02,04500/03,04500/04,04501/01,04501/02,04501/03,04501/04,04502/01,04502/02,04502/03,04502/04,04503/01,04503/02,04503/03,04503/04,04504/01,04504/02,04504/03,04504/04,04505/01,04505/02,04505/03,04505/04,04506/01,04506/02,04506/03,04506/04,04507/01,04507/02,04507/03,04507/04,04508/01,04508/02,04508/03,04508/04,04509/01,04509/02,04509/03,04509/04,04510/01,04510/02,04510/03,04510/04,04511/01,04511/02,04511/03,04511/04,04512/01,04512/02,04512/03,04512/04,04513/01,04513/02,04513/03,04513/04,04514/01,04514/02,04514/03,04514/04,04515/01,04515/02,04515/03,04515/04,04516/01,04516/02,04516/03,04516/04,04517/01,04517/02,04517/03,04517/04,04518/01,04518/02,04518/03,04518/04,04519/01,04519/02,04519/03,04519/04,04520/01,04520/02,04520/03,04520/04,04521/01,04521/02,04521/03,04521/04,04522/01,04522/02,04522/03,04522/04,04523/01,04523/02,04523/03,04523/04,04524/01,04524/02,04524/03,04524/04,04525/01,04525/02,04525/03,04525/04,04526/01,04526/02,04526/03,04526/04</MessageLevels></ISVConfig></LoggingView><Displays><Display0><Frame><Show>2</Show><Minimum>0,824</Minimum><Maximum>-1,-1</Maximum><Normal>320,2,502,70</Normal></Frame><Type>OS Core Dump</Type></Display0><Display1><Frame><Show>1</Show><Minimum>-1,-1</Minimum><Maximum>-1,-1</Maximum><Normal>206,-8,575,38</Normal></Frame><View><Address>0x00400000</Address><Rows>8</Rows><Control><ShowAddress>1</ShowAddress><ShowASCII>1</ShowASCII><BytesPerRow>16</BytesPerRow><AutoBytesPerRow>0</AutoBytesPerRow></Control></View><Type>Memory Viewer</Type></Display1><Display2><Frame><Show>1</Show><Minimum>-1,-1</Minimum><Maximum>-1,-1</Maximum><Normal>206,-8,575,38</Normal></Frame><View><Address>0x00400000</Address><Rows>8</Rows><Control><ShowAddress>1</ShowAddress><ShowASCII>1</ShowASCII><BytesPerRow>16</BytesPerRow><AutoBytesPerRow>0</AutoBytesPerRow></Control></View><Type>Memory Viewer</Type></Display2><Display3><Frame><Show>1</Show><Minimum>-1,-1</Minimum><Maximum>-1,-1</Maximum><Normal>419,25,1073,25</Normal></Frame><Type>Messages View</Type></Display3><Display4><Frame><Show>1</Show><Minimum>-1,-1</Minimum><Maximum>-8,-30</Maximum><Normal>630,50,1055,50</Normal><VILSize>533</VILSize><HexSize>0</HexSize><PILSize>978</PILSize></Frame><View><Appearance><ShowDate>0</ShowDate><ShowMilliseconds>1</ShowMilliseconds><TypeSpecificTime>1</TypeSpecificTime><UseLegacyFormat>0</UseLegacyFormat><IncludeHeader>0</IncludeHeader><Order>0,1,2,3,4</Order><Columns>0/80,1/80,2/410,3/120,4/400,5/400</Columns></Appearance><HexEdit><ShowASCII>1</ShowASCII><ShowHorzSB>0</ShowHorzSB><ShowVertSB>0</ShowVertSB><BytesPerLine>16</BytesPerLine><BytesPerGroup>1</BytesPerGroup></HexEdit><ParsedItem><FieldColumns>200,50,50,50</FieldColumns><TextColumns>300</TextColumns></ParsedItem></View><Type>Item View</Type></Display4><Display5><Frame><Show>3</Show><Minimum>-1,-1</Minimum><Maximum>-8,-30</Maximum><Normal>448,50,819,50</Normal></Frame><Type>Log View</Type></Display5></Displays><MainFrame><Show>1</Show><Normal>845,203,1163,127</Normal><ExportParsedText>0</ExportParsedText><ForceANSIText>1</ForceANSIText><VendorDatabase>C:\Users\Public\Documents\Qualcomm\QXDM\Vendor\Qualcomm\</VendorDatabase><StatusIndicators>0,31905,31906,31928,31929,31915,31916,31924</StatusIndicators><HSDPADeviceCategory>4</HSDPADeviceCategory><ShortcutF6>0</ShortcutF6><ShortcutF8>0</ShortcutF8><ISFSettings><Advanced>0</Advanced><QueryISFSave>0</QueryISFSave><AutoISFSave>0</AutoISFSave><QuickISFSave>0</QuickISFSave><MaxISFSize>0</MaxISFSize><MaxISFDuration>0</MaxISFDuration><MaxISFArchives>0</MaxISFArchives></ISFSettings></MainFrame></Persistence><Current><LogView><Frame><Show>3</Show><Minimum>-1,-1</Minimum><Maximum>-8,-30</Maximum><Normal>448,50,819,50</Normal></Frame></LogView></Current></QXDMProfessional>
diff --git a/common/base.mk b/common/base.mk index 7c34c0f7..40bd492b 100644 --- a/common/base.mk +++ b/common/base.mk @@ -149,7 +149,7 @@ BT := javax.btobex BT += libattrib_static BT += hcidump.sh BT += libbt-vendor -BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/google/marlin/common +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/google/marlin/bluetooth #C2DColorConvert C2DCC := libc2dcolorconvert @@ -829,8 +829,6 @@ PRODUCT_COPY_FILES += \ frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ - device/google/marlin/common/media/media_profiles.xml:system/etc/media_profiles.xml \ - device/google/marlin/common/media/media_codecs.xml:system/etc/media_codecs.xml # enable overlays to use our version of # source/resources etc. diff --git a/common/bdroid_buildcfg.h b/common/bdroid_buildcfg.h deleted file mode 100644 index 63515b1f..00000000 --- a/common/bdroid_buildcfg.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * Not a Contribution, Apache license notifications and license are retained - * for attribution purposes only. - * - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _BDROID_BUILDCFG_H -#define _BDROID_BUILDCFG_H - -// Wide-band speech support -#define BTM_WBS_INCLUDED TRUE -#define BTIF_HF_WBS_PREFERRED TRUE - -// Google VSC spec support -#define BLE_VND_INCLUDED TRUE - -// QCOM power management workaround -#define BT_CLEAN_TURN_ON_DISABLED TRUE - -#endif diff --git a/common/build/tasks/vendor_bootjars.mk b/common/build/tasks/vendor_bootjars.mk deleted file mode 100644 index 794dde8e..00000000 --- a/common/build/tasks/vendor_bootjars.mk +++ /dev/null @@ -1,12 +0,0 @@ -# This makefile is used to include -# extra product boot jars for SDK - -ifneq ($(call is-vendor-board-platform,QCOM),true) - -#add extra jars here -PRODUCT_BOOT_JARS += tcmiface - -#call dex_preopt.mk for extra jars -include $(BUILD_SYSTEM)/dex_preopt.mk - -endif diff --git a/common/common.mk b/common/common.mk deleted file mode 100644 index 351ccf63..00000000 --- a/common/common.mk +++ /dev/null @@ -1,24 +0,0 @@ -$(call inherit-product, device/google/marlin/common/base.mk) - -# For PRODUCT_COPY_FILES, the first instance takes precedence. -# Since we want use QC specific files, we should inherit -# device-vendor.mk first to make sure QC specific files gets installed. -# already included in aosp/non-aosp mk files -#$(call inherit-product-if-exists, $(QCPATH)/common/config/device-vendor.mk) -#$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) - -#ifndef PRODUCT_MANUFACTURER -#PRODUCT_MANUFACTURER := QUALCOMM -#endif -# -PRODUCT_PROPERTY_OVERRIDES += \ - ro.vendor.extension_library=libqti-perfd-client.so \ - persist.radio.apm_sim_not_pwdn=1 \ - persist.radio.custom_ecc=1\ - persist.radio.sib16_support=1 - -PRODUCT_PACKAGES += qcril.db - -#$(call inherit-product, frameworks/native/build/phone-xhdpi-1024-dalvik-heap.mk) -#$(call inherit-product, frameworks/base/data/fonts/fonts.mk) -#$(call inherit-product, frameworks/base/data/keyboards/keyboards.mk) diff --git a/common/cryptfs_hw/Android.mk b/common/cryptfs_hw/Android.mk deleted file mode 100644 index 1d71c2ae..00000000 --- a/common/cryptfs_hw/Android.mk +++ /dev/null @@ -1,32 +0,0 @@ -ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -sourceFiles := \ - cryptfs_hw.c - -commonSharedLibraries := \ - libcutils \ - libutils \ - libdl \ - libhardware -commonIncludes := \ - hardware/libhardware/include/hardware/ - -LOCAL_C_INCLUDES := $(commonIncludes) -LOCAL_SRC_FILES := $(sourceFiles) - -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE:= libcryptfs_hw -LOCAL_SHARED_LIBRARIES := $(commonSharedLibraries) - -LOCAL_MODULE_OWNER := qcom - -# USE_ICE_FOR_STORAGE_ENCRYPTION would be true in future if -# TARGET_USE_EMMC_USE_ICE is set -ifeq ($(TARGET_USE_UFS_ICE),true) -LOCAL_CFLAGS += -DUSE_ICE_FOR_STORAGE_ENCRYPTION -endif - -include $(BUILD_SHARED_LIBRARY) -endif diff --git a/common/cryptfs_hw/cryptfs_hw.c b/common/cryptfs_hw/cryptfs_hw.c deleted file mode 100755 index cae970eb..00000000 --- a/common/cryptfs_hw/cryptfs_hw.c +++ /dev/null @@ -1,299 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <cryptfs_hw.h> -#include <stdlib.h> -#include <string.h> -#include <sys/limits.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <dirent.h> -#include <dlfcn.h> -#include "cutils/log.h" -#include "cutils/properties.h" -#include "cutils/android_reboot.h" -#include "keymaster_common.h" -#include "hardware.h" - -#if defined(__LP64__) -#define QSEECOM_LIBRARY_PATH "/vendor/lib64/libQSEEComAPI.so" -#else -#define QSEECOM_LIBRARY_PATH "/vendor/lib/libQSEEComAPI.so" -#endif - - -// When device comes up or when user tries to change the password, user can -// try wrong password upto a certain number of times. If user enters wrong -// password further, HW would wipe all disk encryption related crypto data -// and would return an error ERR_MAX_PASSWORD_ATTEMPTS to VOLD. VOLD would -// wipe userdata partition once this error is received. -#define ERR_MAX_PASSWORD_ATTEMPTS -10 -#define QSEECOM_DISK_ENCRYPTION 1 -#define QSEECOM_UFS_ICE_DISK_ENCRYPTION 3 -#define QSEECOM_SDCC_ICE_DISK_ENCRYPTION 4 -#define MAX_PASSWORD_LEN 32 -#define QCOM_ICE_STORAGE_UFS 1 -#define QCOM_ICE_STORAGE_SDCC 2 - -/* Operations that be performed on HW based device encryption key */ -#define SET_HW_DISK_ENC_KEY 1 -#define UPDATE_HW_DISK_ENC_KEY 2 - -#define KEYMASTER_PARTITION_NAME "/dev/block/bootdevice/by-name/keymaster" - -#define QSEECOM_UP_CHECK_COUNT 10 - -static int loaded_library = 0; -static int (*qseecom_create_key)(int, void*); -static int (*qseecom_update_key)(int, void*, void*); -static int (*qseecom_wipe_key)(int); - -inline void* secure_memset(void* v, int c , size_t n) { - volatile unsigned char* p = (volatile unsigned char* )v; - while (n--) *p++ = c; - return v; -} - - -static int map_usage(int usage) -{ - int storage_type = is_ice_enabled(); - if (usage == QSEECOM_DISK_ENCRYPTION) { - if (storage_type == QCOM_ICE_STORAGE_UFS) { - return QSEECOM_UFS_ICE_DISK_ENCRYPTION; - } - else if (storage_type == QCOM_ICE_STORAGE_SDCC) { - return QSEECOM_SDCC_ICE_DISK_ENCRYPTION ; - } - } - return usage; -} - -static unsigned char* get_tmp_passwd(const char* passwd) -{ - int passwd_len = 0; - unsigned char * tmp_passwd = NULL; - if(passwd) { - tmp_passwd = (unsigned char*)malloc(MAX_PASSWORD_LEN); - if(tmp_passwd) { - memset(tmp_passwd, 0, MAX_PASSWORD_LEN); - passwd_len = (strlen(passwd) > MAX_PASSWORD_LEN) ? MAX_PASSWORD_LEN : strlen(passwd); - memcpy(tmp_passwd, passwd, passwd_len); - } else { - SLOGE("%s: Failed to allocate memory for tmp passwd \n", __func__); - } - } else { - SLOGE("%s: Passed argument is NULL \n", __func__); - } - return tmp_passwd; -} - -static void wipe_userdata() -{ - mkdir("/cache/recovery", 0700); - int fd = open("/cache/recovery/command", O_RDWR|O_CREAT|O_TRUNC|O_NOFOLLOW, 0600); - if (fd >= 0) { - write(fd, "--wipe_data", strlen("--wipe_data") + 1); - close(fd); - } else { - SLOGE("could not open /cache/recovery/command\n"); - } - android_reboot(ANDROID_RB_RESTART2, 0, "recovery"); -} - -static int is_qseecom_up() -{ - int i = 0; - char value[PROPERTY_VALUE_MAX] = {0}; - - for (; i<QSEECOM_UP_CHECK_COUNT; i++) { - property_get("sys.listeners.registered", value, ""); - if (!strncmp(value, "true", PROPERTY_VALUE_MAX)) - return 1; - usleep(100000); - } - return 0; -} - - -static int load_qseecom_library() -{ - const char *error = NULL; - if (loaded_library) - return loaded_library; - - if (!is_qseecom_up()) { - SLOGE("Timed out waiting for QSEECom listeners..aborting FDE key operation"); - return 0; - } - - void * handle = dlopen(QSEECOM_LIBRARY_PATH, RTLD_NOW); - if(handle) { - dlerror(); /* Clear any existing error */ - *(void **) (&qseecom_create_key) = dlsym(handle,"QSEECom_create_key"); - - if((error = dlerror()) == NULL) { - SLOGD("Success loading QSEECom_create_key \n"); - *(void **) (&qseecom_update_key) = dlsym(handle,"QSEECom_update_key_user_info"); - if ((error = dlerror()) == NULL) { - SLOGD("Success loading QSEECom_update_key_user_info\n"); - *(void **) (&qseecom_wipe_key) = dlsym(handle,"QSEECom_wipe_key"); - if ((error = dlerror()) == NULL) { - loaded_library = 1; - SLOGD("Success loading QSEECom_wipe_key \n"); - } - else - SLOGE("Error %s loading symbols for QSEECom APIs \n", error); - } - else - SLOGE("Error %s loading symbols for QSEECom APIs \n", error); - } - } else { - SLOGE("Could not load libQSEEComAPI.so \n"); - } - - if(error) - dlclose(handle); - - return loaded_library; -} - -/* - * For NON-ICE targets, it would return 0 on success. On ICE based targets, - * it would return key index in the ICE Key LUT - */ -static int set_key(const char* currentpasswd, const char* passwd, const char* enc_mode, int operation) -{ - int err = -1; - if (is_hw_disk_encryption(enc_mode) && load_qseecom_library()) { - unsigned char* tmp_passwd = get_tmp_passwd(passwd); - unsigned char* tmp_currentpasswd = get_tmp_passwd(currentpasswd); - if(tmp_passwd) { - if (operation == UPDATE_HW_DISK_ENC_KEY) { - if (tmp_currentpasswd) { - err = qseecom_update_key(map_usage(QSEECOM_DISK_ENCRYPTION), tmp_currentpasswd, tmp_passwd); - secure_memset(tmp_currentpasswd, 0, MAX_PASSWORD_LEN); - } - } else if (operation == SET_HW_DISK_ENC_KEY) { - err = qseecom_create_key(map_usage(QSEECOM_DISK_ENCRYPTION), tmp_passwd); - } - if(err < 0) { - if(ERR_MAX_PASSWORD_ATTEMPTS == err) - wipe_userdata(); - } - secure_memset(tmp_passwd, 0, MAX_PASSWORD_LEN); - free(tmp_passwd); - free(tmp_currentpasswd); - } - } - return err; -} - -int set_hw_device_encryption_key(const char* passwd, const char* enc_mode) -{ - return set_key(NULL, passwd, enc_mode, SET_HW_DISK_ENC_KEY); -} - -int update_hw_device_encryption_key(const char* oldpw, const char* newpw, const char* enc_mode) -{ - return set_key(oldpw, newpw, enc_mode, UPDATE_HW_DISK_ENC_KEY); -} - -unsigned int is_hw_disk_encryption(const char* encryption_mode) -{ - int ret = 0; - if(encryption_mode) { - if (!strcmp(encryption_mode, "aes-xts")) { - SLOGD("HW based disk encryption is enabled \n"); - ret = 1; - } - } - return ret; -} - -int is_ice_enabled(void) -{ - char prop_storage[PATH_MAX]; - int storage_type = 0; - int fd; - - if (property_get("ro.boot.bootdevice", prop_storage, "")) { - if (strstr(prop_storage, "ufs")) { - /* All UFS based devices has ICE in it. So we dont need - * to check if corresponding device exists or not - */ - storage_type = QCOM_ICE_STORAGE_UFS; - } else if (strstr(prop_storage, "sdhc")) { - if (access("/dev/icesdcc", F_OK) != -1) - storage_type = QCOM_ICE_STORAGE_SDCC; - } - } - return storage_type; -} - -int clear_hw_device_encryption_key() -{ - if (load_qseecom_library()) - return qseecom_wipe_key(map_usage(QSEECOM_DISK_ENCRYPTION)); - - return 0; -} - -static int get_keymaster_version() -{ - int rc = -1; - const hw_module_t* mod; - rc = hw_get_module_by_class(KEYSTORE_HARDWARE_MODULE_ID, NULL, &mod); - if (rc) { - SLOGE("could not find any keystore module"); - return rc; - } - - return mod->module_api_version; -} - -int should_use_keymaster() -{ - /* HW FDE key would be tied to keymaster only if: - * New Keymaster is available - * keymaster partition exists on the device - */ - int rc = 0; - if (get_keymaster_version() != KEYMASTER_MODULE_API_VERSION_1_0) { - SLOGI("Keymaster version is not 1.0"); - return rc; - } - - if (access(KEYMASTER_PARTITION_NAME, F_OK) == -1) { - SLOGI("Keymaster partition does not exists"); - return rc; - } - - return 1; -} diff --git a/common/cryptfs_hw/cryptfs_hw.h b/common/cryptfs_hw/cryptfs_hw.h deleted file mode 100755 index e857c476..00000000 --- a/common/cryptfs_hw/cryptfs_hw.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __CRYPTFS_HW_H_ -#define __CRYPTFS_HW_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -int set_hw_device_encryption_key(const char*, const char*); -int update_hw_device_encryption_key(const char*, const char*, const char*); -int clear_hw_device_encryption_key(); -unsigned int is_hw_disk_encryption(const char*); -int is_ice_enabled(void); -int should_use_keymaster(); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/common/display/logo/logo_gen.py b/common/display/logo/logo_gen.py deleted file mode 100755 index c9bcb1af..00000000 --- a/common/display/logo/logo_gen.py +++ /dev/null @@ -1,263 +0,0 @@ -# Copyright (c) 2013,2015, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#=========================================================================== - -# This script read the logo png and creates the logo.img - -# when who what, where, why -# -------- --- ------------------------------------------------------- -# 2013-04 QRD init -# 2015-04 QRD support the RLE24 compression - -# Environment requirement: -# Python + PIL -# PIL install: -# (ubuntu) sudo apt-get install python-imaging -# (windows) (http://www.pythonware.com/products/pil/) - -# limit: -# a This script only support Python 2.7.x, 2.6.x, -# Can't use in py3x for StringIO module -# b This script's input can be a png, jpeg, bmp, gif file. -# But if it is a gif, only get the first frame by default. -# -# description: -# struct logo_header { -# unsigned char[8]; // "SPLASH!!" -# unsigned width; // logo's width, little endian -# unsigned height; // logo's height, little endian -# unsigned type; // 0, Raw Image; 1, RLE24 Compressed Image -# unsigned blocks; // block number, real size / 512 -# ...... -# }; - -# the logo Image layout: -# logo_header + Payload data - -# ===========================================================================*/ -from __future__ import print_function -import sys,os -import struct -import StringIO -from PIL import Image - -SUPPORT_RLE24_COMPRESSIONT = 1 - -## get header -def GetImgHeader(size, compressed=0, real_bytes=0): - SECTOR_SIZE_IN_BYTES = 512 # Header size - header = [0 for i in range(SECTOR_SIZE_IN_BYTES)] - - width, height = size - real_size = (real_bytes + 511) / 512 - - # magic - header[:8] = [ord('S'),ord('P'), ord('L'), ord('A'), - ord('S'),ord('H'), ord('!'), ord('!')] - - # width - header[8] = ( width & 0xFF) - header[9] = ((width >> 8 ) & 0xFF) - header[10]= ((width >> 16) & 0xFF) - header[11]= ((width >> 24) & 0xFF) - - # height - header[12]= ( height & 0xFF) - header[13]= ((height >> 8) & 0xFF) - header[14]= ((height >> 16) & 0xFF) - header[15]= ((height >> 24) & 0xFF) - - #type - header[16]= ( compressed & 0xFF) - #header[17]= 0 - #header[18]= 0 - #header[19]= 0 - - # block number - header[20] = ( real_size & 0xFF) - header[21] = ((real_size >> 8) & 0xFF) - header[22] = ((real_size >> 16) & 0xFF) - header[23] = ((real_size >> 24) & 0xFF) - - output = StringIO.StringIO() - for i in header: - output.write(struct.pack("B", i)) - content = output.getvalue() - output.close() - return content - -def encode(line): - count = 0 - lst = [] - repeat = -1 - run = [] - total = len(line) - 1 - for index, current in enumerate(line[:-1]): - if current != line[index + 1]: - run.append(current) - count += 1 - if repeat == 1: - entry = (count+128,run) - lst.append(entry) - count = 0 - run = [] - repeat = -1 - if index == total - 1: - run = [line[index + 1]] - entry = (1,run) - lst.append(entry) - else: - repeat = 0 - - if count == 128: - entry = (128,run) - lst.append(entry) - count = 0 - run = [] - repeat = -1 - if index == total - 1: - run.append(line[index + 1]) - entry = (count+1,run) - lst.append(entry) - else: - if repeat == 0: - entry = (count,run) - lst.append(entry) - count = 0 - run = [] - repeat = -1 - if index == total - 1: - run.append( line[index + 1]) - run.append( line[index + 1]) - entry = (2+128,run) - lst.append(entry) - break - run.append(current) - repeat = 1 - count += 1 - if count == 128: - entry = (256,run) - lst.append(entry) - count = 0 - run = [] - repeat = -1 - if index == total - 1: - if count == 0: - run = [line[index + 1]] - entry = (1,run) - lst.append(entry) - else: - run.append(current) - entry = (count+1+128,run) - lst.append(entry) - return lst - -def encodeRLE24(img): - width, height = img.size - output = StringIO.StringIO() - - for h in range(height): - line = [] - result=[] - for w in range(width): - (r, g, b) = img.getpixel((w,h)) - line.append((r << 16)+(g << 8) + b) - result = encode(line) - for count, pixel in result: - output.write(struct.pack("B", count-1)) - if count > 128: - output.write(struct.pack("B", (pixel[0]) & 0xFF)) - output.write(struct.pack("B", ((pixel[0]) >> 8) & 0xFF)) - output.write(struct.pack("B", ((pixel[0]) >> 16) & 0xFF)) - else: - for item in pixel: - output.write(struct.pack("B", (item) & 0xFF)) - output.write(struct.pack("B", (item >> 8) & 0xFF)) - output.write(struct.pack("B", (item >> 16) & 0xFF)) - content = output.getvalue() - output.close() - return content - - -## get payload data : BGR Interleaved -def GetImageBody(img, compressed=0): - color = (0, 0, 0) - if img.mode == "RGB": - background = img - elif img.mode == "RGBA": - background = Image.new("RGB", img.size, color) - img.load() - background.paste(img, mask=img.split()[3]) # alpha channel - elif img.mode == "P" or img.mode == "L": - background = Image.new("RGB", img.size, color) - img.load() - background.paste(img) - #background.save("splash.png") - else: - print ("sorry, can't support this format") - sys.exit() - - if compressed == 1: - return encodeRLE24(background) - else: - r, g, b = background.split() - return Image.merge("RGB",(b,g,r)).tostring() - -## make a image - -def MakeLogoImage(logo, out): - img = Image.open(logo) - file = open(out, "wb") - body = GetImageBody(img, SUPPORT_RLE24_COMPRESSIONT) - file.write(GetImgHeader(img.size, SUPPORT_RLE24_COMPRESSIONT, len(body))) - file.write(body) - file.close() - - -## mian - -def ShowUsage(): - print(" usage: python logo_gen.py [logo.png]") - -def GetPNGFile(): - infile = "logo.png" #default file name - num = len(sys.argv) - if num > 3: - ShowUsage() - sys.exit(); # error arg - - if num == 2: - infile = sys.argv[1] - - if os.access(infile, os.R_OK) != True: - ShowUsage() - sys.exit(); # error file - return infile - -if __name__ == "__main__": - MakeLogoImage(GetPNGFile(), "splash.img") diff --git a/common/display/logo/readme.txt b/common/display/logo/readme.txt deleted file mode 100644 index 00559fa1..00000000 --- a/common/display/logo/readme.txt +++ /dev/null @@ -1,3 +0,0 @@ -The steps to generate a splash.img: -1 sudo apt-get install python-imaging -2 python ./logo_gen.py snapdragon.png diff --git a/common/display/tools/README.txt b/common/display/tools/README.txt deleted file mode 100644 index 283c9f30..00000000 --- a/common/display/tools/README.txt +++ /dev/null @@ -1,82 +0,0 @@ -Copyright (c) 2013, The Linux Foundation. All rights reserved. - -Redistribution and use in source form and compiled forms (SGML, HTML, -PDF, PostScript, RTF and so forth) with or without modification, are -permitted provided that the following conditions are met: - -Redistributions in source form must retain the above copyright -notice, this list of conditions and the following disclaimer as the -first lines of this file unmodified. - -Redistributions in compiled form (transformed to other DTDs, -converted to PDF, PostScript, RTF and other formats) must reproduce -the above copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials provided with -the distribution. - -THIS DOCUMENTATION IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND -NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD -DOCUMENTATION PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - - -------------------------------------------------------------- -------------------------------------------------------------- - - -Introduction ----------- -README.txt describes the parser usage for display component in -GCDB(Global Component Database). - -Usage: ---------- -Display parser supports generating dtsi and header file for android -kernel and LK. - -command: perl parser.pl <.xml> <panel/platform> - -Next two sections descrbe the usage of parser script for xml files -preset in this folder. User can follow same for their own panel -or target files. - - -Generate Panel dtsi/header file ------------------------- -User should use below command to generate the panel dtsi/header file for -panel_nt35590_720p_cmd.xml. This xml file is part of this folder. - -#perl parser.pl panel_nt35590_720p_cmd.xml panel - -It generates dsi-panel-nt35590-720p-cmd.dtsi and panle_nt35590_720p_cmd.h -files. Dtsi file should be copied to dts folder in kernel while header -file should be copied to bootloader GCDB header file database. - -It also contains the video mode panel xml file. - -#perl parser.pl panel_nt35596_1080p_video.xml panel - -It generates dsi-panel-nt35596-1080p-video.dtsi and panle_nt35596_1080p_video.h -files. Dtsi file should be copied to dts folder in kernel while header file -should be copied to bootloader GCDB header file database. - - - -Generate Platform dtsi/header file ---------------------------- -User should use below command to generate the display platform dtsi/header file -for platform-msm8610.xml. This XML file is part of this folder. - -#perl parser.pl platform-msm8610.xml platform - -It generates platform_msm8610.h and platform-msm8610.dtsi files. The content of -dtsi file should be copied to <target-mdss.dtsi> file for kernel while content -of header file should be copied to display.h for LK. diff --git a/common/display/tools/panel_nt35590_720p_cmd.xml b/common/display/tools/panel_nt35590_720p_cmd.xml deleted file mode 100644 index 065d465a..00000000 --- a/common/display/tools/panel_nt35590_720p_cmd.xml +++ /dev/null @@ -1,609 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -# Copyright (c) 2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# ---> - - -<GCDB> - <Version>"1.0"</Version> - <PanelId>nt35590-720p-cmd</PanelId> - <PanelH>nt35590_720p_cmd</PanelH> - <PanelEntry> - - <!-- Panel configuration --> - <PanelName>"nt35590 720p command mode dsi panel"</PanelName> - <PanelController>"mdss_dsi0"</PanelController> - <PanelInterface>10</PanelInterface> - <PanelType>1</PanelType> - <PanelDestination>"DISPLAY_1"</PanelDestination> - <PanelOrientation>0</PanelOrientation> - <PanelFrameRate>60</PanelFrameRate> - <PanelChannelId>0</PanelChannelId> - <DSIVirtualChannelId>0</DSIVirtualChannelId> - <PanelBroadcastMode>0</PanelBroadcastMode> - <DSIStream>0</DSIStream> - <PanelCompatible>"qcom,mdss-dsi-panel"</PanelCompatible> - <InterleaveMode>0</InterleaveMode> - - <!-- Panel Resolution --> - <PanelWidth>720</PanelWidth> - <PanelHeight>1280</PanelHeight> - <HFrontPorch>140</HFrontPorch> - <HBackPorch>164</HBackPorch> - <HPulseWidth>8</HPulseWidth> - <HSyncSkew>0</HSyncSkew> - <VBackPorch>1</VBackPorch> - <VFrontPorch>6</VFrontPorch> - <VPulseWidth>1</VPulseWidth> - <HLeftBorder>0</HLeftBorder> - <HRightBorder>0</HRightBorder> - <VTopBorder>0</VTopBorder> - <VBottomBorder>0</VBottomBorder> - <!-- Optional Panel resolution configuration --> - <!--HActiveRes>0</HActiveRes> - <VActiveRes>100</VActiveRes> - <InvertDataPolarity>0</InvertDataPolarity> - <InvertVsyncPolarity>0</InvertVsyncPolarity> - <InvertHsyncPolarity>0</InvertHsyncPolarity --> - - <!-- Panel Color Information --> - <ColorFormat>24</ColorFormat> - <ColorOrder>0</ColorOrder> - <UnderFlowColor>0xff</UnderFlowColor> - <BorderColor>0</BorderColor> - <PixelPacking>0</PixelPacking> - <!-- Optional Panel color information only for non byte aligned format--> - <PixelAlignment>0</PixelAlignment> - - <!-- Panel Command information --> - <OnCommand>"0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0xEE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x08, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x10, 0x00, 0x02, 0xFF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBA, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC2, 0x08, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x4A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x33, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x53, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x55, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x55, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x33, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x22, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x56, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x09, 0x8F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x36, 0x73, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0B, 0x9F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0C, 0x9F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0D, 0x2F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0E, 0x24, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x83, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x71, 0x2C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6F, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0F, 0x0A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x05, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x8B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x82, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x82, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x30, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x33, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x09, 0x46, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0A, 0x46, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0D, 0x0B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0E, 0x1D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0F, 0x08, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x53, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x15, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x16, 0x05, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x19, 0x7F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1A, 0xFF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1B, 0x0F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1C, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1D, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1E, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1F, 0x07, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x21, 0x06, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x22, 0x55, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x23, 0x4D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2D, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x28, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2F, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9E, 0x58, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9F, 0x6A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA0, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA2, 0x10, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBB, 0x0A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBC, 0x0A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x32, 0x08, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x33, 0xB8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x36, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x37, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x43, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4B, 0x21, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4C, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50, 0x21, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x51, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x21, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x59, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5D, 0x21, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5E, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6C, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6D, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x75, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x76, 0x7D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x8A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x79, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7A, 0x9C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7B, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7C, 0xB1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7D, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7E, 0xBF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0xCF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x81, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0xDD, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x84, 0xE8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x85, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x86, 0xF2, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x87, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x88, 0x1F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x89, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8A, 0x41, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8B, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8C, 0x78, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8D, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8E, 0xA5, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8F, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x90, 0xEE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x91, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x92, 0x29, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x93, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x94, 0x2A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x95, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x96, 0x5D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x97, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x98, 0x93, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x99, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9A, 0xB8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9B, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9C, 0xE7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9E, 0x07, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9F, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA0, 0x37, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA2, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA3, 0x46, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA4, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA5, 0x56, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA6, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA7, 0x66, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAA, 0x7A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAC, 0x93, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAD, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAE, 0xA3, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAF, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB0, 0xB4, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB1, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB2, 0xCB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB3, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB4, 0x7D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB5, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB6, 0x8A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB7, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB8, 0x9C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB9, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBA, 0xB1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBB, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBC, 0xBF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBD, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBE, 0xCF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC0, 0xDD, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC1, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC2, 0xE8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC3, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC4, 0xF2, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC5, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC6, 0x1F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC7, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC8, 0x41, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC9, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCA, 0x78, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCC, 0xA5, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCD, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCE, 0xEE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCF, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD0, 0x29, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD1, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD2, 0x2A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD3, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD4, 0x5D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD5, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD6, 0x93, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD7, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD8, 0xB8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD9, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDA, 0xE7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDC, 0x07, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDD, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDE, 0x37, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDF, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE0, 0x46, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE1, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE2, 0x56, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE3, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE4, 0x66, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE5, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE6, 0x7A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE7, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE8, 0x93, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEA, 0xA3, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEC, 0xB4, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xED, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEE, 0xCB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF0, 0xED, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF1, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF2, 0xF3, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF3, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF4, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF5, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF6, 0x09, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF7, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF8, 0x13, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF9, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFA, 0x1D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x26, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x2F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x37, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0x56, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x09, 0x70, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0A, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0B, 0x9D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0C, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0D, 0xC2, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0E, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0F, 0xFF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x31, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x32, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x15, 0x60, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x16, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0x94, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x19, 0xB5, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1A, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1B, 0xE3, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1C, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1E, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1F, 0x2D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x21, 0x3A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x22, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x23, 0x48, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x24, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x25, 0x57, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x27, 0x68, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x28, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x29, 0x7B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2A, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2B, 0x90, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2F, 0xA0, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x30, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x31, 0xCB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x32, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x33, 0xED, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x34, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x35, 0xF3, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x36, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x37, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x38, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x39, 0x09, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3A, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3B, 0x13, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3D, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3F, 0x1D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x41, 0x26, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x42, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x43, 0x2F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x44, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x45, 0x37, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x47, 0x56, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x48, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x49, 0x70, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4A, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4B, 0x9D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4C, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4D, 0xC2, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4E, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4F, 0xFF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x51, 0x31, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x52, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x53, 0x32, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x54, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x55, 0x60, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x56, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x94, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x59, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5A, 0xB5, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5B, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5C, 0xE3, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5E, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5F, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x60, 0x2D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x61, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x62, 0x3A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x63, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x64, 0x48, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x65, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x66, 0x57, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x67, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x68, 0x68, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x69, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6A, 0x7B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6B, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6C, 0x90, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6E, 0xA0, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6F, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x70, 0xCB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x71, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x72, 0x19, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x73, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x74, 0x36, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x75, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x76, 0x55, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x70, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x79, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7A, 0x83, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7B, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7C, 0x99, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7D, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7E, 0xA8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0xB7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x81, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0xC5, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x84, 0xF7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x85, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x86, 0x1E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x87, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x88, 0x60, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x89, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8A, 0x95, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8B, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8C, 0xE1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8D, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8E, 0x20, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8F, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x90, 0x23, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x91, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x92, 0x59, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x93, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x94, 0x94, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x95, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x96, 0xB4, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x97, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x98, 0xE1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x99, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9A, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9B, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9C, 0x28, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9E, 0x30, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9F, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA0, 0x37, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA2, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA3, 0x3B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA4, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA5, 0x40, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA6, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA7, 0x50, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAA, 0x6D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAC, 0x80, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAD, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAE, 0xCB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB0, 0x19, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB1, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB2, 0x36, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB3, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB4, 0x55, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB5, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB6, 0x70, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB7, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB8, 0x83, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB9, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBA, 0x99, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBB, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBC, 0xA8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBD, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBE, 0xB7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC0, 0xC5, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC1, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC2, 0xF7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC3, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC4, 0x1E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC5, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC6, 0x60, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC7, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC8, 0x95, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC9, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCA, 0xE1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCB, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCC, 0x20, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCD, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCE, 0x23, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCF, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD0, 0x59, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD1, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD2, 0x94, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD3, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD4, 0xB4, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD5, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD6, 0xE1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD7, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD8, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDA, 0x28, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDC, 0x30, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDD, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDE, 0x37, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDF, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE0, 0x3B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE1, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE2, 0x40, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE3, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE4, 0x50, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE5, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE6, 0x6D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE7, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE8, 0x80, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEA, 0xCB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x04, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x64, 0x00, 0x02, 0x11, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0xEE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x50, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6A, 0x60, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x78, 0x00, 0x02, 0x29, 0x00"</OnCommand> - <OffCommand>"0x05, 0x01, 0x00, 0x00, 0x32, 0x00, 0x02, 0x28, 0x00, - 0x05, 0x01, 0x00, 0x00, 0x78, 0x00, 0x02, 0x10, 0x00"</OffCommand> - <OnCommandState>0</OnCommandState> - <OffCommandState>1</OffCommandState> - - <!-- Video mode panel information --> - <HSyncPulse>1</HSyncPulse> - <HFPPowerMode>0</HFPPowerMode> - <HBPPowerMode>0</HBPPowerMode> - <HSAPowerMode>0</HSAPowerMode> - <BLLPEOFPowerMode>1</BLLPEOFPowerMode> - <BLLPPowerMode>1</BLLPPowerMode> - <TrafficMode>2</TrafficMode> - <DMADelayAfterVsync>0</DMADelayAfterVsync> - <BLLPEOFPower>0x9</BLLPEOFPower> - - <!-- Lane Configuration --> - <DSILanes>4</DSILanes> - <DSILaneMap>0</DSILaneMap> - <Lane0State>1</Lane0State> - <Lane1State>1</Lane1State> - <Lane2State>1</Lane2State> - <Lane3State>1</Lane3State> - - <!-- Panel Timing --> - <PanelTimings>"0x7d, 0x25, 0x1d, 0x00, 0x37, 0x33, 0x22, 0x27, 0x1e, 0x03, 0x04, 0x00"</PanelTimings> - <DSIMDPTrigger>0</DSIMDPTrigger> - <DSIDMATrigger>4</DSIDMATrigger> - <TClkPost>0x20</TClkPost> - <TClkPre>0x2c</TClkPre> - - <!--- command mode panel --> - <TECheckEnable>1</TECheckEnable> - <TEPinSelect>1</TEPinSelect> - <TEUsingTEPin>1</TEUsingTEPin> - <TEvSyncRdPtrIrqLine>0x2c</TEvSyncRdPtrIrqLine> - <TEvSyncContinueLines>0x3c</TEvSyncContinueLines> - <TEDCSCommand>1</TEDCSCommand> - - <!-- Backlight --> - <BLInterfaceType>1</BLInterfaceType> - <BLMinLevel>1</BLMinLevel> - <BLMaxLevel>4095</BLMaxLevel> - <BLStep>100</BLStep> - <BLPMICModel>"PMIC_8941"</BLPMICModel> - <BLPMICControlType>1</BLPMICControlType> - - <!-- Panel Reset Sequence --> - <ResetSequence> - <PinState1>1</PinState1> - <PulseWidth1>20</PulseWidth1> - <PinState2>0</PinState2> - <PulseWidth2>2</PulseWidth2> - <PinState3>1</PinState3> - <PulseWidth3>20</PulseWidth3> - <EnableBit>2</EnableBit> - </ResetSequence> - - </PanelEntry> -</GCDB> - diff --git a/common/display/tools/panel_nt35596_1080p_video.xml b/common/display/tools/panel_nt35596_1080p_video.xml deleted file mode 100644 index b3ca8a0d..00000000 --- a/common/display/tools/panel_nt35596_1080p_video.xml +++ /dev/null @@ -1,655 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -# Copyright (c) 2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# ---> - -<GCDB> - <Version>"1.0"</Version> - <PanelId>nt35596-1080p-video</PanelId> - <PanelH>nt35596_1080p_video</PanelH> - <PanelEntry> - - <!-- Panel configuration --> - <PanelName>"nt35596 1080p video mode dsi panel"</PanelName> - <PanelController>"mdss_dsi0"</PanelController> - <PanelInterface>10</PanelInterface> - <PanelType>0</PanelType> - <PanelDestination>"DISPLAY_1"</PanelDestination> - <PanelOrientation>0</PanelOrientation> - <PanelFrameRate>60</PanelFrameRate> - <PanelChannelId>0</PanelChannelId> - <DSIVirtualChannelId>0</DSIVirtualChannelId> - <PanelBroadcastMode>0</PanelBroadcastMode> - <!-- Optional Panel configuration --> - <!--BitClockFrequency>0</BitClockFrequency --> - <DSIStream>0</DSIStream> - <PanelCompatible>"qcom,mdss-dsi-panel"</PanelCompatible> - <InterleaveMode>0</InterleaveMode> - - <!-- Panel Resolution --> - <PanelWidth>1080</PanelWidth> - <PanelHeight>1920</PanelHeight> - <HFrontPorch>32</HFrontPorch> - <HBackPorch>32</HBackPorch> - <HPulseWidth>8</HPulseWidth> - <HSyncSkew>0</HSyncSkew> - <VBackPorch>18</VBackPorch> - <VFrontPorch>2</VFrontPorch> - <VPulseWidth>2</VPulseWidth> - <HLeftBorder>0</HLeftBorder> - <HRightBorder>0</HRightBorder> - <VTopBorder>0</VTopBorder> - <VBottomBorder>0</VBottomBorder> - <!-- Optional Panel resolution configuration --> - <!--HActiveRes>0</HActiveRes> - <VActiveRes>100</VActiveRes> - <InvertDataPolarity>0</InvertDataPolarity> - <InvertVsyncPolarity>0</InvertVsyncPolarity> - <InvertHsyncPolarity>0</InvertHsyncPolarity --> - - <!-- Panel Color Information --> - <ColorFormat>24</ColorFormat> - <ColorOrder>0</ColorOrder> - <UnderFlowColor>0xff</UnderFlowColor> - <BorderColor>0</BorderColor> - - <!-- Panel Command information --> - <OnCommand>"0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0xEE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1F, 0x45, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x24, 0x4F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x38, 0xC8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x39, 0x2C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1E, 0xBB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1D, 0x0F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7E, 0xB1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x35, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBA, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x55, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x40, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x1B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0x24, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x0C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0B, 0x87, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0C, 0x87, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0E, 0xB0, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0F, 0xB3, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x10, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x10, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x05, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x4A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x15, 0x18, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x16, 0x18, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x19, 0x77, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1A, 0x55, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1B, 0x13, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1C, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1D, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1E, 0x13, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1F, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x23, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x24, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x25, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x27, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x28, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x35, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x66, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x82, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x59, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5A, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5B, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5C, 0x82, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5D, 0x82, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5E, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5F, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x72, 0x31, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x05, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x0B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x0C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x09, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x0A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0x10, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x09, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0A, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0B, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0C, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0D, 0x13, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0E, 0x15, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0F, 0x17, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x0B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x0C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x09, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x0A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x15, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x16, 0x0F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0x10, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x19, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1A, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1B, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1C, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1D, 0x13, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1E, 0x15, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1F, 0x17, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x21, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x22, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x23, 0x40, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x24, 0x40, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x25, 0xED, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x29, 0x58, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2A, 0x12, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2B, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4B, 0x06, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4C, 0x11, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4D, 0x20, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4E, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4F, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50, 0x20, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x51, 0x61, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x52, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x53, 0x63, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x54, 0x77, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x55, 0xED, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5B, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5C, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5D, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5E, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5F, 0x15, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x60, 0x75, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x61, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x62, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x63, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x64, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x65, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x66, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x67, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x68, 0x04, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x69, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6A, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6C, 0x40, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x75, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x76, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7A, 0x80, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7B, 0xC5, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7C, 0xD8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7D, 0x60, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x10, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x81, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x05, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x93, 0x08, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x94, 0x10, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8A, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9B, 0x0F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEA, 0xFF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEC, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x75, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x76, 0x8E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x90, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x79, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7A, 0xB2, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7B, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7C, 0xC7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7D, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7E, 0xD7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0xE9, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x81, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0xF9, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x84, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x85, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x86, 0x0B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x87, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x88, 0x3A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x89, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8A, 0x5D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8B, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8C, 0x94, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8D, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8E, 0xBC, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8F, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x90, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x91, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x92, 0x39, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x93, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x94, 0x3A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x95, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x96, 0x6B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x97, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x98, 0xA2, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x99, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9A, 0xC7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9B, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9C, 0xFB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9E, 0x20, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9F, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA0, 0x54, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA2, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA3, 0x6D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA4, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA5, 0x80, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA6, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA7, 0x81, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAA, 0xC7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAC, 0xF0, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAD, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAE, 0xF8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAF, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB0, 0xFD, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB1, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB2, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB3, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB4, 0x8E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB5, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB6, 0x90, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB7, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB8, 0xB2, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB9, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBA, 0xC7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBB, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBC, 0xD7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBD, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBE, 0xE9, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC0, 0xF9, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC1, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC2, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC3, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC4, 0x0B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC5, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC6, 0x3A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC7, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC8, 0x5D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC9, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCA, 0x94, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCC, 0xBC, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCD, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCE, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCF, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD0, 0x39, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD1, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD2, 0x3A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD3, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD4, 0x6B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD5, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD6, 0xA2, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD7, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD8, 0xC7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD9, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDA, 0xFB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDC, 0x20, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDD, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDE, 0x54, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDF, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE0, 0x6D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE1, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE2, 0x80, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE3, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE4, 0x81, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE5, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE6, 0xC7, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE7, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE8, 0xF0, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEA, 0xF8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEC, 0xFD, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xED, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEE, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF0, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF1, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF2, 0x0B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF3, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF4, 0x0D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF5, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF6, 0x4A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF7, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF8, 0x71, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xF9, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFA, 0x8C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xA1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0xB6, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0xC9, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0xFD, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x09, 0x29, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0A, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0B, 0x6B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0C, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0D, 0x9E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0E, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0F, 0xEB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x25, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x27, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x15, 0x5C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x16, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0x95, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x19, 0xBA, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1A, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1B, 0xEC, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1C, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1D, 0x0C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1E, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1F, 0x34, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x21, 0x3F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x22, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x23, 0x48, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x24, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x25, 0x49, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x27, 0x6B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x28, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x29, 0x7E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2A, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2B, 0x8F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x2F, 0x9E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x30, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x31, 0xA0, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x32, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x33, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x34, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x35, 0x0B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x36, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x37, 0x0D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x38, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x39, 0x4A, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3A, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3B, 0x71, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3D, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3F, 0x8C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x41, 0xA1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x43, 0xB6, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x44, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x45, 0xC9, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x47, 0xFD, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x48, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x49, 0x29, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4A, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4B, 0x6B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4C, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4D, 0x9E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4E, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4F, 0xEB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x51, 0x25, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x52, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x53, 0x27, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x54, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x55, 0x5C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x56, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x95, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x59, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5A, 0xBA, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5B, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5C, 0xEC, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5E, 0x0C, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5F, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x60, 0x34, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x61, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x62, 0x3F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x63, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x64, 0x48, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x65, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x66, 0x49, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x67, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x68, 0x6B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x69, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6A, 0x7E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6B, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6C, 0x8F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6E, 0x9E, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6F, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x70, 0xA0, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x71, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x72, 0xFB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x73, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x74, 0xFD, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x75, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x76, 0x05, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x79, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7A, 0x17, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7B, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7C, 0x1F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7D, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7E, 0x28, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x32, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x81, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0x38, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x84, 0x53, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x85, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x86, 0x72, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x87, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x88, 0x9B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x89, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8A, 0xC3, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8B, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8C, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8D, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8E, 0x36, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8F, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x90, 0x37, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x91, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x92, 0x69, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x93, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x94, 0xA1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x95, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x96, 0xC8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x97, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x98, 0xFF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x99, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9A, 0x26, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9B, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9C, 0x69, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9D, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9E, 0x88, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9F, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA0, 0xF8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA2, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA3, 0xF9, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA4, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA5, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA6, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA7, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xA9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAA, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAC, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAD, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAE, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xAF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB0, 0xFB, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB1, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB2, 0xFD, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB3, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB4, 0x05, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB5, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB6, 0x0D, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB7, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB8, 0x17, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xB9, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBA, 0x1F, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBC, 0x28, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBD, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBE, 0x32, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xBF, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC0, 0x38, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC1, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC2, 0x53, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC3, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC4, 0x72, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC5, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC6, 0x9B, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC7, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC8, 0xC3, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xC9, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCA, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCB, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCC, 0x36, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCD, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCE, 0x37, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xCF, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD0, 0x69, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD1, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD2, 0xA1, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD3, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD4, 0xC8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD5, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD6, 0xFF, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD7, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD8, 0x26, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDA, 0x69, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDB, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDC, 0x88, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDD, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDE, 0xF8, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xDF, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE0, 0xF9, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE1, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE2, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE3, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE4, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE5, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE6, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE7, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE8, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE9, 0x03, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xEA, 0xFE, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x02, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x04, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD3, 0x14, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xD4, 0x14, - 0x29, 0x01, 0x00, 0x00, 0x96, 0x00, 0x02, 0x11, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x35, 0x00, - 0x29, 0x01, 0x00, 0x00, 0x78, 0x00, 0x02, 0x29, 0x00"</OnCommand> - <OffCommand>"0x05, 0x01, 0x00, 0x00, 0x32, 0x00, 0x02, 0x28, 0x00, - 0x05, 0x01, 0x00, 0x00, 0x78, 0x00, 0x02, 0x10, 0x00"</OffCommand> - <OnCommandState>0</OnCommandState> - <OffCommandState>1</OffCommandState> - - <!-- Video mode panel information --> - <HSyncPulse>1</HSyncPulse> - <HFPPowerMode>0</HFPPowerMode> - <HBPPowerMode>0</HBPPowerMode> - <HSAPowerMode>0</HSAPowerMode> - <BLLPEOFPowerMode>1</BLLPEOFPowerMode> - <BLLPPowerMode>1</BLLPPowerMode> - <TrafficMode>2</TrafficMode> - <DMADelayAfterVsync>0</DMADelayAfterVsync> - <BLLPEOFPower>0x9</BLLPEOFPower> - - <!-- Lane Configuration --> - <DSILanes>4</DSILanes> - <DSILaneMap>0</DSILaneMap> - <Lane0State>1</Lane0State> - <Lane1State>1</Lane1State> - <Lane2State>1</Lane2State> - <Lane3State>1</Lane3State> - - <!-- Panel Timing --> - <PanelTimings>"0xf9, 0x3d, 0x34, 0x00, 0x58, 0x4d, 0x36, 0x3f, 0x53, 0x03, 0x04, 0x00"</PanelTimings> - <DSIMDPTrigger>0</DSIMDPTrigger> - <DSIDMATrigger>4</DSIDMATrigger> - <TClkPost>0x1e</TClkPost> - <TClkPre>0x38</TClkPre> - - <!-- Backlight --> - <BLInterfaceType>1</BLInterfaceType> - <BLMinLevel>1</BLMinLevel> - <BLMaxLevel>4095</BLMaxLevel> - <BLStep>100</BLStep> - <BLPMICModel>"PMIC_8941"</BLPMICModel> - <BLPMICControlType>1</BLPMICControlType> - - <!-- Panel Reset Sequence --> - <ResetSequence> - <PinState1>1</PinState1> - <PulseWidth1>20</PulseWidth1> - <PinState2>0</PinState2> - <PulseWidth2>2</PulseWidth2> - <PinState3>1</PinState3> - <PulseWidth3>20</PulseWidth3> - <EnableBit>2</EnableBit> - </ResetSequence> - - </PanelEntry> -</GCDB> - diff --git a/common/display/tools/parser.pl b/common/display/tools/parser.pl deleted file mode 100755 index 7d91d1a0..00000000 --- a/common/display/tools/parser.pl +++ /dev/null @@ -1,1622 +0,0 @@ -# Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# parser.pl -use XML::LibXML; -use IO::Handle; -use warnings; -use strict; - -# initialize the parser -my $parser = new XML::LibXML; - -# open a filehandle and parse -my $fh = new IO::Handle; - -my $name = ""; -my $nameinH = ""; -my $Version = ""; -my $xmldoc = $parser->parse_file($ARGV[0]); -if(scalar @ARGV < 2) -{ - print "2 command line arguments required.\n"; - print "1:XML Document to parse\n"; - print "2:[Panel|Platform]\n"; - print "Example: perl parse.pl Panel.xml Panel\n"; - exit 1; -} - -if(uc($ARGV[1]) eq "PANEL") -{ - for my $property($xmldoc->findnodes('/GCDB/Version')) - { - $Version = $property->textContent(); - } - - for my $property($xmldoc->findnodes('/GCDB/PanelId')) - { - $name = $property->textContent(); - } - - open (my $PANELDTSI, '>dsi-panel-' . $name . '.dtsi'); - - for my $property($xmldoc->findnodes('/GCDB/PanelH')) - { - $nameinH = $property->textContent(); - } - open (my $PANELH, '>panel_' . $nameinH . '.h'); - printheader($PANELH); - print $PANELH "\n#ifndef _PANEL_". uc($nameinH) . "_H_\n"; - print $PANELH "#define _PANEL_". uc($nameinH) . "_H_\n"; - printdtsheader($PANELDTSI, $nameinH); - - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry/PanelName')) - { - print $PANELDTSI "\t\tqcom,mdss-dsi-panel-name = " - . $property->textContent() . ";\n"; - } - printSectionHeader($PANELH, "HEADER files"); - - print $PANELH "#include \"panel.h\"\n\n"; - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry/PanelController')) - { - (my $controllerName) = $property->textContent() =~ /"([^"]*)"/; - print $PANELDTSI "\t\tqcom,mdss-dsi-panel-controller = <&" - . $controllerName . ">;\n"; - } - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry')) - { - my @attrs = ("PanelType"); - foreach(@attrs) - { - push(my @tmp, $_); - printPanelType($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-panel-type"); - } - for my $dest($xmldoc->findnodes('/GCDB/PanelEntry/PanelDestination')) - { - print $PANELDTSI "\t\tqcom,mdss-dsi-panel-destination = " - . lc($dest->textContent()) . ";\n"; - } - @attrs = ("PanelWithEnableGPIO", "BitClockFrequency", - "PanelClockrate", "PanelFrameRate", "DSIVirtualChannelId", - "DSIInitMasterTime", "DSIStream", - "PanelWidth", "PanelHeight", "HFrontPorch", - "HBackPorch", "HPulseWidth", "HSyncSkew", "VBackPorch", - "VFrontPorch", "VPulseWidth", "HLeftBorder", "HRightBorder", - "VTopBorder", "VBottomBorder", "HActiveRes", "VActiveRes", - "ColorFormat", "ColorOrder", "UnderFlowColor", "BorderColor", - "PanelOperatingMode", "PixelPacking", "PixelAlignment"); - - foreach(@attrs) - { - push(my @tmp, $_); - my $val = $_; - $val =~ s/DSI//g; - $val = convertLower($val); - - - if($_ eq "ColorFormat") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-bpp"); - } - elsif($_ eq "PanelWithEnableGPIO") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-panel-with-enable-gpio"); - } - elsif($_ eq "UnderFlowColor") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-underflow-color"); - } - elsif($_ eq "PanelFrameRate") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-panel-framerate"); - } - elsif($_ eq "PixelPacking") - { - printPixelPacking($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-pixel-packing"); - } - elsif($_ eq "ColorOrder") - { - printColorOrder($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-color-order"); - } - else - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-" . $val); - } - } - - my @panelConfigAttrs = ("PanelController", - "PanelCompatible", "PanelInterface", "PanelType", - "PanelDestination", "PanelOrientation", "PanelClockrate", - "PanelFrameRate", "PanelChannelId", "DSIVirtualChannelId", - "PanelBroadcastMode", "DSILP11AtInit", "DSIInitMasterTime", - "DSIStream", "InterleaveMode","BitClockFrequency", - "PanelOperatingMode", "PanelWithEnableGPIO"); - - printSectionHeader($PANELH, "Panel configuration"); - printDataStruct($PANELH, \@panelConfigAttrs, $property, - "panel_config", lc($nameinH) . "_panel_data", - "qcom,mdss_dsi_" .lc($nameinH)); - } - - print $PANELH "\n\n"; - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry')) - { - my @panelConfigAttrs = ("PanelWidth", "PanelHeight", - "HFrontPorch", "HBackPorch", "HPulseWidth", "HSyncSkew", - "VFrontPorch", "VBackPorch", "VPulseWidth", "HLeftBorder", - "HRightBorder", "VTopBorder", "VBottomBorder", "HActiveRes", - "VActiveRes", "InvertDataPolarity", "InvertVsyncPolarity", - "InvertHsyncPolarity"); - - printSectionHeader($PANELH, "Panel resolution"); - printStruct($PANELH, \@panelConfigAttrs, $property, - "panel_resolution", lc($nameinH) . "_panel_res"); - print $PANELH "\n"; - } - - print $PANELH "\n"; - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry')) - { - printSectionHeader($PANELH, "Panel color information" ); - my @panelConfigAttrs = ("ColorFormat", "ColorOrder", - "UnderFlowColor", "BorderColor", "PixelPacking", - "PixelAlignment"); - - printStruct($PANELH, \@panelConfigAttrs, $property, - "color_info", lc($nameinH) . "_color"); - print $PANELH "\n"; - } - - print $PANELH "\n"; - printSectionHeader($PANELH, "Panel on/off command information" ); - - for my $property ($xmldoc->findnodes('/GCDB/PanelEntry/OnCommand')) - { - printOnCommand($PANELH, $property, lc($nameinH) . - "_on_command", lc($nameinH) . "_on_cmd"); - print $PANELH "\n\n"; - printHexArray($PANELDTSI, $property, "qcom,mdss-dsi-on-command"); - } - for my $property ($xmldoc->findnodes('/GCDB/PanelEntry/OffCommand')) - { - printOnCommand($PANELH, $property, lc($nameinH) . - "_off_command", lc($nameinH) . "off_cmd"); - print $PANELH "\n\n"; - printHexArray($PANELDTSI, $property, "qcom,mdss-dsi-off-command"); - } - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry')) - { - my @commandAttrs = ("OnCommandState", "OffCommandState"); - printStruct($PANELH, \@commandAttrs, $property, - "command_state", lc($nameinH) . "_state"); - print $PANELH "\n\n"; - - foreach(@commandAttrs) - { - push(my @tmp, $_); - my $lower = convertLower($_); - printCommandState($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-" . $lower); - } - - my @attrs = ("HSyncPulse",); - - foreach(@attrs) - { - push(my @tmp, $_); - my $lower = $_; - $lower =~ s/DSI//g; - $lower = convertLower($lower); - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-" . $lower); - } - - @attrs = ("TrafficMode",); - foreach(@attrs) - { - push(my @tmp, $_); - printTrafficMode($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-traffic-mode"); - } - - @attrs = ("DSILaneMap",); - foreach(@attrs) - { - push(my @tmp, $_); - printLaneMap($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-lane-map"); - } - - @attrs = ("BLLPEOFPowerMode"); - foreach(@attrs) - { - push(my @tmp, $_); - printBoolean($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-bllp-eof-power-mode"); - } - - @attrs = ("BLLPPowerMode"); - foreach(@attrs) - { - push(my @tmp, $_); - printBoolean($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-bllp-power-mode"); - } - - @attrs = ("PanelBroadcastMode", "HFPPowerMode", "HBPPowerMode", - "HSAPowerMode", - "Lane0State", "Lane1State", "Lane2State", "Lane3State"); - - foreach(@attrs) - { - push(my @tmp, $_); - my $lower = $_; - $lower =~ s/DSI//g; - if(index($_, "PowerMode") != -1) - { - substr($lower, 0, index($_, "PowerMode")) = lc(substr($lower, 0, index($_, "PowerMode"))); - } - elsif(index($lower, "Lane") != -1) - { - $lower = substr($lower, 0, 4) . "-" . substr($lower, 4, 1) . "-" . substr($lower, 5, 5); - $lower = lc($lower); - } - else - { - $lower = convertLower($lower); - } - printBoolean($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-" . $lower); - } - } - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry')) - { - my @attrs = ("TECheckEnable", "TEPinSelect", "TEUsingTEPin", - "AutoRefreshEnable", "AutoRefreshFrameNumDiv", - "TEvSyncRdPtrIrqLine", "TEvSyncContinuesLines", - "TEvSyncStartLineDivisor", "TEPercentVariance", "TEDCSCommand", - "DisableEoTAfterHSXfer", "CmdModeIdleTime"); - - printSectionHeader($PANELH, "Command mode panel information"); - printStruct($PANELH, \@attrs, $property, "commandpanel_info", - lc($nameinH) . "_command_panel"); - print $PANELH "\n\n"; - - @attrs = ("TEPinSelect", "AutoRefreshEnable", "AutoRefreshFrameNumDiv", - "TEvSyncRdPtrIrqLine", "TEvSyncContinuesLines", - "TEvSyncStartLineDivisor", "TEPercentVariance", "TEDCSCommand", - "DisableEoTAfterHSXfer", "CmdModeIdleTime"); - - foreach(@attrs) - { - push(my @tmp, $_); - if($_ eq "TEPinSelect") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-te-pin-select"); - } - elsif($_ eq "TEvSyncRdPtrIrqLine") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-te-v-sync-rd-ptr-irq-line"); - } - elsif($_ eq "TEvSyncContinuesLines") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-te-v-sync-continues-lines"); - } - elsif($_ eq "TEvSyncStartLineDivisor") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-te-v-sync-start-line-divisor"); - } - elsif($_ eq "TEPercentVariance") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-te-percent-variance"); - } - elsif($_ eq "TEDCSCommand") - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-te-dcs-command"); - } - else - { - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-" . convertLower($_)); - } - } - - @attrs = ("TECheckEnable", "TEUsingTEPin"); - foreach(@attrs) - { - if($_ eq "TECheckEnable") - { - push(my @tmp, $_); - printBoolean($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-te-check-enable"); - } - elsif($_ eq "TEUsingTEPin") - { - push(my @tmp, $_); - printBoolean($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-te-using-te-pin"); - } - } - - } - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry')) - { - my @commandAttrs = ("HSyncPulse", "HFPPowerMode", "HBPPowerMode", - "HSAPowerMode", "BLLPEOFPowerMode", "BLLPPowerMode", - "TrafficMode", "DMADelayAfterVsync", "BLLPEOFPower"); - - printSectionHeader($PANELH, "Video mode panel information"); - printStruct($PANELH, \@commandAttrs, $property, - "videopanel_info", lc($nameinH) . "_video_panel"); - print $PANELH "\n\n"; - } - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry')) - { - printSectionHeader($PANELH, "Lane configuration"); - my @commandAttrs = ("DSILanes", "DSILaneMap", "Lane0State", - "Lane1State", "Lane2State", "Lane3State"); - - printStruct($PANELH, \@commandAttrs, $property, - "lane_configuration", lc($nameinH) . "_lane_config"); - print $PANELH "\n\n"; - - } - - for my $property ($xmldoc->findnodes('/GCDB/PanelEntry/PanelTimings')) - { - printSectionHeader($PANELH, "Panel timing"); - printTargetPhysical($PANELH, $property, lc($nameinH) . - "_timings","uint32_t"); - print $PANELH "\n\n"; - printHexArray($PANELDTSI, $property, - "qcom,mdss-dsi-panel-timings"); - } - - for my $property ($xmldoc->findnodes('/GCDB/PanelEntry/PanelRotation')) - { - printSectionHeader($PANELH, "Panel rotation"); - printOnCommand($PANELH, $property, lc($nameinH) . - "_rotation", lc($nameinH) . "_rotation_cmd"); - print $PANELH "\n\n"; - printHexArray($PANELDTSI, $property, - "qcom,mdss-dsi-panelrotation"); - } - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry')) - { - my @timingAttrs = ("DSIMDPTrigger", "DSIDMATrigger", - "TClkPost", "TClkPre"); - - printStruct($PANELH, \@timingAttrs, $property, "panel_timing", - lc($nameinH) . "_timing_info"); - print $PANELH "\n\n"; - } - - for my $tmpProperty($xmldoc->findnodes('/GCDB/PanelEntry/ResetSequence')) - { - printSectionHeader($PANELH, "Panel reset sequence"); - print $PANELH "static struct panel_reset_sequence " . - lc($nameinH) . "_reset_seq = {\n\t"; - - printResetSeqinH($PANELH, $tmpProperty); - print $PANELH "\n" - } - - for my $property($xmldoc->findnodes('/GCDB/PanelEntry')) - { - my @timingAttrs = ("BLInterfaceType", "BLMinLevel", - "BLMaxLevel", "BLStep", "BLPMICControlType", "BLPMICModel"); - - printSectionHeader($PANELH, "Backlight setting"); - printStruct($PANELH, \@timingAttrs, $property, "backlight", - lc($nameinH) . "_backlight"); - print $PANELH "\n"; - - my @attrs = ("TClkPost", "TClkPre"); - - foreach(@attrs) - { - push(my @tmp, $_); - my $lower = $_; - $lower =~ s/DSI//g; - $lower = convertLower($lower); - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-" . $lower); - } - - @attrs = ("BLMinLevel"); - foreach(@attrs) - { - push(my @tmp, $_); - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-bl-min-level"); - } - @attrs = ("BLMaxLevel"); - foreach(@attrs) - { - push(my @tmp, $_); - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-bl-max-level"); - } - @attrs = ("BLPMICPWMFrequency"); - foreach(@attrs) - { - push(my @tmp, $_); - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-bl-pmic-pwm-frequency"); - } - @attrs = ("BLPMICBankSelect"); - foreach(@attrs) - { - push(my @tmp, $_); - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-bl-pmic-bank-select"); - } - @attrs = ("DSIDMATrigger"); - foreach(@attrs) - { - push(my @tmp, $_); - printTrigger($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-dma-trigger"); - } - @attrs = ("DSIMDPTrigger"); - foreach(@attrs) - { - push(my @tmp, $_); - printTrigger($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-mdp-trigger"); - } - - @attrs = ("BLPMICControlType"); - foreach(@attrs) - { - push(my @tmp, $_); - printControlType($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-bl-pmic-control-type"); - } - - @attrs = ("PanPhysicalWidthDimension", - "PanPhysicalHeightDimension"); - foreach(@attrs) - { - push(my @tmp, $_); - my $lower = $_; - $lower = convertLower($lower); - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-" . $lower); - } - - my @attr = ("FBCbpp", "FBCPacking", - "FBCBias", - "FBCHLineBudget", "FBCBlockBudget", - "FBCLosslessThreshold", "FBCLossyThreshold", "FBCRGBThreshold", - "FBCLossyModeIdx"); - - foreach(@attr) - { - push(my @tmp, $_); - my $lower = convertLower($_); - printArray($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-" . $lower); - } - - @attr = ("FBCEnable", "FBCQuantError", "FBCPATMode", "FBCVLCMode", - "FBCBFLCMode"); - foreach(@attr) - { - push(my @tmp, $_); - my $lower = convertLower($_); - printBoolean($PANELDTSI, \@tmp, $property, - "qcom,mdss-dsi-" . $lower); - } - for my $tmpProperty ($xmldoc->findnodes('/GCDB/PanelEntry/ResetSequence')) - { - print $PANELDTSI "\t"; - printResetSeq($PANELDTSI, $tmpProperty, - "qcom,mdss-dsi-reset-sequence"); - print $PANELDTSI "\n"; - } - } - - print $PANELH "\n#endif /*_PANEL_" . uc($nameinH) . "_H_*/\n"; - print $PANELDTSI "\t};\n};\n"; - close ($PANELH); - close ($PANELDTSI); -} -elsif(uc($ARGV[1]) eq "PLATFORM") -{ - for my $property($xmldoc->findnodes('/GCDB/Version')) - { - $Version = $property->textContent(); - } - - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/PlatformId')){ - ($name) = $property->textContent() =~ /"([^"]*)"/; - } - - open (my $PLATFORMDTSI, '>platform-' . $name . '.dtsi'); - open (my $PLATFORMH, '>platform_' . $name . '.h'); - print $PLATFORMDTSI "/*\n " . $name . " target DTSI file.\n*/\n{\n"; - print $PLATFORMDTSI "\tqcom,platform = \"" . $name . "\";\n"; - - printheader($PLATFORMH); - print $PLATFORMH "\n#ifdef _PLATFORM_" . uc($name) . "_H_\n"; - - printSectionHeader($PLATFORMH, "HEADER files"); - print $PLATFORMH "#include <display_resource.h>\n\n"; - printSectionHeader($PLATFORMH, "GPIO configuration"); - - my @gpioConfAttrs = ("PinSource", "PinId", "PinStrength", - "PinDirection", "Pull", "PinState"); - - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/ResetGPIO')) - { - printStruct($PLATFORMH, \@gpioConfAttrs, $property, "gpio_pin", - "reset_gpio"); - print $PLATFORMH "\n\n"; - - printGPIO($PLATFORMDTSI, $property, "qcom,platform-reset-gpio"); - } - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/EnableGPIO')) - { - printStruct($PLATFORMH, \@gpioConfAttrs, $property, "gpio_pin", - "enable_gpio"); - print $PLATFORMH "\n\n"; - - printGPIO($PLATFORMDTSI, $property, "qcom,platform-enable-gpio"); - } - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/TEGPIO')) - { - printStruct($PLATFORMH, \@gpioConfAttrs, $property, "gpio_pin", - "te_gpio"); - print $PLATFORMH "\n\n"; - - printGPIO($PLATFORMDTSI, $property, "qcom,platform-te-gpio"); - } - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/ModeGPIO')) - { - printStruct($PLATFORMH, \@gpioConfAttrs, $property, "gpio_pin", - "mode_gpio"); - print $PLATFORMH "\n\n"; - - printGPIO($PLATFORMDTSI, $property, "qcom,platform-mode-gpio"); - } - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/BacklightGPIO')) - { - printStruct($PLATFORMH, \@gpioConfAttrs, $property, - "gpio_pin", "bklight_gpio"); - print $PLATFORMH "\n\n"; - - printGPIO($PLATFORMDTSI, $property, "qcom,platform-bklight-gpio"); - } - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/PWMGPIO')) - { - printStruct($PLATFORMH, \@gpioConfAttrs, $property, "gpio_pin", - "pwm_gpio"); - print $PLATFORMH "\n\n"; - - printGPIO($PLATFORMDTSI, $property, "qcom,platform-pwm-gpio"); - } - printSectionHeader($PLATFORMH, "Supply configuration"); - print $PLATFORMH "static struct ldo_entry ldo_entry_array[] = {\n "; - my @ldoEntryAttrs = ("SupplyName", "SupplyMinVoltage", "SupplyMaxVoltage", - "SupplyEnableLoad", "SupplyDisableLoad", "SupplyPreOnSleep", - "SupplyPostOnSleep", "SupplyPreOffSleep", "SupplyPostOffSleep"); - my @ldoEntryAttrsinH = ("SupplyName", "SupplyId", "SupplyType", "SupplyMaxVoltage", - "SupplyEnableLoad", "SupplyDisableLoad","SupplyPreOnSleep", - "SupplyPostOnSleep", "SupplyPreOffSleep", "SupplyPostOffSleep"); - my $ldocounter = 0; - - for (my $i = 1; $i <= 5; $i++) - { - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/SupplyEntry' . $i)) - { - printSupplyinH($PLATFORMH, \@ldoEntryAttrsinH, $property); - $ldocounter++; - - printSupplyEntry($PLATFORMDTSI, \@ldoEntryAttrs, $property, - "qcom,platform-supply-entry" . $i); - } - } - - print $PLATFORMH "};\n\n"; - print $PLATFORMH "#define TOTAL_LDO_DEFINED " . $ldocounter . "\n\n"; - - printSectionHeader($PLATFORMH, "Target Physical configuration"); - print $PLATFORMH "\n"; - print $PLATFORMDTSI "\n"; - - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/PanelStrengthCtrl')) - { - printTargetPhysical($PLATFORMH, $property, "panel_strength_ctrl", "uint32_t"); - print $PLATFORMH "\n\n"; - - printHexArray($PLATFORMDTSI, $property, "qcom,platform-strength-ctrl"); - } - - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/PanelBISTCtrl')) - { - printTargetPhysical($PLATFORMH, $property, "panel_bist_ctrl", "char"); - print $PLATFORMH "\n\n"; - - printHexArray($PLATFORMDTSI, $property, "qcom,platform-bist-ctrl"); - } - - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/PanelRegulatorSettings')) - { - printTargetPhysical($PLATFORMH, $property, "panel_regulator_settings", "uint32_t"); - print $PLATFORMH "\n\n"; - - printHexArray($PLATFORMDTSI, $property, "qcom,platform-regulator-settings"); - } - - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/PanelLaneConfig')) - { - printTargetPhysical($PLATFORMH, $property, "panel_lane_config", "char"); - print $PLATFORMH "\n\n"; - - printHexArray($PLATFORMDTSI, $property, "qcom,platform-lane-config"); - } - - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/PanelPhysicalCtrl')) - { - printTargetPhysical($PLATFORMH, $property, "panel_physical_ctrl", "uint32_t"); - print $PLATFORMH "\n\n"; - - printHexArray($PLATFORMDTSI, $property, "qcom,platform-physical-ctrl"); - } - - printSectionHeader($PLATFORMH, "Other Configuration"); - print $PLATFORMH "\n"; - print $PLATFORMDTSI "\n"; - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/ContinuousSplash')) - { - my $splash = $property->textContent(); - print $PLATFORMH "#define " . $name . "_CONTINUOUS_SPLASH " . $splash . "\n\n"; - - my @attrs = ("ContinuousSplash"); - printArray($PLATFORMDTSI, \@attrs, $xmldoc->findnodes('/GCDB/PlatformEntry'), - "qcom,platform-continuous-splash"); - } - for my $property ($xmldoc->findnodes('/GCDB/PlatformEntry/DSIFeatureEnable')) - { - my $dsi = $property->textContent(); - print $PLATFORMH "#define " . $name . "_DSI_FEATURE_ENABLE " . $dsi . "\n"; - - my @attrs = ("DSIFeatureEnable"); - printArray($PLATFORMDTSI, \@attrs, $xmldoc->findnodes('/GCDB/PlatformEntry'), - "qcom,platform-dsi-feature-enable"); - } - - print $PLATFORMH "\n#endif /*_PLATFORM_" . uc($name) . "_H_*/\n"; - print $PLATFORMDTSI "};\n"; - - close ($PLATFORMH); - close ($PLATFORMDTSI); -} - - -sub printHexArray -{ - my $fh = shift; - my $property = shift; - my $name = shift; - (my $element) = $property->textContent() =~ /"([^"]*)"/; - $element =~ s/,//g; - $element =~ s/0x//g; - print $fh "\t\t" . $name . " = [" . $element . "];\n"; - -} - -sub printTargetPhysical -{ - my $fh = shift; - my $property = shift; - my $name = shift; - my $datatype = shift; - (my $element) = $property->textContent() =~ /"([^"]*)"/; - print $fh "static const " . $datatype . " " . $name . "[] = {\n\t"; - $element =~ s/\t//g; - $element =~ s/^//mg; - print $fh $element . "\n};"; -} - -sub printOnCommand -{ - my $fh = shift; - my $property = shift; - my $name = shift; - my $cmdname = shift; - (my $element) = $property->textContent() =~ /"([^"]*)"/; - my @lines = split /\n/, $element; - my $toPrint = ""; - my $i = 0; - foreach my $line (@lines) - { - my @sep = split /,/, $line; - print $fh "static char " . $cmdname . $i . "[] = {\n"; - $toPrint = "\t"; - if(scalar @sep > 7) - { - my $cmdlen = $sep[6]; - my $cmdtype = $sep[0]; - $cmdtype =~ s/ //g; - $cmdtype =~ s/\t//g; - $cmdlen =~ s/ //g; - $cmdlen =~ s/\t//g; - if($cmdtype eq "0x29" || $cmdtype eq "0x39") - { - $toPrint .= $cmdlen . ", 0x00, " . $cmdtype . ", 0xC0,\n\t"; - } - my $j = 0; - - for(my $i = 7; $i < scalar @sep; $i++) - { - my $tmp = $sep[$i]; - $tmp =~ s/ //g; - $tmp =~ s/\t//g; - if($tmp ne "") - { - $toPrint .= $tmp . ", "; - $j++; - } - if (($j % 4) == 0) - { - chop($toPrint); - $toPrint .= "\n\t"; - } - } - if($cmdtype eq "0x29" || $cmdtype eq "0x39") - { - if ( ($j % 4) ne 0) - { - for( ; ($j % 4) ne 0 ; $j++) - { - $toPrint .= "0xFF, "; - } - chop($toPrint); - $toPrint .= "\n"; - } - else - { - chop($toPrint); - } - } - else - { - for( ; ($j % 2) ne 0 ; $j++) - { - $toPrint .= "0xFF, "; - } - $toPrint .= $cmdtype . ", 0x80\n"; - } - $toPrint .= "};\n" - } - $i++; - - $toPrint .= "\n"; - print $fh $toPrint ; - } - - print $fh "static struct mipi_dsi_cmd " . $name . "[] = {\n"; - my $bool = 0; - $toPrint = ""; - $i = 0; - - foreach my $line (@lines) - { - my @sep = split /,/, $line; - - $toPrint .= "\t"; - - if(scalar @sep > 7) - { - my $cmdtype = $sep[0]; - $cmdtype =~ s/ //g; - $cmdtype =~ s/\t//g; - - my $cmdsize = 0; - my $hexsize = 0; - - if($cmdtype eq "0x29" || $cmdtype eq "0x39") - { - my $j = 0; - for(my $i = 7; $i < scalar @sep; $i++) - { - my $tmp = $sep[$i]; - $tmp =~ s/ //g; - $tmp =~ s/\t//g; - if($tmp ne "") - { - $cmdsize += 1; - $j++; - } - } - for( ; ($j % 4) ne 0 ; $j++) - { - $cmdsize += 1; - } - - # calculate the correct size of command - $hexsize = sprintf("{0x%x, ", $cmdsize + 4); - } - else - { - $hexsize = sprintf("{0x%x, ", 4); - } - - $toPrint .= $hexsize; - - $toPrint .= $cmdname . $i . "," . $sep[4] . "},"; - - $i++; - } - - $toPrint .= "\n"; - } - chop($toPrint); - chop($toPrint); - $toPrint .= "\n"; - print $fh $toPrint . "};\n"; - - - print $fh "\n#define " . uc($name) . " " . $i . "\n"; -} - -sub printSupplyPower -{ - my $fh = shift; - my $property = shift; - my $toPrint = ""; - $toPrint .= "{ "; - for (my $i = 1; $i <=5; $i++) - { - for my $element ($property->findnodes("SupplyEntryId" . $i)) - { - $toPrint .= $element->textContent() . ", "; - } - } - $toPrint .= "}, { "; - for (my $i = 1; $i <=5; $i++) - { - for my $element ($property->findnodes("Sleep" . $i)) - { - $toPrint .= $element->textContent() . ", "; - } - } - $toPrint .= "}\n};"; - print $fh $toPrint; -} - -sub printResetSeqinH -{ - my $fh = shift; - my $property = shift; - print $fh "{"; - for (my $i = 1; $i <=5; $i++) - { - for my $element ($property->findnodes("PinState" . $i)) - { - print $fh $element->textContent() . ", "; - } - } - print $fh "}, {"; - for (my $i = 1; $i <=5; $i++) - { - for my $element ($property->findnodes("PulseWidth" . $i)) - { - print $fh $element->textContent() . ", "; - } - } - print $fh "}, "; - for my $element ($property->findnodes("EnableBit")) - { - print $fh $element->textContent(); - print $fh "\n};\n"; - } -} - -sub printResetSeq -{ - my $fh = shift; - my $property = shift; - my $name = shift; - print $fh "\t" . $name . " = "; - my $first = 1; - for (my $i = 1; $i <=5; $i++) - { - for my $element ($property->findnodes("./PinState" . $i)) - { - if($first == 1) - { - $first = 0; - } - else - { - print $fh ", "; - } - print $fh "<" . $element->textContent(); - } - for my $element ($property->findnodes("./PulseWidth" . $i)) - { - print $fh " "; - print $fh $element->textContent(); - print $fh ">"; - } - } - print $fh ";"; -} - -sub printSupplyinH -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $flag = 0; - print $fh "{ "; - foreach (@attrs) { - my $node = "./" . $_; - my $found = 0; - for my $element ($property->findnodes($node)) - { - $found = 1; - if($flag == 1) - { - print $fh ", "; - } - else - { - $flag = 1; - } - print $fh $element->textContent(); - } - if($found == 0) - { - if($flag == 1) - { - print $fh ", "; - } - else - { - $flag = 1; - } - print $fh 0; - } - } - print $fh "},\n"; -} - -sub convertLower -{ - my $input = shift; - for (my $i = 1; $i < length($input); $i++) { - if (ord(substr($input, $i, 1)) <= ord('Z')) - { - substr($input, $i, 1) = lc(substr($input, $i, 1)); - $input = substr($input, 0, $i) . '-' . substr($input, $i, length($input)); - } - } - return lc($input); -} - -sub printSupplyEntry -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - print $fh "\t" . $name . " {\n"; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - if ($element->textContent() =~ /\D/) - { - print $fh "\t\tqcom," . convertLower($_) . " = " . $element->textContent() . ";\n"; - } - else - { - print $fh "\t\tqcom," . convertLower($_) . " = <" . $element->textContent() . ">;\n"; - } - } - } - print $fh "\t};\n\n"; -} - -sub printArray -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - print $fh "\t\t" . $name . " = <"; - if($first == 1) - { - $first = 0; - } - else - { - print $fh " "; - } - print $fh $element->textContent() . ">;\n"; - } - } -} - -sub printControlType -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - print $fh "\t\t" . $name . " = \""; - if($element->textContent() eq "0") - { - print $fh "bl_ctrl_pwm"; - } - elsif($element->textContent() eq "1") - { - print $fh "bl_ctrl_wled"; - } - elsif($element->textContent() eq "2") - { - print $fh "bl_ctrl_dcs"; - } - print $fh "\";\n"; - } - } -} - -sub printCommandState -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - print $fh "\t\t" . $name . " = \""; - if($element->textContent() eq "0") - { - print $fh "dsi_lp_mode"; - } - else - { - print $fh "dsi_hs_mode"; - } - print $fh "\";\n"; - } - } -} - -sub printTrigger -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - print $fh "\t\t" . $name . " = \""; - my $str = $element->textContent(); - if ($str =~ /0x0.$/) { - $str =~ s/0x0//; - } - $str =~ s/0x//; - if($str eq "0") - { - print $fh "none"; - } - elsif($str eq "2") - { - print $fh "trigger_te"; - } - elsif($str eq "4") - { - print $fh "trigger_sw"; - } - elsif($str eq "5") - { - print $fh "trigger_sw_seof"; - } - elsif($str eq "6") - { - print $fh "trigger_sw_te"; - } - print $fh "\";\n"; - } - } -} - -sub printPixelPacking -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - my $str = $element->textContent(); - if ($str =~ /0x0.$/) { - $str =~ s/0x0//; - } - $str =~ s/0x//; - print $fh "\t\t" . $name . " = \""; - if($str eq "1") - { - print $fh "loose"; - } - elsif($str eq "0") - { - print $fh "tight"; - } - print $fh "\";\n"; - } - } -} - -sub printTrafficMode -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - print $fh "\t\t" . $name . " = \""; - my $str = $element->textContent(); - if ($str =~ /0x0.$/) { - $str =~ s/0x0//; - } - $str =~ s/0x//; - if($str eq "0") - { - print $fh "non_burst_sync_pulse"; - } - elsif($str eq "1") - { - print $fh "non_burst_sync_event"; - } - elsif($str eq "2") - { - print $fh "burst_mode"; - } - print $fh "\";\n"; - } - } -} - -sub printColorOrder -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - print $fh "\t\t" . $name . " = \""; - my $str = $element->textContent(); - if ($str =~ /0x0.$/) { - $str =~ s/0x0//; - } - $str =~ s/0x//; - if($str eq "0") - { - print $fh "rgb_swap_rgb"; - } - elsif($str eq "1") - { - print $fh "rgb_swap_rbg"; - } - elsif($str eq "2") - { - print $fh "rgb_swap_bgr"; - } - elsif($str eq "3") - { - print $fh "rgb_swap_brg"; - } - elsif($str eq "4") - { - print $fh "rgb_swap_grb"; - } - elsif($str eq "5") - { - print $fh "rgb_swap_gbr"; - } - print $fh "\";\n"; - } - } -} - -sub printLaneMap -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - print $fh "\t\t" . $name . " = \""; - my $str = $element->textContent(); - if ($str =~ /0x0.$/) { - $str =~ s/0x0//; - } - $str =~ s/0x//; - if($str eq "0") - { - print $fh "lane_map_0123"; - } - elsif($str eq "1") - { - print $fh "lane_map_3012"; - } - elsif($str eq "2") - { - print $fh "lane_map_2301"; - } - elsif($str eq "3") - { - print $fh "lane_map_1230"; - } - elsif($str eq "4") - { - print $fh "lane_map_0321"; - } - elsif($str eq "5") - { - print $fh "lane_map_1032"; - } - elsif($str eq "6") - { - print $fh "lane_map_2103"; - } - elsif($str eq "7") - { - print $fh "lane_map_3210"; - } - print $fh "\";\n"; - } - } -} - -sub printPanelType -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - print $fh "\t\t" . $name . " = \""; - if($element->textContent() eq "0") - { - print $fh "dsi_video_mode"; - } - else - { - print $fh "dsi_cmd_mode"; - } - print $fh "\";\n"; - } - } -} - -sub printBoolean -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $name = shift; - my $first = 1; - foreach(@attrs) - { - for my $element ($property->findnodes("./" . $_)) - { - if($element->textContent() eq "1") - { - print $fh "\t\t" . $name ; - print $fh ";\n"; - } - } - } -} - -sub printGPIO -{ - my $fh = shift; - my $property = shift; - my $name = shift; - print $fh "\t" . $name . " = <"; - for my $element ($property->findnodes("./PinSource")) - { - print $fh "&"; - print $fh $element->textContent() =~ /"([^"]*)"/; - print $fh " "; - } - for my $element ($property->findnodes("./PinId")) - { - print $fh $element->textContent() . " "; - } - for my $element ($property->findnodes("./PinState")) - { - print $fh $element->textContent(); - } - print $fh ">;\n"; -} - - -sub printStruct -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $structName = shift; - my $name = shift; - print $fh "static struct " . $structName . " " . $name . " = {\n\t"; - my $flag = 0; - foreach (@attrs) { - my $node = "./" . $_; - my $found = 0; - for my $element ($property->findnodes($node)) - { - $found = 1; - if($flag == 1) - { - print $fh ", "; - } - else - { - $flag = 1; - } - print $fh $element->textContent(); - } - if($found == 0) - { - if($flag == 1) - { - print $fh ", "; - } - else - { - $flag = 1; - } - print $fh 0; - } - } - print $fh "\n};" -} - -sub printDataStruct -{ - my $fh = shift; - my $attrs = shift; - my @attrs = @$attrs; - my $property = shift; - my $structName = shift; - my $name = shift; - my $nameinDTS = shift; - print $fh "static struct " . $structName . " " . $name . " = {\n\t"; - my $flag = 0; - my $firsttime = 1; - print $fh "\"" . $nameinDTS . "\", "; - for my $element ($property->findnodes("./PanelController")) - { - my $controller = $element->textContent(); - if ($controller eq "\"mdss_dsi1\"") - { - print $fh "\"dsi:1:\", "; - } - else - { - print $fh "\"dsi:0:\", "; - } - } - shift(@attrs); - foreach (@attrs) { - my $node = "./" . $_; - my $found = 0; - for my $element ($property->findnodes($node)) - { - $found = 1; - if($flag == 1) - { - print $fh ", "; - } - else - { - $flag = 1; - } - print $fh $element->textContent(); - } - if($found == 0) - { - if($flag == 1) - { - print $fh ", "; - } - else - { - $flag = 1; - } - print $fh 0; - } - if ($firsttime == 1) - { - print $fh ",\n\t"; - $flag = 0; - } - $firsttime = 0; - } - print $fh "\n};" -} - -sub printSectionHeader -{ - my $fh = shift; - my $section = shift; - print $fh "/*---------------------------------------------------------------------------*/\n"; - print $fh "/* " . $section; - for (my $i = length($section); $i <= 73; $i++) { - print $fh " "; - } - print $fh "*/\n"; - print $fh "/*---------------------------------------------------------------------------*/\n"; -} - -sub printheader -{ - my $fh = shift; - print $fh "/* Copyright (c) 2013, The Linux Foundation. All rights reserved.\n"; - print $fh " *\n"; - print $fh " * Redistribution and use in source and binary forms, with or without\n"; - print $fh " * modification, are permitted provided that the following conditions\n"; - print $fh " * are met:\n"; - print $fh " * * Redistributions of source code must retain the above copyright\n"; - print $fh " * notice, this list of conditions and the following disclaimer.\n"; - print $fh " * * Redistributions in binary form must reproduce the above copyright\n"; - print $fh " * notice, this list of conditions and the following disclaimer in\n"; - print $fh " * the documentation and/or other materials provided with the\n"; - print $fh " * distribution.\n"; - print $fh " * * Neither the name of The Linux Foundation nor the names of its\n"; - print $fh " * contributors may be used to endorse or promote products derived\n"; - print $fh " * from this software without specific prior written permission.\n"; - print $fh " *\n"; - print $fh " * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n"; - print $fh " * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n"; - print $fh " * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n"; - print $fh " * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n"; - print $fh " * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n"; - print $fh " * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n"; - print $fh " * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS\n"; - print $fh " * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\n"; - print $fh " * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n"; - print $fh " * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n"; - print $fh " * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n"; - print $fh " * SUCH DAMAGE.\n"; - print $fh " */\n"; - print $fh "\n"; - print $fh "/*---------------------------------------------------------------------------\n"; - print $fh " * This file is autogenerated file using gcdb parser. Please do not edit it.\n"; - print $fh " * Update input XML file to add a new entry or update variable in this file\n"; - print $fh " * VERSION = " . $Version . "\n"; - print $fh " *---------------------------------------------------------------------------*/\n"; -} - -sub printdtsheader -{ - my $fh = shift; - my $name = shift; - - print $fh "/* Copyright (c) 2013, The Linux Foundation. All rights reserved.\n"; - print $fh " *\n"; - print $fh " * This program is free software; you can redistribute it and/or modify\n"; - print $fh " * it under the terms of the GNU General Public License version 2 and\n"; - print $fh " * only version 2 as published by the Free Software Foundation.\n"; - print $fh " *\n"; - print $fh " * This program is distributed in the hope that it will be useful,\n"; - print $fh " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n"; - print $fh " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"; - print $fh " * GNU General Public License for more details.\n"; - print $fh " */\n\n"; - print $fh "/*---------------------------------------------------------------------------\n"; - print $fh " * This file is autogenerated file using gcdb parser. Please do not edit it.\n"; - print $fh " * Update input XML file to add a new entry or update variable in this file\n"; - print $fh " * VERSION = " . $Version . "\n"; - print $fh " *---------------------------------------------------------------------------*/\n"; - - print $fh "&mdss_mdp {\n"; - print $fh "\tdsi_" . lc($name) . ": qcom,mdss_dsi_" . lc($name) . " {\n"; -} diff --git a/common/display/tools/platform-msm8610.xml b/common/display/tools/platform-msm8610.xml deleted file mode 100644 index 7ffdd552..00000000 --- a/common/display/tools/platform-msm8610.xml +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- -# Copyright (c) 2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# ---> - -<GCDB> - <Version>"1.0"</Version> - <PlatformEntry> - <PlatformId>"msm8610"</PlatformId> - <!-- GPIO configuration --> - <ResetGPIO> - <PinSource>"msmgpio"</PinSource> - <PinId>41</PinId> - <PinStrength>3</PinStrength> - <PinDirection>1</PinDirection> - <PinPull>0</PinPull> - <PinState>1</PinState> - </ResetGPIO> - <EnableGPIO> - <PinSource>"msmgpio"</PinSource> - <PinId>7</PinId> - <PinStrength>3</PinStrength> - <PinDirection>1</PinDirection> - <PinPull>0</PinPull> - <PinState>1</PinState> - </EnableGPIO> - <TEGPIO> - <PinSource>"msmgpio"</PinSource> - <PinId>12</PinId> - <PinStrength>0</PinStrength> - <PinDirection>2</PinDirection> - <PinPull>0</PinPull> - <PinState>1</PinState> - </TEGPIO> - <PWMGPIO> - </PWMGPIO> - <!-- Supply configuration --> - <SupplyEntry1> - <SupplyName>"vdd"</SupplyName> - <SupplyId>4</SupplyId> - <SupplyType>0</SupplyType> - <SupplyMinVoltage>1200000</SupplyMinVoltage> - <SupplyMaxVoltage>1200000</SupplyMaxVoltage> - <SupplyEnableLoad>100000</SupplyEnableLoad> - <SupplyDisableLoad>100</SupplyDisableLoad> - <SupplyPreOnSleep>0</SupplyPreOnSleep> - <SupplyPostOnSleep>20</SupplyPostOnSleep> - <SupplyPreOffSleep>0</SupplyPreOffSleep> - <SupplyPostOffSleep>20</SupplyPostOffSleep> - </SupplyEntry1> - <SupplyEntry2> - <SupplyName>"vddio"</SupplyName> - <SupplyId>14</SupplyId> - <SupplyType>0</SupplyType> - <SupplyMinVoltage>1800000</SupplyMinVoltage> - <SupplyMaxVoltage>1800000</SupplyMaxVoltage> - <SupplyEnableLoad>100000</SupplyEnableLoad> - <SupplyDisableLoad>100</SupplyDisableLoad> - <SupplyPreOnSleep>0</SupplyPreOnSleep> - <SupplyPostOnSleep>0</SupplyPostOnSleep> - <SupplyPreOffSleep>0</SupplyPreOffSleep> - <SupplyPostOffSleep>0</SupplyPostOffSleep> - </SupplyEntry2> - <SupplyEntry3> - <SupplyName>"vdda"</SupplyName> - <SupplyId>19</SupplyId> - <SupplyType>1</SupplyType> - <SupplyMinVoltage>2850000</SupplyMinVoltage> - <SupplyMaxVoltage>2850000</SupplyMaxVoltage> - <SupplyEnableLoad>100000</SupplyEnableLoad> - <SupplyDisableLoad>100</SupplyDisableLoad> - <SupplyPreOnSleep>0</SupplyPreOnSleep> - <SupplyPostOnSleep>0</SupplyPostOnSleep> - <SupplyPreOffSleep>0</SupplyPreOffSleep> - <SupplyPostOffSleep>0</SupplyPostOffSleep> - </SupplyEntry3> - - <!-- Physical configuration --> - <PanelStrengthCtrl> - "0xff, 0x06" - </PanelStrengthCtrl> - <PanelBISTCtrl> - "0x03, 0x03, 0x00, 0x00, 0x0f, 0x00" - </PanelBISTCtrl> - <PanelRegulatorSettings> - "0x02, 0x08, 0x05, 0x00, 0x20, 0x03, 0x00" - </PanelRegulatorSettings> - <PanelLaneConfig> - "0x80, 0x45, 0x00, 0x00, 0x01, 0x66, 0x00, 0x00, - 0x80, 0x45, 0x00, 0x00, 0x01, 0x66, 0x00, 0x00, - 0x80, 0x45, 0x00, 0x00, 0x01, 0x66, 0x00, 0x00, - 0x80, 0x45, 0x00, 0x00, 0x01, 0x66, 0x00, 0x00, - 0x40, 0x67, 0x00, 0x00, 0x01, 0x88, 0x00, 0x00" - </PanelLaneConfig> - <PanelPhysicalCtrl> - "0x5f, 0x00, 0x00, 0x00" - </PanelPhysicalCtrl> - - <!-- Other configuration --> - <ContineousSplash>0</ContineousSplash> - <DSIFeatureEnable>0</DSIFeatureEnable> - </PlatformEntry> -</GCDB> - diff --git a/common/dtbtool/Android.mk b/common/dtbtool/Android.mk deleted file mode 100644 index 720a8f95..00000000 --- a/common/dtbtool/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - dtbtool.c - -LOCAL_CFLAGS += \ - -Wall - -LOCAL_MODULE := dtbTool -LOCAL_MODULE_TAGS := optional - -include $(BUILD_HOST_EXECUTABLE) diff --git a/common/dtbtool/dtbtool.c b/common/dtbtool/dtbtool.c deleted file mode 100644 index af219ca5..00000000 --- a/common/dtbtool/dtbtool.c +++ /dev/null @@ -1,977 +0,0 @@ -/* - * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#define _GNU_SOURCE -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <dirent.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <getopt.h> -#include <errno.h> -#include <unistd.h> - -#define QCDT_MAGIC "QCDT" /* Master DTB magic */ -#define QCDT_VERSION 3 /* QCDT version */ - -#define QCDT_DT_TAG "qcom,msm-id = <" -#define QCDT_BOARD_TAG "qcom,board-id = <" -#define QCDT_PMIC_TAG "qcom,pmic-id = <" - - -#define PAGE_SIZE_DEF 2048 -#define PAGE_SIZE_MAX (1024*1024) - -#define log_err(x...) printf(x) -#define log_info(x...) printf(x) -#define log_dbg(x...) { if (verbose) printf(x); } - -#define COPY_BLK 1024 /* File copy block size */ - -#define RC_SUCCESS 0 -#define RC_ERROR -1 - -struct chipInfo_t { - uint32_t chipset; - uint32_t platform; - uint32_t subtype; - uint32_t revNum; - uint32_t pmic_model[4]; - uint32_t dtb_size; - char *dtb_file; - struct chipInfo_t *prev; - struct chipInfo_t *next; - struct chipInfo_t *master; - int wroteDtb; - uint32_t master_offset; - struct chipInfo_t *t_next; -}; - -struct chipInfo_t *chip_list; - -struct chipId_t { - uint32_t chipset; - uint32_t revNum; - struct chipId_t *next; - struct chipId_t *t_next; -}; - -struct chipSt_t { - uint32_t platform; - uint32_t subtype; - struct chipSt_t *next; - struct chipSt_t *t_next; -}; - -struct chipPt_t { - uint32_t pmic0; - uint32_t pmic1; - uint32_t pmic2; - uint32_t pmic3; - struct chipPt_t *next; - struct chipPt_t *t_next; -}; - -char *input_dir; -char *output_file; -char *dtc_path; -int verbose; -int page_size = PAGE_SIZE_DEF; - - -void print_help() -{ - log_info("dtbTool version %d\n", QCDT_VERSION); - log_info("dtbTool [options] -o <output file> <input DTB path>\n"); - log_info(" options:\n"); - log_info(" --output-file/-o output file\n"); - log_info(" --dtc-path/-p path to dtc\n"); - log_info(" --page-size/-s page size in bytes\n"); - log_info(" --verbose/-v verbose\n"); - log_info(" --help/-h this help screen\n"); -} - -int parse_commandline(int argc, char *const argv[]) -{ - int c; - - struct option long_options[] = { - {"output-file", 1, 0, 'o'}, - {"dtc-path", 1, 0, 'p'}, - {"page-size", 1, 0, 's'}, - {"verbose", 0, 0, 'v'}, - {"help", 0, 0, 'h'}, - {0, 0, 0, 0} - }; - - while ((c = getopt_long(argc, argv, "-o:p:s:vh", long_options, NULL)) - != -1) { - switch (c) { - case 1: - if (!input_dir) - input_dir = optarg; - break; - case 'o': - output_file = optarg; - break; - case 'p': - dtc_path = optarg; - break; - case 's': - page_size = atoi(optarg); - if ((page_size <= 0) || (page_size > (PAGE_SIZE_MAX))) { - log_err("Invalid page size (> 0 and <=1MB\n"); - return RC_ERROR; - } - break; - case 'v': - verbose = 1; - break; - case 'h': - default: - return RC_ERROR; - } - } - - if (!output_file) { - log_err("Output file must be specified\n"); - return RC_ERROR; - } - - if (!input_dir) - input_dir = "./"; - - if (!dtc_path) - dtc_path = ""; - - return RC_SUCCESS; -} - -/* Unique entry sorted list add (by chipset->platform->rev) */ -int chip_add(struct chipInfo_t *c) -{ - struct chipInfo_t *x = chip_list; - - if (!chip_list) { - chip_list = c; - c->next = NULL; - c->prev = NULL; - return RC_SUCCESS; - } - - while (1) { - if ((c->chipset < x->chipset) || - ((c->chipset == x->chipset) && - ((c->platform < x->platform) || - ((c->platform == x->platform) && - ((c->subtype < x->subtype) || - ((c->subtype == x->subtype) && - (c->revNum < x->revNum))))))) { - if (!x->prev) { - c->next = x; - c->prev = NULL; - x->prev = c; - chip_list = c; - break; - } else { - c->next = x; - c->prev = x->prev; - x->prev->next = c; - x->prev = c; - break; - } - } - if ((c->chipset == x->chipset) && - (c->platform == x->platform) && - (c->subtype == x->subtype) && - (c->revNum == x->revNum) && - (c->pmic_model[0] == x->pmic_model[0]) && - (c->pmic_model[1] == x->pmic_model[1]) && - (c->pmic_model[2] == x->pmic_model[2]) && - (c->pmic_model[3] == x->pmic_model[3])) { - return RC_ERROR; /* duplicate */ - } - if (!x->next) { - c->prev = x; - c->next = NULL; - x->next = c; - break; - } - x = x->next; - } - return RC_SUCCESS; -} - -void chip_deleteall() -{ - struct chipInfo_t *c = chip_list, *t; - - while (c) { - t = c; - c = c->next; - if (t->dtb_file) - free(t->dtb_file); - free(t); - } -} - -/* - For v1 Extract 'qcom,msm-id' parameter triplet from DTB - qcom,msm-id = <x y z>; - - For v2 Extract 'qcom,msm-id', 'qcom,board-id' parameter double from DTB - qcom,msm-id = <x z> i.e chipset, revision number; - qcom,board-id = <y y'> i.e platform and sub-type; - */ - -struct chipInfo_t *getChipInfo(const char *filename, int *num, uint32_t msmversion) -{ - - const char str1[] = "dtc -I dtb -O dts \""; - const char str2[] = "\" 2>&1"; - char *buf, *pos; - char *line = NULL; - size_t line_size; - FILE *pfile; - int llen; - struct chipInfo_t *chip = NULL, *tmp, *chip_t; - uint32_t data[3] = {0, 0, 0}; - uint32_t data_st[2] = {0, 0}; - uint32_t data_pt[4] = {0, 0, 0, 0}; - char *tok, *sptr = NULL; - int i, entryValid, entryEnded; - int count = 0, count1 = 0, count2 = 0, count3 = 0; - int entryValidST, entryEndedST, entryValidDT, entryEndedDT, entryValidPT, entryEndedPT; - struct chipId_t *chipId = NULL, *cId = NULL, *tmp_id = NULL; - struct chipSt_t *chipSt = NULL, *cSt = NULL, *tmp_st = NULL; - struct chipPt_t *chipPt = NULL, *cPt = NULL, *tmp_pt = NULL; - struct chipId_t *chipId_tmp = NULL; - struct chipSt_t *chipSt_tmp = NULL; - struct chipPt_t *chipPt_tmp = NULL; - - line_size = 1024; - line = (char *)malloc(line_size); - if (!line) { - log_err("Out of memory\n"); - return NULL; - } - - llen = sizeof(char) * (strlen(dtc_path) + - strlen(str1) + - strlen(str2) + - strlen(filename) + 1); - buf = (char *)malloc(llen); - if (!buf) { - log_err("Out of memory\n"); - free(line); - return NULL; - } - - strncpy(buf, dtc_path, llen); - strncat(buf, str1, llen); - strncat(buf, filename, llen); - strncat(buf, str2, llen); - - pfile = popen(buf, "r"); - free(buf); - - if (pfile == NULL) { - log_err("... skip, fail to decompile dtb\n"); - } else { - /* Find "qcom,msm-id" */ - while ((llen = getline(&line, &line_size, pfile)) != -1) { - if (msmversion == 1) { - if ((pos = strstr(line, QCDT_DT_TAG)) != NULL) { - pos += strlen(QCDT_DT_TAG); - - entryEnded = 0; - while (1) { - entryValid = 1; - for (i = 0; i < 3; i++) { - tok = strtok_r(pos, " \t", &sptr); - pos = NULL; - if (tok != NULL) { - if (*tok == '>') { - entryEnded = 1; - entryValid = 0; - break; - } - data[i] = strtoul(tok, NULL, 0); - } else { - data[i] = 0; - entryValid = 0; - entryEnded = 1; - } - } - if (entryEnded) { - free(line); - pclose(pfile); - *num = count; - return chip; - } - if (entryValid) { - tmp = (struct chipInfo_t *) - malloc(sizeof(struct chipInfo_t)); - if (!tmp) { - log_err("Out of memory\n"); - break; - } - if (!chip) { - chip = tmp; - chip->t_next = NULL; - } else { - tmp->t_next = chip->t_next; - chip->t_next = tmp; - } - tmp->chipset = data[0]; - tmp->platform = data[1]; - tmp->subtype = 0; - tmp->revNum = data[2]; - tmp->pmic_model[0] = 0; - tmp->pmic_model[1] = 0; - tmp->pmic_model[2] = 0; - tmp->pmic_model[3] = 0; - tmp->dtb_size = 0; - tmp->dtb_file = NULL; - tmp->master = chip; - tmp->wroteDtb = 0; - tmp->master_offset = 0; - count++; - } - } - - log_err("... skip, incorrect '%s' format\n", QCDT_DT_TAG); - break; - } - } else if (msmversion == 2 || msmversion == 3) { - if ((pos = strstr(line, QCDT_DT_TAG)) != NULL) { - pos += strlen(QCDT_DT_TAG); - - entryEndedDT = 0; - for (;entryEndedDT < 1;) { - entryValidDT = 1; - for (i = 0; i < 2; i++) { - tok = strtok_r(pos, " \t", &sptr); - pos = NULL; - if (tok != NULL) { - if (*tok == '>') { - entryEndedDT = 1; - entryValidDT = 0; - break; - } - data_st[i] = strtoul(tok, NULL, 0); - } else { - data_st[i] = 0; - entryValidDT = 0; - entryEndedDT = 1; - } - } - - if (entryValidDT) { - tmp_id = (struct chipId_t *) - malloc(sizeof(struct chipId_t)); - if (!tmp_id) { - log_err("Out of memory\n"); - break; - } - if (!chipId) { - chipId = tmp_id; - cId = tmp_id; - chipId->t_next = NULL; - } else { - tmp_id->t_next = chipId->t_next; - chipId->t_next = tmp_id; - } - tmp_id->chipset = data_st[0]; - tmp_id->revNum= data_st[1]; - count1++; - } - } - } - - if ((pos = strstr(line,QCDT_BOARD_TAG)) != NULL) { - pos += strlen(QCDT_BOARD_TAG); - entryEndedST = 0; - for (;entryEndedST < 1;) { - entryValidST = 1; - for (i = 0; i < 2; i++) { - tok = strtok_r(pos, " \t", &sptr); - pos = NULL; - if (tok != NULL) { - if (*tok == '>') { - entryEndedST = 1; - entryValidST = 0; - break; - } - data_st[i] = strtoul(tok, NULL, 0); - } else { - data_st[i] = 0; - entryValidST = 0; - entryEndedST = 1; - } - } - if (entryValidST) { - tmp_st = (struct chipSt_t *) - malloc(sizeof(struct chipSt_t)); - if (!tmp_st) { - log_err("Out of memory\n"); - break; - } - - if (!chipSt) { - chipSt = tmp_st; - cSt = tmp_st; - chipSt->t_next = NULL; - } else { - tmp_st->t_next = chipSt->t_next; - chipSt->t_next = tmp_st; - } - - tmp_st->platform = data_st[0]; - tmp_st->subtype= data_st[1]; - count2++; - } - } - } - - if ((pos = strstr(line,QCDT_PMIC_TAG)) != NULL) { - pos += strlen(QCDT_PMIC_TAG); - entryEndedPT = 0; - for (;entryEndedPT < 1;) { - entryValidPT = 1; - for (i = 0; i < 4; i++) { - tok = strtok_r(pos, " \t", &sptr); - pos = NULL; - if (tok != NULL) { - if (*tok == '>') { - entryEndedPT = 1; - entryValidPT = 0; - break; - } - data_pt[i] = strtoul(tok, NULL, 0); - } else { - data_pt[i] = 0; - entryValidPT = 0; - entryEndedPT = 1; - } - } - if (entryValidPT) { - tmp_pt = (struct chipPt_t *) - malloc(sizeof(struct chipPt_t)); - if (!tmp_pt) { - log_err("Out of memory\n"); - break; - } - - if (!chipPt) { - chipPt = tmp_pt; - cPt = tmp_pt; - chipPt->t_next = NULL; - } else { - tmp_pt->t_next = chipPt->t_next; - chipPt->t_next = tmp_pt; - } - - tmp_pt->pmic0 = data_pt[0]; - tmp_pt->pmic1 = data_pt[1]; - tmp_pt->pmic2 = data_pt[2]; - tmp_pt->pmic3 = data_pt[3]; - count3++; - } - } - } - } - } - } - - if (line) - free(line); - - if (count1 == 0) { - log_err("... skip, incorrect '%s' format\n", QCDT_DT_TAG); - return NULL; - } - if (count2 == 0) { - log_err("... skip, incorrect '%s' format\n", QCDT_BOARD_TAG); - return NULL; - } - if (count3 == 0 && msmversion == 3) { - log_err("... skip, incorrect '%s' format\n", QCDT_PMIC_TAG); - return NULL; - } - - tmp_st = cSt; - tmp_pt = cPt; - while (cId != NULL) { - while (cSt != NULL) { - if (msmversion == 3) { - while (cPt != NULL) { - tmp = (struct chipInfo_t *) - malloc(sizeof(struct chipInfo_t)); - if (!tmp) { - log_err("Out of memory\n"); - break; - } - if (!chip) { - chip = tmp; - chip->t_next = NULL; - } else { - tmp->t_next = chip->t_next; - chip->t_next = tmp; - } - - tmp->chipset = cId->chipset; - tmp->platform = cSt->platform; - tmp->revNum = cId->revNum; - tmp->subtype = cSt->subtype; - tmp->pmic_model[0] = cPt->pmic0; - tmp->pmic_model[1] = cPt->pmic1; - tmp->pmic_model[2] = cPt->pmic2; - tmp->pmic_model[3] = cPt->pmic3; - tmp->dtb_size = 0; - tmp->dtb_file = NULL; - tmp->master = chip; - tmp->wroteDtb = 0; - tmp->master_offset = 0; - cPt = cPt->t_next; - } - cPt = tmp_pt; - } else { - tmp = (struct chipInfo_t *) - malloc(sizeof(struct chipInfo_t)); - if (!tmp) { - log_err("Out of memory\n"); - break; - } - if (!chip) { - chip = tmp; - chip->t_next = NULL; - } else { - tmp->t_next = chip->t_next; - chip->t_next = tmp; - } - tmp->chipset = cId->chipset; - tmp->platform = cSt->platform; - tmp->revNum = cId->revNum; - tmp->subtype = cSt->subtype; - tmp->pmic_model[0] = 0; - tmp->pmic_model[1] = 0; - tmp->pmic_model[2] = 0; - tmp->pmic_model[3] = 0; - tmp->dtb_size = 0; - tmp->dtb_file = NULL; - tmp->master = chip; - tmp->wroteDtb = 0; - tmp->master_offset = 0; - } - cSt = cSt->t_next; - } - cSt = tmp_st; - cId = cId->t_next; - } - - if (msmversion == 2) - entryEndedPT = 1; - - /* clear memory*/ - pclose(pfile); - while (chipId) { - chipId_tmp = chipId; - chipId = chipId->t_next; - free(chipId_tmp); - } - while (chipSt) { - chipSt_tmp= chipSt; - chipSt = chipSt->t_next; - free(chipSt_tmp); - } - - while (chipPt) { - chipPt_tmp= chipPt; - chipPt = chipPt->t_next; - free(chipPt_tmp); - } - - if (entryEndedST == 1 && entryEndedDT == 1 && entryEndedPT == 1) { - *num = count1; - return chip; - } - - /* clear memory*/ - while (chip) { - chip_t = chip; - chip = chip->next; - if (chip_t->dtb_file) - free(chip_t->dtb_file); - free(chip_t); - } - return NULL; -} - -/* Get the version-id based on dtb files */ -int GetVersionInfo(const char *filename) -{ - const char str1[] = "dtc -I dtb -O dts \""; - const char str2[] = "\" 2>&1"; - char *buf, *pos; - char *line = NULL; - size_t line_size; - FILE *pfile; - int llen; - int v = 1; - - line_size = 1024; - line = (char *)malloc(line_size); - if (!line) { - log_err("Out of memory\n"); - return 0; - } - - llen = sizeof(char) * (strlen(dtc_path) + - strlen(str1) + - strlen(str2) + - strlen(filename) + 1); - buf = (char *)malloc(llen); - if (!buf) { - log_err("Out of memory\n"); - free(line); - return 0; - } - - strncpy(buf, dtc_path, llen); - strncat(buf, str1, llen); - strncat(buf, filename, llen); - strncat(buf, str2, llen); - - pfile = popen(buf, "r"); - free(buf); - - if (pfile == NULL) { - log_err("... skip, fail to decompile dtb\n"); - } else { - /* Find the type of version */ - while ((llen = getline(&line, &line_size, pfile)) != -1) { - if ((pos = strstr(line,QCDT_BOARD_TAG)) != NULL) { - v = 2; - } - if ((pos = strstr(line,QCDT_PMIC_TAG)) != NULL) { - v = 3; - break; - } - } - } - - free(line); - log_info("Version:%d\n", v); - - return v; -} - -/* Extract 'qcom,msm-id' 'qcom,board-id' parameter from DTB - v1 format: - qcom,msm-id = <x y z> [, <x2 y2 z2> ...]; - v2 format: - qcom,msm-id = <x z> [, <x2 z2> ...; - qcom,board-id = <y y'> [, <y2 y2'> ...; - Fields: - x = chipset - y = platform - y' = subtype - z = soc rev - */ -int main(int argc, char **argv) -{ - char buf[COPY_BLK]; - struct chipInfo_t *chip, *t_chip; - struct dirent *dp; - FILE *pInputFile; - char *filename; - int padding; - uint8_t *filler = NULL; - int numBytesRead = 0; - int totBytesRead = 0; - int out_fd; - int flen; - int rc = RC_SUCCESS; - int dtb_count = 0, dtb_offset = 0; - size_t wrote = 0, expected = 0; - struct stat st; - uint32_t version = QCDT_VERSION; - int num; - uint32_t dtb_size; - int msmversion = 0; - - log_info("DTB combiner:\n"); - - if (parse_commandline(argc, argv) != RC_SUCCESS) { - print_help(); - return RC_ERROR; - } - - log_info(" Input directory: '%s'\n", input_dir); - log_info(" Output file: '%s'\n", output_file); - - DIR *dir = opendir(input_dir); - if (!dir) { - log_err("Failed to open input directory '%s'\n", input_dir); - return RC_ERROR; - } - - filler = (uint8_t *)malloc(page_size); - if (!filler) { - log_err("Out of memory\n"); - closedir(dir); - return RC_ERROR; - } - memset(filler, 0, page_size); - - /* Open the .dtb files in the specified path, decompile and - extract "qcom,msm-id" parameter - */ - while ((dp = readdir(dir)) != NULL) { - if ((dp->d_type == DT_REG)) { - flen = strlen(dp->d_name); - if ((flen > 4) && - (strncmp(&dp->d_name[flen-4], ".dtb", 4) == 0)) { - log_info("Found file: %s ... \n", dp->d_name); - - flen = strlen(input_dir) + strlen(dp->d_name) + 1; - filename = (char *)malloc(flen); - if (!filename) { - log_err("Out of memory\n"); - rc = RC_ERROR; - break; - } - strncpy(filename, input_dir, flen); - strncat(filename, dp->d_name, flen); - - /* To identify the version number */ - msmversion = GetVersionInfo(filename); - - num = 1; - chip = getChipInfo(filename, &num, msmversion); - - if (msmversion == 1) { - if (!chip) { - log_err("skip, failed to scan for '%s' tag\n", - QCDT_DT_TAG); - free(filename); - continue; - } - } - if (msmversion == 2) { - if (!chip) { - log_err("skip, failed to scan for '%s' or '%s' tag\n", - QCDT_DT_TAG, QCDT_BOARD_TAG); - free(filename); - continue; - } - } - if (msmversion == 3) { - if (!chip) { - log_err("skip, failed to scan for '%s', '%s' or '%s' tag\n", - QCDT_DT_TAG, QCDT_BOARD_TAG, QCDT_PMIC_TAG); - free(filename); - continue; - } - } - - if ((stat(filename, &st) != 0) || - (st.st_size == 0)) { - log_err("skip, failed to get DTB size\n"); - free(filename); - continue; - } - - log_info("chipset: %u, rev: %u, platform: %u, subtype: %u, pmic0: %u, pmic1: %u, pmic2: %u, pmic3: %u\n", - chip->chipset, chip->revNum, chip->platform, chip->subtype, - chip->pmic_model[0], chip->pmic_model[1], chip->pmic_model[2], chip->pmic_model[3]); - - for (t_chip = chip->t_next; t_chip; t_chip = t_chip->t_next) { - log_info("additional chipset: %u, rev: %u, platform: %u, subtype: %u, pmic0: %u, pmic1: %u, pmic2: %u, pmic3: %u\n", - t_chip->chipset, t_chip->revNum, t_chip->platform, t_chip->subtype, - t_chip->pmic_model[0], t_chip->pmic_model[1], t_chip->pmic_model[2], t_chip->pmic_model[3]); - } - - rc = chip_add(chip); - if (rc != RC_SUCCESS) { - log_err("... duplicate info, skipped\n"); - free(filename); - continue; - } - - dtb_count++; - - chip->dtb_size = st.st_size + - (page_size - (st.st_size % page_size)); - chip->dtb_file = filename; - - for (t_chip = chip->t_next; t_chip; t_chip = t_chip->t_next) { - rc = chip_add(t_chip); - if (rc != RC_SUCCESS) { - log_err("... duplicate info, skipped (chipset %u, rev: %u, platform: %u, subtype %u:\n", - t_chip->chipset, t_chip->revNum, t_chip->platform, t_chip->subtype); - continue; - } - dtb_count++; - } - } - } - } - closedir(dir); - log_info("=> Found %d unique DTB(s)\n", dtb_count); - - if (!dtb_count) - goto cleanup; - - - /* Generate the master DTB file: - - Simplify write error handling by just checking for actual vs - expected bytes written at the end. - */ - - log_info("\nGenerating master DTB... "); - - out_fd = open(output_file, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR); - if (!out_fd < 0) { - log_err("Cannot create '%s'\n", output_file); - rc = RC_ERROR; - goto cleanup; - } - - /* Write header info */ - wrote += write(out_fd, QCDT_MAGIC, sizeof(uint8_t) * 4); /* magic */ - wrote += write(out_fd, &version, sizeof(uint32_t)); /* version */ - wrote += write(out_fd, (uint32_t *)&dtb_count, sizeof(uint32_t)); - /* #DTB */ - - /* Calculate offset of first DTB block */ - dtb_offset = 12 + /* header */ - (40 * dtb_count) + /* DTB table entries */ - 4; /* end of table indicator */ - - /* Round up to page size */ - padding = page_size - (dtb_offset % page_size); - dtb_offset += padding; - expected = dtb_offset; - - /* Write index table: - chipset - platform - subtype - soc rev - pmic model0 - pmic model1 - pmic model2 - pmic model3 - dtb offset - dtb size - */ - for (chip = chip_list; chip; chip = chip->next) { - wrote += write(out_fd, &chip->chipset, sizeof(uint32_t)); - wrote += write(out_fd, &chip->platform, sizeof(uint32_t)); - wrote += write(out_fd, &chip->subtype, sizeof(uint32_t)); - wrote += write(out_fd, &chip->revNum, sizeof(uint32_t)); - wrote += write(out_fd, &chip->pmic_model[0], sizeof(uint32_t)); - wrote += write(out_fd, &chip->pmic_model[1], sizeof(uint32_t)); - wrote += write(out_fd, &chip->pmic_model[2], sizeof(uint32_t)); - wrote += write(out_fd, &chip->pmic_model[3], sizeof(uint32_t)); - if (chip->master->master_offset != 0) { - wrote += write(out_fd, &chip->master->master_offset, sizeof(uint32_t)); - } else { - wrote += write(out_fd, &expected, sizeof(uint32_t)); - chip->master->master_offset = expected; - expected += chip->master->dtb_size; - } - wrote += write(out_fd, &chip->master->dtb_size, sizeof(uint32_t)); - } - - rc = RC_SUCCESS; - wrote += write(out_fd, &rc, sizeof(uint32_t)); /* end of table indicator */ - if (padding > 0) - wrote += write(out_fd, filler, padding); - - /* Write DTB's */ - for (chip = chip_list; chip; chip = chip->next) { - if (chip->master->wroteDtb) { - continue; - } - - chip->master->wroteDtb = 1; - filename = chip->master->dtb_file; - dtb_size = chip->master->dtb_size; - - log_dbg("\n (writing '%s' - %u bytes) ", filename, dtb_size); - pInputFile = fopen(filename, "r"); - if (pInputFile != NULL) { - totBytesRead = 0; - while ((numBytesRead = fread(buf, 1, COPY_BLK, pInputFile)) > 0) { - wrote += write(out_fd, buf, numBytesRead); - totBytesRead += numBytesRead; - } - fclose(pInputFile); - padding = page_size - (totBytesRead % page_size); - if ((uint32_t)(totBytesRead + padding) != dtb_size) { - log_err("DTB size mismatch, please re-run: expected %d vs actual %d (%s)\n", - dtb_size, totBytesRead + padding, - filename); - rc = RC_ERROR; - break; - } - if (padding > 0) - wrote += write(out_fd, filler, padding); - } else { - log_err("failed to open DTB '%s'\n", filename); - rc = RC_ERROR; - break; - } - } - close(out_fd); - - if (expected != wrote) { - log_err("error writing output file, please rerun: size mismatch %d vs %d\n", - expected, wrote); - rc = RC_ERROR; - } else - log_dbg("Total wrote %u bytes\n", wrote); - - if (rc != RC_SUCCESS) - unlink(output_file); - else - log_info("completed\n"); - -cleanup: - free(filler); - chip_deleteall(); - return rc; -} diff --git a/common/dtbtool/dtbtool.txt b/common/dtbtool/dtbtool.txt deleted file mode 100644 index 1aa0be43..00000000 --- a/common/dtbtool/dtbtool.txt +++ /dev/null @@ -1,235 +0,0 @@ -Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. - -Redistribution and use in source form and compiled forms (SGML, HTML, -PDF, PostScript, RTF and so forth) with or without modification, are -permitted provided that the following conditions are met: - -Redistributions in source form must retain the above copyright -notice, this list of conditions and the following disclaimer as the -first lines of this file unmodified. - -Redistributions in compiled form (transformed to other DTDs, -converted to PDF, PostScript, RTF and other formats) must reproduce -the above copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials provided with -the distribution. - -THIS DOCUMENTATION IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND -NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD -DOCUMENTATION PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - - -Android - Table of Device Tree -============================== - -0) Document revision - v1.0 - Initial version (dng) - v1.1 - Add v2 format to allow subtype (dng) - -1) Android boot image: ----------------------- -1.1) Header: - 1) Magic (8B) - 2) kernel size (4B) - 3) kernel addr (4B) - 4) ramdisk size (4B) - 5) ramdisk addr (4B) - 6) 2ndary size (4B) - 7) 2ndary addr (4B) - 8) tags addr (4B) - 9) page size (4B) - 10) unused #1 (4B) (zero in standard Android) - 11) unused #2 (4B) (zero in standard Android) - 12) product name (16B) - 13) kernel cmdline (512B) - 14) id (8B) - -1.2) Layout: - A) header (as above - 1 page) - B) kernel (n pages) - C) ramdisk (m pages) - D) second stage (o pages) - -2) QC table of device tree --------------------------- -2.1) Changes: - i) use "unused #1, #2" members in existing boot image - header to point to new table of device tree - (#1 - size of QC table of DT) - ii) append table of device tree (described later) - after "D) second stage" - -2.2) Format: - size - x +------------------+ - | | MAGIC ("QCDT") | 4B - | +------------------+ - header | VERSION | uint32 (version 3) - | +------------------+ - | | num of DTBs | uint32 (number of DTB entries) - x +------------------+ - | | platform id #1 | uint32 (e.g. ID for MSM8974) - | +------------------+ - | | variant id #1 | uint32 (e.g. ID for CDP, MTP) - | +------------------+ - | | subtype id #1 | uint32 (e.g. ID for subtype) (QCDT v2) - device +------------------+ - #1 | soc rev #1 | uint32 (e.g. MSM8974 v2) - entry +------------------+ - | | pmic0 #1 | uint32 (pmic0-> first smallest SID of existing pmic) - | +------------------+ - | | pmic1 #1 | uint32 (pmic1-> secondary smallest SID of existing pmic) - | +------------------+ - | | pmic2 #1 | uint32 (pmic2-> third smallest SID of existing pmic) - | +------------------+ - | | pmic3 #1 | uint32 (pmic3-> fourth smallest SID of existing pmic) - | +------------------+ - | | offset #1 | uint32 (byte offset from start/before MAGIC - | +------------------+ to DTB entry) - | | size #1 | uint32 (size in bytes of DTB blob) - x +------------------+ - . . - . . (repeat) - . . - - x +------------------+ - | | platform id #Z | uint32 (e.g. ID for MSM8974) - | +------------------+ - device | variant id #Z | uint32 (e.g. ID for CDP, MTP) - #Z +------------------+ - entry | subtype id #Z | uint32 (e.g. ID for subtype) (QCDT v2) - (last) +------------------+ - | | soc rev #Z | uint32 (e.g. MSM8974 v2) - | +------------------+ - | | pmic0 #1 | uint32 (pmic0-> first smallest SID of existing pmic) - | +------------------+ - | | pmic1 #1 | uint32 (pmic1-> secondary smallest SID of existing pmic) - | +------------------+ - | | pmic2 #1 | uint32 (pmic2-> third smallest SID of existing pmic) - | +------------------+ - | | pmic3 #1 | uint32 (pmic3-> fourth smallest SID of existing pmic) - | +------------------+ - | | offset #Z | uint32 (byte offset from start/before MAGIC - x +------------------+ to DTB entry) - | 0 ("zero") | uint32 (end of list delimiter) - +------------------+ to DTB entry) - | padding | variable length for next DTB to start on - +------------------+ page boundary - | DTB #1 | variable (start is page aligned) - | | - | | - +------------------+ - | padding | variable length for next DTB to start on - +------------------+ page boundary - . - . - . - - +------------------+ - | DTB #Z (last) | variable (start is page aligned) - | | - | | - +------------------+ - -3) Operations -------------- -3.1) Build-time: - 1) Each DTS per device will add a "qcom,msm-id" entry - e.g. for msm8974-sim.dts, add - qcom,msm-id = <x y z>; - or - qcom,msm-id = <x z>; - qcom,board-id = <y y'>; - or - qcom,msm-id = <x z>; - qcom,board-id = <y y'>; - qcom,pmic-id = <a b c d>; - x = ID for msm8974 - y = ID for CDP, MTP, etc. - y' = ID for subtype (assumed zero if absent) - z = ID for soc revision - a = pmic0 - b = pmic1 - c = pmic2 - d = pmic3 - SBL populates the pmic entries always in ascending order of SID, so - pmic0-> SID0, pmic1-> SID1, pmic2-> SID2, pmic3-> SID3. - e.g. for qcom,pmic-id = <pmic0 pmic1 pmic2 pmic3> - Board X = MSM8994 + PM8994 + PMI8994 (Existing boards [ROW]) - Board Y = MSM8994 + PM8994 + PMI8994 + PM8004 (Internal SS board variant) - Board Z = MSM8994 + PM8994 + PM8004 (Boards that SS will be making) - - For all boards X, Y, and Z, PMICs have the following SIDs and REVID SUBTYPEs - (i.e. PMIC Model): - PM8994 - SID 0 and 1; subtype = 9 - PMI8994 - SID 2 and 3; subtype = 10 - PM8004 - SID 4 and 5; subtype = 12 - - LK using SMEM PMIC info(1 as major and 0 as minor version for example): - Board X: qcom,pmic-id = <0x0109 0x010A 0x0 0x0>; - Board Y: qcom,pmic-id = <0x0109 0x010A 0x010C 0x0>; - Board Z: qcom,pmic-id = <0x0109 0x010C 0x0 0x0>; - - The entry can optionally be an array: - qcom,msm-id = <x1 y1 z1>, <x2 y2 z2>, ...; - or - qcom,msm-id = <x1 z1>, <x2 z2>, ...; - qcom,board-id = <y1 y1'>, ...; - or - qcom,msm-id = <x1 z1>, <x2 z2>, ...; - qcom,board-id = <y1 y1'>, ...; - qcom,pmic-id = <a1 b1 c1 d1>, ...; - Note that qcom,msm-id, qcom,board-id and qcom,pmic-id are not matched pairs. - 2) Kernel compile will generate the DTB - 3) Android build will run a new tool (dtbTool) - a) scan the DTB output directory for all compiled DTB - b) decompile the DTB for "qcom,msm-id"/"qcom,board-id"/"qcom,pmic-id" - c) generate the QC table of device tree in sorted - order (platform, variant, subtype, soc rev, pmic0, pmic1, pmic2, pmic3) - d) modified mkbootimg will merge new table of DT - -3.2) Run-time: - 1) LK bootloader will obtain platform id/variant/subtype/soc rev/major ver/minor ver - /pmic0/pmic1/pmic2/pmic3 info either from early bootloaders or via other means - 2) LK bootloader will check entries #10 for non-zero - value (set to zero for standard boot.img). If the - value is non-zero, refer to page section after - the "second stage" in the boot.img layout - 3) Check QCDT magic - 4) Check QCDT version (optional LK to handle multiple - QCDT version) - 5) LK scans through the QCDT table to look for matching - entry. Search order is: - 1) msm ID exact match - 2) Platform type exact match - 3) subtype ID exact match - 4) HLOS subtype exact match - 5) Pmic0 model ID exact match - 6) Pmic1 model ID exact match - 7) Pmic2 model ID exact match - 8) Pmic3 model ID exact match - 9) foundry ID, look for exact match, if not found choose - device tree with foundry-id(0x0) - 10) select the highest soc rev in QCDT that is - equal to or lower than the runtime detected soc rev - 11) select the highest major&minor ver in QCDT that is - equal to or lower than the runtime detected major ver - 12) select the highest pmic0 major&minor in QCDT that is - equal to or lower than the runtime detected pmic0 - 13) select the highest pmic1 major&minor in QCDT that is - equal to or lower than the runtime detected pmic1 - 14) select the highest pmic2 major&minor in QCDT that is - equal to or lower than the runtime detected pmic2 - 15) select the highest pmic3 major&minor in QCDT that is - equal to or lower than the runtime detected pmic3 - 6) Load the matching DTB blob to the tags addr - 7) LK pass the correct DTB to the kernel diff --git a/common/generate_extra_images.mk b/common/generate_extra_images.mk deleted file mode 100644 index 664b7752..00000000 --- a/common/generate_extra_images.mk +++ /dev/null @@ -1,430 +0,0 @@ -$(error UNUSED) -# This makefile is used to generate extra images for QCOM targets -# persist, device tree & NAND images required for different QCOM targets. - -# These variables are required to make sure that the required -# files/targets are available before generating NAND images. -# This file is included from device/qcom/<TARGET>/AndroidBoard.mk -# and gets parsed before build/core/Makefile, which has these -# variables defined. build/core/Makefile will overwrite these -# variables again. -ifneq ($(strip $(TARGET_NO_KERNEL)),true) -INSTALLED_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img -INSTALLED_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img -INSTALLED_SYSTEMIMAGE := $(PRODUCT_OUT)/system.img -INSTALLED_USERDATAIMAGE_TARGET := $(PRODUCT_OUT)/userdata.img -INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img -recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img -INSTALLED_USBIMAGE_TARGET := $(PRODUCT_OUT)/usbdisk.img -endif - -#---------------------------------------------------------------------- -# Generate secure boot image -#---------------------------------------------------------------------- -ifeq ($(TARGET_BOOTIMG_SIGNED),true) -INSTALLED_SEC_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img.secure -INSTALLED_SEC_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img.secure - -ifneq ($(BUILD_TINY_ANDROID),true) -intermediates := $(call intermediates-dir-for,PACKAGING,recovery_patch) -RECOVERY_FROM_BOOT_PATCH := $(intermediates)/recovery_from_boot.p -endif - -ifndef TARGET_SHA_TYPE - TARGET_SHA_TYPE := sha256 -endif - -define build-boot-image - $(hide) mv -f $(1) $(1).nonsecure - $(hide) openssl dgst -$(TARGET_SHA_TYPE) -binary $(1).nonsecure > $(1).$(TARGET_SHA_TYPE) - $(hide) openssl rsautl -sign -in $(1).$(TARGET_SHA_TYPE) -inkey $(PRODUCT_PRIVATE_KEY) -out $(1).sig - $(hide) dd if=/dev/zero of=$(1).sig.padded bs=$(BOARD_KERNEL_PAGESIZE) count=1 - $(hide) dd if=$(1).sig of=$(1).sig.padded conv=notrunc - $(hide) cat $(1).nonsecure $(1).sig.padded > $(1).secure - $(hide) rm -rf $(1).$(TARGET_SHA_TYPE) $(1).sig $(1).sig.padded - $(hide) mv -f $(1).secure $(1) -endef - -$(INSTALLED_SEC_BOOTIMAGE_TARGET): $(INSTALLED_BOOTIMAGE_TARGET) $(RECOVERY_FROM_BOOT_PATCH) - $(hide) $(call build-boot-image,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_BOOTIMAGE_ARGS)) - -$(INSTALLED_SEC_RECOVERYIMAGE_TARGET): $(INSTALLED_RECOVERYIMAGE_TARGET) $(RECOVERY_FROM_BOOT_PATCH) - $(hide) $(call build-boot-image,$(INSTALLED_RECOVERYIMAGE_TARGET),$(INTERNAL_RECOVERYIMAGE_ARGS)) - -ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_SEC_BOOTIMAGE_TARGET) $(INSTALLED_SEC_RECOVERYIMAGE_TARGET) -ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_SEC_BOOTIMAGE_TARGET) -ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_SEC_RECOVERYIMAGE_TARGET) -endif - -#---------------------------------------------------------------------- -# Generate persist image (persist.img) -#---------------------------------------------------------------------- -ifneq ($(strip $(TARGET_NO_KERNEL)),true) - -TARGET_OUT_PERSIST := $(PRODUCT_OUT)/persist - -INTERNAL_PERSISTIMAGE_FILES := \ - $(filter $(TARGET_OUT_PERSIST)/%,$(ALL_DEFAULT_INSTALLED_MODULES)) - -INSTALLED_PERSISTIMAGE_TARGET := $(PRODUCT_OUT)/persist.img - -define build-persistimage-target - $(call pretty,"Target persist fs image: $(INSTALLED_PERSISTIMAGE_TARGET)") - @mkdir -p $(TARGET_OUT_PERSIST) - $(hide) $(MKEXTUSERIMG) -s $(TARGET_OUT_PERSIST) $@ ext4 persist $(BOARD_PERSISTIMAGE_PARTITION_SIZE) - $(hide) chmod a+r $@ - $(hide) $(call assert-max-image-size,$@,$(BOARD_PERSISTIMAGE_PARTITION_SIZE),yaffs) -endef - -$(INSTALLED_PERSISTIMAGE_TARGET): $(MKEXTUSERIMG) $(MAKE_EXT4FS) $(INTERNAL_PERSISTIMAGE_FILES) - $(build-persistimage-target) - -ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_PERSISTIMAGE_TARGET) -ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_PERSISTIMAGE_TARGET) - -endif - -#---------------------------------------------------------------------- -# Generate device tree image (dt.img) -#---------------------------------------------------------------------- -ifneq ($(strip $(TARGET_NO_KERNEL)),true) -ifeq ($(strip $(BOARD_KERNEL_SEPARATED_DT)),true) -ifeq ($(strip $(BUILD_TINY_ANDROID)),true) -include device/google/marlin/common/dtbtool/Android.mk -endif - -DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbTool$(HOST_EXECUTABLE_SUFFIX) - -INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img - - -define build-dtimage-target - $(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)") - # Most specific paths must come first in possible_dtb_dirs - dtb_dir=; \ - for possible_dtb_dirs in $(KERNEL_OUT)/arch/$(TARGET_KERNEL_ARCH)/boot/dts/qcom/ \ - $(KERNEL_OUT)/arch/arm/boot/dts/qcom/ \ - $(KERNEL_OUT)/arch/$(TARGET_KERNEL_ARCH)/boot/dts/ \ - $(KERNEL_OUT)/arch/arm/boot/dts/ \ - $(KERNEL_OUT)/arch/arm/boot/; do \ - if [ -d "$(possible_dtb_dir)" ]; then \ - dtb_dir = $(possible_dtb_dirs); \ - break; \ - fi; \ - done; \ - if [ -n "$(dtb_dir)" ]; then \ - $(DTBTOOL) -o $@ -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(dtb_dir); \ - chmod a+r $@; \ - else \ - echo "Input DTB directory contains no DTB"; \ - fi -endef - -$(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(INSTALLED_KERNEL_TARGET) - $(build-dtimage-target) - -ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DTIMAGE_TARGET) -ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_DTIMAGE_TARGET) -endif -endif - -#--------------------------------------------------------------------- -# Generate usbdisk.img FAT32 image -# Please NOTICE: the valid max size of usbdisk.bin is 10GB -#--------------------------------------------------------------------- -ifneq ($(strip $(BOARD_USBIMAGE_PARTITION_SIZE_KB)),) -define build-usbimage-target - $(hide) mkfs.vfat -n "Internal SD" -F 32 -C $(PRODUCT_OUT)/usbdisk.tmp $(BOARD_USBIMAGE_PARTITION_SIZE_KB) - $(hide) dd if=$(PRODUCT_OUT)/usbdisk.tmp of=$(INSTALLED_USBIMAGE_TARGET) bs=1024 count=20480 - $(hide) rm -f $(PRODUCT_OUT)/usbdisk.tmp -endef - -$(INSTALLED_USBIMAGE_TARGET): - $(build-usbimage-target) -ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_USBIMAGE_TARGET) -ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_DTIMAGE_TARGET) -endif - -#---------------------------------------------------------------------- -# Generate CDROM image -#---------------------------------------------------------------------- -CDROM_RES_FILE := $(TARGET_DEVICE_DIR)/cdrom_res -CDROM_DUMMY_FILE := $(TARGET_DEVICE_DIR)/cdrom_res/zero.bin - -ifneq ($(wildcard $(CDROM_RES_FILE)),) -CDROM_ISO_TARGET := $(PRODUCT_OUT)/system/etc/cdrom_install.iso -#delete the dummy file if it already exists. -ifneq ($(wildcard $(CDROM_DUMMY_FILE)),) -$(shell rm -f $(CDROM_DUMMY_FILE)) -endif -CDROM_RES_SIZE := $(shell du -bs $(CDROM_RES_FILE) | egrep -o '^[0-9]+') -#At least 300 sectors, 2048Bytes per Sector, set as 310 here -CDROM_MIN_SIZE := 634880 -CDROM_CAPACITY_IS_ENOUGH := $(shell expr $(CDROM_RES_SIZE) / $(CDROM_MIN_SIZE)) -ifeq ($(CDROM_CAPACITY_IS_ENOUGH),0) -CDROM_DUMMY_SIZE := $(shell expr $(CDROM_MIN_SIZE) - $(CDROM_RES_SIZE)) -CDROM_DUMMY_SIZE_KB := $(shell expr `expr $(CDROM_DUMMY_SIZE) + 1023` / 1024) -$(shell dd if=/dev/zero of=$(CDROM_RES_FILE)/zero.bin bs=1024 count=$(CDROM_DUMMY_SIZE_KB)) -endif - -define build-cdrom-target - $(hide) mkisofs -o $(CDROM_ISO_TARGET) $(CDROM_RES_FILE) -endef - -$(CDROM_ISO_TARGET): $(CDROM_RES_FILE) - $(build-cdrom-target) - -ALL_DEFAULT_INSTALLED_MODULES += $(CDROM_ISO_TARGET) -ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(CDROM_ISO_TARGET) -endif - -#---------------------------------------------------------------------- -# Generate NAND images -#---------------------------------------------------------------------- -ifeq ($(call is-board-platform-in-list,msm7627a msm7630_surf),true) - -2K_NAND_OUT := $(PRODUCT_OUT)/2k_nand_images -4K_NAND_OUT := $(PRODUCT_OUT)/4k_nand_images -BCHECC_OUT := $(PRODUCT_OUT)/bchecc_images - -INSTALLED_2K_BOOTIMAGE_TARGET := $(2K_NAND_OUT)/boot.img -INSTALLED_2K_SYSTEMIMAGE_TARGET := $(2K_NAND_OUT)/system.img -INSTALLED_2K_USERDATAIMAGE_TARGET := $(2K_NAND_OUT)/userdata.img -INSTALLED_2K_PERSISTIMAGE_TARGET := $(2K_NAND_OUT)/persist.img -INSTALLED_2K_RECOVERYIMAGE_TARGET := $(2K_NAND_OUT)/recovery.img - -INSTALLED_4K_BOOTIMAGE_TARGET := $(4K_NAND_OUT)/boot.img -INSTALLED_4K_SYSTEMIMAGE_TARGET := $(4K_NAND_OUT)/system.img -INSTALLED_4K_USERDATAIMAGE_TARGET := $(4K_NAND_OUT)/userdata.img -INSTALLED_4K_PERSISTIMAGE_TARGET := $(4K_NAND_OUT)/persist.img -INSTALLED_4K_RECOVERYIMAGE_TARGET := $(4K_NAND_OUT)/recovery.img - -INSTALLED_BCHECC_BOOTIMAGE_TARGET := $(BCHECC_OUT)/boot.img -INSTALLED_BCHECC_SYSTEMIMAGE_TARGET := $(BCHECC_OUT)/system.img -INSTALLED_BCHECC_USERDATAIMAGE_TARGET := $(BCHECC_OUT)/userdata.img -INSTALLED_BCHECC_PERSISTIMAGE_TARGET := $(BCHECC_OUT)/persist.img -INSTALLED_BCHECC_RECOVERYIMAGE_TARGET := $(BCHECC_OUT)/recovery.img - -recovery_nand_fstab := $(TARGET_DEVICE_DIR)/recovery_nand.fstab - -NAND_BOOTIMAGE_ARGS := \ - --kernel $(INSTALLED_KERNEL_TARGET) \ - --ramdisk $(INSTALLED_RAMDISK_TARGET) \ - --cmdline "$(BOARD_KERNEL_CMDLINE)" \ - --base $(BOARD_KERNEL_BASE) - -NAND_RECOVERYIMAGE_ARGS := \ - --kernel $(INSTALLED_KERNEL_TARGET) \ - --ramdisk $(recovery_ramdisk) \ - --cmdline "$(BOARD_KERNEL_CMDLINE)" \ - --base $(BOARD_KERNEL_BASE) - -INTERNAL_4K_BOOTIMAGE_ARGS := $(NAND_BOOTIMAGE_ARGS) -INTERNAL_4K_BOOTIMAGE_ARGS += --pagesize $(BOARD_KERNEL_PAGESIZE) - -INTERNAL_2K_BOOTIMAGE_ARGS := $(NAND_BOOTIMAGE_ARGS) -INTERNAL_2K_BOOTIMAGE_ARGS += --pagesize $(BOARD_KERNEL_2KPAGESIZE) - -INTERNAL_4K_MKYAFFS2_FLAGS := -c $(BOARD_KERNEL_PAGESIZE) -INTERNAL_4K_MKYAFFS2_FLAGS += -s $(BOARD_KERNEL_SPARESIZE) - -INTERNAL_2K_MKYAFFS2_FLAGS := -c $(BOARD_KERNEL_2KPAGESIZE) -INTERNAL_2K_MKYAFFS2_FLAGS += -s $(BOARD_KERNEL_2KSPARESIZE) - -INTERNAL_BCHECC_MKYAFFS2_FLAGS := -c $(BOARD_KERNEL_PAGESIZE) -INTERNAL_BCHECC_MKYAFFS2_FLAGS += -s $(BOARD_KERNEL_BCHECC_SPARESIZE) - -INTERNAL_4K_RECOVERYIMAGE_ARGS := $(NAND_RECOVERYIMAGE_ARGS) -INTERNAL_4K_RECOVERYIMAGE_ARGS += --pagesize $(BOARD_KERNEL_PAGESIZE) - -INTERNAL_2K_RECOVERYIMAGE_ARGS := $(NAND_RECOVERYIMAGE_ARGS) -INTERNAL_2K_RECOVERYIMAGE_ARGS += --pagesize $(BOARD_KERNEL_2KPAGESIZE) - -# Generate boot image for NAND -ifeq ($(TARGET_BOOTIMG_SIGNED),true) - -ifndef TARGET_SHA_TYPE - TARGET_SHA_TYPE := sha256 -endif - -define build-nand-bootimage - @echo "target NAND boot image: $(3)" - $(hide) mkdir -p $(1) - $(hide) $(MKBOOTIMG) $(2) --output $(3).nonsecure - $(hide) openssl dgst -$(TARGET_SHA_TYPE) -binary $(3).nonsecure > $(3).$(TARGET_SHA_TYPE) - $(hide) openssl rsautl -sign -in $(3).$(TARGET_SHA_TYPE) -inkey $(PRODUCT_PRIVATE_KEY) -out $(3).sig - $(hide) dd if=/dev/zero of=$(3).sig.padded bs=$(BOARD_KERNEL_PAGESIZE) count=1 - $(hide) dd if=$(3).sig of=$(3).sig.padded conv=notrunc - $(hide) cat $(3).nonsecure $(3).sig.padded > $(3) - $(hide) rm -rf $(3).$(TARGET_SHA_TYPE) $(3).sig $(3).sig.padded -endef -else -define build-nand-bootimage - @echo "target NAND boot image: $(3)" - $(hide) mkdir -p $(1) - $(hide) $(MKBOOTIMG) $(2) --output $(3) -endef - $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw) -endif - -# Generate system image for NAND -define build-nand-systemimage - @echo "target NAND system image: $(3)" - $(hide) mkdir -p $(1) - $(hide) $(MKYAFFS2) -f $(2) $(TARGET_OUT) $(3) - $(hide) chmod a+r $(3) - $(hide) $(call assert-max-image-size,$@,$(BOARD_SYSTEMIMAGE_PARTITION_SIZE),yaffs) -endef - -# Generate userdata image for NAND -define build-nand-userdataimage - @echo "target NAND userdata image: $(3)" - $(hide) mkdir -p $(1) - $(hide) $(MKYAFFS2) -f $(2) $(TARGET_OUT_DATA) $(3) - $(hide) chmod a+r $(3) - $(hide) $(call assert-max-image-size,$@,$(BOARD_USERDATAIMAGE_PARTITION_SIZE),yaffs) -endef - -# Generate persist image for NAND -define build-nand-persistimage - @echo "target NAND persist image: $(3)" - $(hide) mkdir -p $(1) - $(hide) $(MKYAFFS2) -f $(2) $(TARGET_OUT_PERSIST) $(3) - $(hide) chmod a+r $(3) - $(hide) $(call assert-max-image-size,$@,$(BOARD_PERSISTIMAGE_PARTITION_SIZE),yaffs) -endef - -$(INSTALLED_4K_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_BOOTIMAGE_TARGET) - $(hide) $(call build-nand-bootimage,$(4K_NAND_OUT),$(INTERNAL_4K_BOOTIMAGE_ARGS),$(INSTALLED_4K_BOOTIMAGE_TARGET)) -ifeq ($(call is-board-platform,msm7627a),true) - $(hide) $(call build-nand-bootimage,$(2K_NAND_OUT),$(INTERNAL_2K_BOOTIMAGE_ARGS),$(INSTALLED_2K_BOOTIMAGE_TARGET)) - $(hide) $(call build-nand-bootimage,$(BCHECC_OUT),$(INTERNAL_4K_BOOTIMAGE_ARGS),$(INSTALLED_BCHECC_BOOTIMAGE_TARGET)) -endif # is-board-platform - -$(INSTALLED_4K_SYSTEMIMAGE_TARGET): $(MKYAFFS2) $(INSTALLED_SYSTEMIMAGE) - $(hide) $(call build-nand-systemimage,$(4K_NAND_OUT),$(INTERNAL_4K_MKYAFFS2_FLAGS),$(INSTALLED_4K_SYSTEMIMAGE_TARGET)) -ifeq ($(call is-board-platform,msm7627a),true) - $(hide) $(call build-nand-systemimage,$(2K_NAND_OUT),$(INTERNAL_2K_MKYAFFS2_FLAGS),$(INSTALLED_2K_SYSTEMIMAGE_TARGET)) - $(hide) $(call build-nand-systemimage,$(BCHECC_OUT),$(INTERNAL_BCHECC_MKYAFFS2_FLAGS),$(INSTALLED_BCHECC_SYSTEMIMAGE_TARGET)) -endif # is-board-platform - -$(INSTALLED_4K_USERDATAIMAGE_TARGET): $(MKYAFFS2) $(INSTALLED_USERDATAIMAGE_TARGET) - $(hide) $(call build-nand-userdataimage,$(4K_NAND_OUT),$(INTERNAL_4K_MKYAFFS2_FLAGS),$(INSTALLED_4K_USERDATAIMAGE_TARGET)) -ifeq ($(call is-board-platform,msm7627a),true) - $(hide) $(call build-nand-userdataimage,$(2K_NAND_OUT),$(INTERNAL_2K_MKYAFFS2_FLAGS),$(INSTALLED_2K_USERDATAIMAGE_TARGET)) - $(hide) $(call build-nand-userdataimage,$(BCHECC_OUT),$(INTERNAL_BCHECC_MKYAFFS2_FLAGS),$(INSTALLED_BCHECC_USERDATAIMAGE_TARGET)) -endif # is-board-platform - -$(INSTALLED_4K_PERSISTIMAGE_TARGET): $(MKYAFFS2) $(INSTALLED_PERSISTIMAGE_TARGET) - $(hide) $(call build-nand-persistimage,$(4K_NAND_OUT),$(INTERNAL_4K_MKYAFFS2_FLAGS),$(INSTALLED_4K_PERSISTIMAGE_TARGET)) -ifeq ($(call is-board-platform,msm7627a),true) - $(hide) $(call build-nand-persistimage,$(2K_NAND_OUT),$(INTERNAL_2K_MKYAFFS2_FLAGS),$(INSTALLED_2K_PERSISTIMAGE_TARGET)) - $(hide) $(call build-nand-persistimage,$(BCHECC_OUT),$(INTERNAL_BCHECC_MKYAFFS2_FLAGS),$(INSTALLED_BCHECC_PERSISTIMAGE_TARGET)) -endif # is-board-platform - -$(INSTALLED_4K_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_RECOVERYIMAGE_TARGET) $(recovery_nand_fstab) - $(hide) cp -f $(recovery_nand_fstab) $(TARGET_RECOVERY_ROOT_OUT)/etc - $(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk) - $(hide) $(call build-nand-bootimage,$(4K_NAND_OUT),$(INTERNAL_4K_RECOVERYIMAGE_ARGS),$(INSTALLED_4K_RECOVERYIMAGE_TARGET)) -ifeq ($(call is-board-platform,msm7627a),true) - $(hide) $(call build-nand-bootimage,$(2K_NAND_OUT),$(INTERNAL_2K_RECOVERYIMAGE_ARGS),$(INSTALLED_2K_RECOVERYIMAGE_TARGET)) - $(hide) $(call build-nand-bootimage,$(BCHECC_OUT),$(INTERNAL_4K_RECOVERYIMAGE_ARGS),$(INSTALLED_BCHECC_RECOVERYIMAGE_TARGET)) -endif # is-board-platform - -ALL_DEFAULT_INSTALLED_MODULES += \ - $(INSTALLED_4K_BOOTIMAGE_TARGET) \ - $(INSTALLED_4K_SYSTEMIMAGE_TARGET) \ - $(INSTALLED_4K_USERDATAIMAGE_TARGET) \ - $(INSTALLED_4K_PERSISTIMAGE_TARGET) - -ALL_MODULES.$(LOCAL_MODULE).INSTALLED += \ - $(INSTALLED_4K_BOOTIMAGE_TARGET) \ - $(INSTALLED_4K_SYSTEMIMAGE_TARGET) \ - $(INSTALLED_4K_USERDATAIMAGE_TARGET) \ - $(INSTALLED_4K_PERSISTIMAGE_TARGET) - -ifneq ($(BUILD_TINY_ANDROID),true) -ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_4K_RECOVERYIMAGE_TARGET) -ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_4K_RECOVERYIMAGE_TARGET) -endif # !BUILD_TINY_ANDROID - -endif # is-board-platform-in-list - -##################################################################################################### -# support for small user data image - -ifneq ($(strip $(BOARD_SMALL_USERDATAIMAGE_PARTITION_SIZE)),) -# Don't build userdata.img if it's extfs but no partition size -skip_userdata.img := -ifdef INTERNAL_USERIMAGES_EXT_VARIANT -ifndef BOARD_USERDATAIMAGE_PARTITION_SIZE -skip_userdata.img := true -endif -endif - -ifneq ($(skip_userdata.img),true) - -INSTALLED_SMALL_USERDATAIMAGE_TARGET := $(PRODUCT_OUT)/userdata_small.img - -define build-small-userdataimage - @echo "target small userdata image" - $(hide) mkdir -p $(1) - $(hide) $(MKEXTUSERIMG) -s $(TARGET_OUT_DATA) $(2) ext4 data $(BOARD_SMALL_USERDATAIMAGE_PARTITION_SIZE) - $(hide) chmod a+r $@ - $(hide) $(call assert-max-image-size,$@,$(BOARD_SMALL_USERDATAIMAGE_PARTITION_SIZE),yaffs) -endef - - -$(INSTALLED_SMALL_USERDATAIMAGE_TARGET): $(MKEXTUSERIMG) $(MAKE_EXT4FS) $(INSTALLED_USERDATAIMAGE_TARGET) - $(hide) $(call build-small-userdataimage,$(PRODUCT_OUT),$(INSTALLED_SMALL_USERDATAIMAGE_TARGET)) - -ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_SMALL_USERDATAIMAGE_TARGET) -ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_SMALL_USERDATAIMAGE_TARGET) - -endif - -endif - -#---------------------------------------------------------------------- -# Compile (L)ittle (K)ernel bootloader and the nandwrite utility -#---------------------------------------------------------------------- -ifneq ($(strip $(TARGET_NO_BOOTLOADER)),true) - -# Compile -include bootable/bootloader/lk/AndroidBoot.mk - -$(INSTALLED_BOOTLOADER_MODULE): $(TARGET_EMMC_BOOTLOADER) | $(ACP) - $(transform-prebuilt-to-target) -$(BUILT_TARGET_FILES_PACKAGE): $(INSTALLED_BOOTLOADER_MODULE) - -droidcore: $(INSTALLED_BOOTLOADER_MODULE) -endif - -################################################################################################### - -.PHONY: aboot -ifeq ($(USESECIMAGETOOL), true) -aboot: gensecimage_target gensecimage_install -else -aboot: $(INSTALLED_BOOTLOADER_MODULE) -endif - -.PHONY: kernel -kernel: $(INSTALLED_BOOTIMAGE_TARGET) $(INSTALLED_SEC_BOOTIMAGE_TARGET) $(INSTALLED_4K_BOOTIMAGE_TARGET) - -.PHONY: recoveryimage -recoveryimage: $(INSTALLED_RECOVERYIMAGE_TARGET) $(INSTALLED_4K_RECOVERYIMAGE_TARGET) - -.PHONY: kernelclean -kernelclean: - $(hide) make -C kernel O=../$(PRODUCT_OUT)/obj/KERNEL_OBJ/ ARCH=$(TARGET_ARCH) CROSS_COMPILE=arm-eabi- clean - $(hide) make -C kernel O=../$(PRODUCT_OUT)/obj/KERNEL_OBJ/ ARCH=$(TARGET_ARCH) CROSS_COMPILE=arm-eabi- mrproper - $(hide) make -C kernel O=../$(PRODUCT_OUT)/obj/KERNEL_OBJ/ ARCH=$(TARGET_ARCH) CROSS_COMPILE=arm-eabi- distclean - $(hide) if [ -f "$(INSTALLED_BOOTIMAGE_TARGET)" ]; then rm $(INSTALLED_BOOTIMAGE_TARGET); fi - $(hide) if [ -f "$(INSTALLED_SEC_BOOTIMAGE_TARGET)" ]; then rm $(INSTALLED_SEC_BOOTIMAGE_TARGET); fi - $(hide) if [ -f "$(INSTALLED_BOOTIMAGE_TARGET).nonsecure" ]; then rm $(INSTALLED_BOOTIMAGE_TARGET).nonsecure; fi - $(hide) if [ -f "$(PRODUCT_OUT)/kernel" ]; then rm $(PRODUCT_OUT)/kernel; fi - $(hide) if [ -f "$(INSTALLED_4K_BOOTIMAGE_TARGET)" ]; then rm $(INSTALLED_4K_BOOTIMAGE_TARGET); fi - $(hide) if [ -f "$(INSTALLED_2K_BOOTIMAGE_TARGET)" ]; then rm $(INSTALLED_2K_BOOTIMAGE_TARGET); fi - $(hide) if [ -f "$(INSTALLED_BCHECC_BOOTIMAGE_TARGET)" ]; then rm $(INSTALLED_BCHECC_BOOTIMAGE_TARGET); fi - @echo "kernel cleanup done" diff --git a/common/healthd/Android.mk b/common/healthd/Android.mk deleted file mode 100644 index cbb6fffb..00000000 --- a/common/healthd/Android.mk +++ /dev/null @@ -1,8 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := healthd_board_msm.cpp -LOCAL_MODULE := libhealthd.msm -LOCAL_CFLAGS := -Werror -LOCAL_C_INCLUDES := system/core/healthd bootable/recovery -#include $(BUILD_STATIC_LIBRARY) diff --git a/common/healthd/healthd_board_msm.cpp b/common/healthd/healthd_board_msm.cpp deleted file mode 100644 index 94589ce0..00000000 --- a/common/healthd/healthd_board_msm.cpp +++ /dev/null @@ -1,324 +0,0 @@ -/* - *Copyright (c) 2015, The Linux Foundation. All rights reserved. - * - *Redistribution and use in source and binary forms, with or without - *modification, are permitted provided that the following conditions are - *met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - *THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - *WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - *WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - *OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - *IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <dirent.h> -#include <errno.h> -#include <string.h> -#include <fcntl.h> -#include <unistd.h> -#include <cutils/klog.h> -#include <batteryservice/BatteryService.h> -#include <cutils/android_reboot.h> -#include <healthd.h> -#include "minui/minui.h" - -#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) - -#define HVDCP_CHARGER "USB_HVDCP" -#define HVDCP_BLINK_TYPE 2 - -#define RED_LED_PATH "/sys/class/leds/red/brightness" -#define GREEN_LED_PATH "/sys/class/leds/green/brightness" -#define BLUE_LED_PATH "/sys/class/leds/blue/brightness" -#define RED_LED_BLINK_PATH "/sys/class/leds/red/blink" -#define GREEN_LED_BLINK_PATH "/sys/class/leds/green/blink" -#define BACKLIGHT_PATH "/sys/class/leds/lcd-backlight/brightness" - -#define CHARGING_ENABLED_PATH "/sys/class/power_supply/battery/charging_enabled" -#define CHARGER_TYPE_PATH "/sys/class/power_supply/usb/type" - -#define LOGE(x...) do { KLOG_ERROR("charger", x); } while (0) -#define LOGW(x...) do { KLOG_WARNING("charger", x); } while (0) -#define LOGV(x...) do { KLOG_DEBUG("charger", x); } while (0) - -enum { - RED_LED = 0x01 << 0, - GREEN_LED = 0x01 << 1, - BLUE_LED = 0x01 << 2, -}; - -struct led_ctl { - int color; - const char *path; -}; - -struct led_ctl leds[3] = - {{RED_LED, RED_LED_PATH}, - {GREEN_LED, GREEN_LED_PATH}, - {BLUE_LED, BLUE_LED_PATH}}; - -#define HVDCP_COLOR_MAP (RED_LED | GREEN_LED) - -struct soc_led_color_mapping { - int soc; - int color; -}; - -struct soc_led_color_mapping soc_leds[3] = { - {15, RED_LED}, - {90, RED_LED | GREEN_LED}, - {100, GREEN_LED}, -}; - -static int write_file_int(char const* path, int value) -{ - int fd; - char buffer[20]; - int rc = -1, bytes; - - fd = open(path, O_WRONLY); - if (fd >= 0) { - bytes = snprintf(buffer, sizeof(buffer), "%d\n", value); - rc = write(fd, buffer, bytes); - close(fd); - } - - return rc > 0 ? 0 : -1; -} - -static int set_tricolor_led(int on, int color) -{ - int fd, i; - char buffer[10]; - - for (i = 0; i < (int)ARRAY_SIZE(leds); i++) { - if ((color & leds[i].color) && (access(leds[i].path, R_OK | W_OK) == 0)) { - fd = open(leds[i].path, O_RDWR); - if (fd < 0) { - LOGE("Could not open red led node\n"); - goto cleanup; - } - if (on) - snprintf(buffer, sizeof(int), "%d\n", 255); - else - snprintf(buffer, sizeof(int), "%d\n", 0); - - if (write(fd, buffer, strlen(buffer)) < 0) - LOGE("Could not write to led node\n"); -cleanup: - if (fd >= 0) - close(fd); - } - } - - return 0; -} - -static bool is_hvdcp_inserted() -{ - bool hvdcp = false; - char buff[12] = "\0"; - int fd, cnt; - - fd = open(CHARGER_TYPE_PATH, O_RDONLY); - if (fd >= 0) { - cnt = read(fd, buff, sizeof(buff)); - if (cnt > 0 && !strncmp(buff, HVDCP_CHARGER, 9)) - hvdcp = true; - close(fd); - } - - return hvdcp; -} - -static int leds_blink_for_hvdcp_allow(void) -{ - int rc = 0, bytes; - int red_blink_fd = -1, green_blink_fd = -1, type_fd = -1; - char buf[20]; - - green_blink_fd = open(GREEN_LED_BLINK_PATH, O_RDWR); - red_blink_fd = open(RED_LED_BLINK_PATH, O_RDWR); - if (red_blink_fd < 0 && green_blink_fd < 0) { - LOGE("Could not open red && green led blink node\n"); - } else { - type_fd = open(CHARGER_TYPE_PATH, O_RDONLY); - if (type_fd < 0) { - LOGE("Could not open USB type node\n"); - close(red_blink_fd); - close(green_blink_fd); - return rc; - } else { - close(type_fd); - if (red_blink_fd > 0) { - rc |= RED_LED; - bytes = snprintf(buf, sizeof(buf), "%d\n", 0); - if (write(red_blink_fd, buf, bytes) < 0) { - LOGE("Fail to write: %s\n", RED_LED_BLINK_PATH); - rc = 0; - } - close(red_blink_fd); - } - if (green_blink_fd > 0) { - rc |= GREEN_LED; - bytes = snprintf(buf, sizeof(buf), "%d\n", 0); - if (write(green_blink_fd, buf, bytes) < 0) { - LOGE("Fail to write: %s\n", GREEN_LED_BLINK_PATH); - rc = 0; - } - close(green_blink_fd); - } - } - } - - return rc; -} - -#define STR_LEN 8 -void healthd_board_mode_charger_draw_battery( - struct android::BatteryProperties *batt_prop) -{ - char cap_str[STR_LEN]; - int x, y; - int str_len_px; - static int char_height = -1, char_width = -1; - - if (char_height == -1 && char_width == -1) - gr_font_size(&char_width, &char_height); - snprintf(cap_str, (STR_LEN - 1), "%d%%", batt_prop->batteryLevel); - str_len_px = gr_measure(cap_str); - x = (gr_fb_width() - str_len_px) / 2; - y = (gr_fb_height() + char_height) / 2; - gr_color(0xa4, 0xc6, 0x39, 255); - gr_text(x, y, cap_str, 0); -} - -void healthd_board_mode_charger_battery_update( - struct android::BatteryProperties *batt_prop) -{ - static int blink_for_hvdcp = -1; - static int old_color = 0; - int i, color, soc, rc; - bool blink = false; - - if (blink_for_hvdcp == -1) - blink_for_hvdcp = leds_blink_for_hvdcp_allow(); - - if ((blink_for_hvdcp > 0) && is_hvdcp_inserted()) - blink = true; - - soc = batt_prop->batteryLevel; - - for (i = 0; i < ((int)ARRAY_SIZE(soc_leds) - 1); i++) { - if (soc < soc_leds[i].soc) - break; - } - color = soc_leds[i].color; - - if (old_color != color) { - if ((color == HVDCP_COLOR_MAP) && blink) { - if (blink_for_hvdcp & RED_LED) { - rc = write_file_int(RED_LED_BLINK_PATH, HVDCP_BLINK_TYPE); - if (rc < 0) { - LOGE("Fail to write: %s\n", RED_LED_BLINK_PATH); - return; - } - } - if (blink_for_hvdcp & GREEN_LED) { - rc = write_file_int(GREEN_LED_BLINK_PATH, HVDCP_BLINK_TYPE); - if (rc < 0) { - LOGE("Fail to write: %s\n", GREEN_LED_BLINK_PATH); - return; - } - } - } else { - set_tricolor_led(0, old_color); - set_tricolor_led(1, color); - old_color = color; - LOGV("soc = %d, set led color 0x%x\n", soc, soc_leds[i].color); - } - } -} - -#define BACKLIGHT_ON_LEVEL 100 -#define BACKLIGHT_OFF_LEVEL 0 -void healthd_board_mode_charger_set_backlight(bool en) -{ - int fd; - char buffer[10]; - - if (access(BACKLIGHT_PATH, R_OK | W_OK) != 0) - { - LOGW("Backlight control not support\n"); - return; - } - - memset(buffer, '\0', sizeof(buffer)); - fd = open(BACKLIGHT_PATH, O_RDWR); - if (fd < 0) { - LOGE("Could not open backlight node : %s\n", strerror(errno)); - goto cleanup; - } - LOGV("set backlight status to %d\n", en); - if (en) - snprintf(buffer, sizeof(buffer), "%d\n", BACKLIGHT_ON_LEVEL); - else - snprintf(buffer, sizeof(buffer), "%d\n", BACKLIGHT_OFF_LEVEL); - - if (write(fd, buffer,strlen(buffer)) < 0) { - LOGE("Could not write to backlight node : %s\n", strerror(errno)); - goto cleanup; - } -cleanup: - if (fd >= 0) - close(fd); -} - -void healthd_board_mode_charger_init() -{ - int ret; - char buff[8] = "\0"; - int charging_enabled = 0; - int fd; - - /* check the charging is enabled or not */ - fd = open(CHARGING_ENABLED_PATH, O_RDONLY); - if (fd < 0) - return; - ret = read(fd, buff, sizeof(buff)); - close(fd); - if (ret > 0 && sscanf(buff, "%d\n", &charging_enabled)) { - /* if charging is disabled, reboot and exit power off charging */ - if (charging_enabled) - return; - LOGW("android charging is disabled, exit!\n"); - android_reboot(ANDROID_RB_RESTART, 0, 0); - } -} - -void healthd_board_init(struct healthd_config*) -{ - // use defaults -} - -int healthd_board_battery_update(struct android::BatteryProperties*) -{ - // return 0 to log periodic polled battery status to kernel log - return 1; -} diff --git a/common/media/audio_policy.conf b/common/media/audio_policy.conf deleted file mode 100644 index 7815eefb..00000000 --- a/common/media/audio_policy.conf +++ /dev/null @@ -1,128 +0,0 @@ -# Global configuration section: -# - lists input and output devices always present on the device -# as well as the output device selected by default. -# Devices are designated by a string that corresponds to the enum in audio.h -# - defines whether the speaker output path uses DRC -# "TRUE" means DRC is enabled, "FALSE" or omission means DRC isn't used or -# hardware based DRC is enabled - -global_configuration { - attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER - default_output_device AUDIO_DEVICE_OUT_SPEAKER - attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX - speaker_drc_enabled FALSE -} - -# audio hardware module section: contains descriptors for all audio hw modules present on the -# device. Each hw module node is named after the corresponding hw module library base name. -# For instance, "primary" corresponds to audio.primary.<device>.so. -# The "primary" module is mandatory and must include at least one output with -# AUDIO_OUTPUT_FLAG_PRIMARY flag. -# Each module descriptor contains one or more output profile descriptors and zero or more -# input profile descriptors. Each profile lists all the parameters supported by a given output -# or input stream category. -# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding -# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n". - -audio_hw_modules { - primary { - outputs { - primary { - sampling_rates 44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL - flags AUDIO_OUTPUT_FLAG_PRIMARY - } - deep_buffer { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL - flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER - } - hdmi { - sampling_rates 44100|48000 - channel_masks dynamic - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_AUX_DIGITAL - flags AUDIO_OUTPUT_FLAG_DIRECT - } - compress_offload { - sampling_rates 8000|11025|16000|22050|32000|44100|48000 - channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2 - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE - flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING - } - } - inputs { - primary { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 - channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_BACK_MIC - } - } - } - a2dp { - outputs { - a2dp { - sampling_rates 44100 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_ALL_A2DP - } - } - inputs { - a2dp { - sampling_rates 44100|48000 - channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_IN_BLUETOOTH_A2DP - } - } - } - usb { - outputs { - usb_accessory { - sampling_rates 44100 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_USB_ACCESSORY - } - usb_device { - sampling_rates dynamic - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats dynamic - devices AUDIO_DEVICE_OUT_USB_DEVICE - } - } - inputs { - usb_device { - sampling_rates dynamic - channel_masks AUDIO_CHANNEL_IN_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_IN_USB_DEVICE - } - } - } - r_submix { - outputs { - submix { - sampling_rates 48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX - } - } - inputs { - submix { - sampling_rates 48000 - channel_masks AUDIO_CHANNEL_IN_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_IN_REMOTE_SUBMIX - } - } - } -} diff --git a/common/media/media_codecs.xml b/common/media/media_codecs.xml deleted file mode 100644 index f590ebf2..00000000 --- a/common/media/media_codecs.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2013 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<MediaCodecs> - <Include href="media_codecs_google_audio.xml" /> - <Include href="media_codecs_google_telephony.xml" /> - <Encoders> - <MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="requires-loaded-to-idle-after-allocation"/> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="requires-loaded-to-idle-after-allocation"/> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="requires-loaded-to-idle-after-allocation"/> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="requires-loaded-to-idle-after-allocation"/> - </MediaCodec> - </Encoders> - - <Decoders> - </Decoders> - <Include href="media_codecs_google_video.xml" /> -</MediaCodecs> diff --git a/common/media/media_profiles.xml b/common/media/media_profiles.xml deleted file mode 100644 index 0935bbc9..00000000 --- a/common/media/media_profiles.xml +++ /dev/null @@ -1,428 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2013 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!DOCTYPE MediaSettings [ -<!ELEMENT MediaSettings (CamcorderProfiles, - EncoderOutputFileFormat+, - VideoEncoderCap+, - AudioEncoderCap+, - VideoDecoderCap, - AudioDecoderCap)> -<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)> -<!ELEMENT EncoderProfile (Video, Audio)> -<!ATTLIST EncoderProfile quality (high|low) #REQUIRED> -<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED> -<!ATTLIST EncoderProfile duration (30|60) #REQUIRED> -<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED> -<!ELEMENT Video EMPTY> -<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED> -<!ATTLIST Video bitRate CDATA #REQUIRED> -<!ATTLIST Video width CDATA #REQUIRED> -<!ATTLIST Video height CDATA #REQUIRED> -<!ATTLIST Video frameRate CDATA #REQUIRED> -<!ELEMENT Audio EMPTY> -<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED> -<!ATTLIST Audio bitRate CDATA #REQUIRED> -<!ATTLIST Audio sampleRate CDATA #REQUIRED> -<!ATTLIST Audio channels (1|2) #REQUIRED> -<!ELEMENT ImageEncoding EMPTY> -<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED> -<!ELEMENT ImageDecoding EMPTY> -<!ATTLIST ImageDecoding memCap CDATA #REQUIRED> -<!ELEMENT Camera EMPTY> -<!ELEMENT EncoderOutputFileFormat EMPTY> -<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED> -<!ELEMENT VideoEncoderCap EMPTY> -<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED> -<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED> -<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED> -<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED> -<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED> -<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED> -<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED> -<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED> -<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED> -<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED> -<!ELEMENT AudioEncoderCap EMPTY> -<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED> -<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED> -<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED> -<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED> -<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED> -<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED> -<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED> -<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED> -<!ELEMENT VideoDecoderCap EMPTY> -<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED> -<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED> -<!ELEMENT AudioDecoderCap EMPTY> -<!ATTLIST AudioDecoderCap name (wma) #REQUIRED> -<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED> -<!ELEMENT VideoEditorCap EMPTY> -<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED> -<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED> -<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED> -<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED> -<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED> -<!ELEMENT ExportVideoProfile EMPTY> -<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED> -<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED> -<!ATTLIST ExportVideoProfile level CDATA #REQUIRED> -]> -<!-- - This file is used to declare the multimedia profiles and capabilities - on an android-powered device. ---> -<MediaSettings> - <!-- Each camcorder profile defines a set of predefined configuration parameters --> - <CamcorderProfiles cameraId="0"> - - <EncoderProfile quality="qvga" fileFormat="3gp" duration="60"> - <Video codec="m4v" - bitRate="128000" - width="320" - height="240" - frameRate="15" /> - <Audio codec="amrnb" - bitRate="12200" - sampleRate="8000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="cif" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="1200000" - width="352" - height="288" - frameRate="30" /> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="6000000" - width="720" - height="480" - frameRate="30" /> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="12000000" - width="1280" - height="720" - frameRate="30" /> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="17000000" - width="1920" - height="1080" - frameRate="30" /> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="192000" - width="176" - height="144" - frameRate="30" /> - <!-- audio setting is ignored --> - <Audio codec="amrnb" - bitRate="12200" - sampleRate="8000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="1200000" - width="352" - height="288" - frameRate="30" /> - <!-- audio setting is ignored --> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="6000000" - width="720" - height="480" - frameRate="30" /> - <!-- audio setting is ignored --> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="12000000" - width="1280" - height="720" - frameRate="30" /> - <!-- audio setting is ignored --> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="17000000" - width="1920" - height="1080" - frameRate="30" /> - <!-- audio setting is ignored --> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <ImageEncoding quality="95" /> - <ImageEncoding quality="80" /> - <ImageEncoding quality="70" /> - <ImageDecoding memCap="20000000" /> - - </CamcorderProfiles> - - <CamcorderProfiles cameraId="1"> - - <EncoderProfile quality="qvga" fileFormat="3gp" duration="60"> - <Video codec="m4v" - bitRate="128000" - width="320" - height="240" - frameRate="15" /> - <Audio codec="amrnb" - bitRate="12200" - sampleRate="8000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="cif" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="1200000" - width="352" - height="288" - frameRate="30" /> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="6000000" - width="720" - height="480" - frameRate="30" /> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="12000000" - width="1280" - height="720" - frameRate="30" /> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="192000" - width="176" - height="144" - frameRate="30" /> - <!-- audio setting is ignored --> - <Audio codec="amrnb" - bitRate="12200" - sampleRate="8000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="1200000" - width="352" - height="288" - frameRate="30" /> - <!-- audio setting is ignored --> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="6000000" - width="720" - height="480" - frameRate="30" /> - <!-- audio setting is ignored --> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> - <Video codec="h264" - bitRate="12000000" - width="1280" - height="720" - frameRate="30" /> - <!-- audio setting is ignored --> - <Audio codec="aac" - bitRate="96000" - sampleRate="48000" - channels="1" /> - </EncoderProfile> - - <ImageEncoding quality="95" /> - <ImageEncoding quality="80" /> - <ImageEncoding quality="70" /> - <ImageDecoding memCap="20000000" /> - - </CamcorderProfiles> - - <EncoderOutputFileFormat name="3gp" /> - <EncoderOutputFileFormat name="mp4" /> - - <!-- - If a codec is not enabled, it is invisible to the applications - In other words, the applications won't be able to use the codec - or query the capabilities of the codec at all if it is disabled - --> - <VideoEncoderCap name="h264" enabled="true" - minBitRate="64000" maxBitRate="40000000" - minFrameWidth="176" maxFrameWidth="1920" - minFrameHeight="144" maxFrameHeight="1080" - minFrameRate="15" maxFrameRate="30" /> - - <VideoEncoderCap name="h263" enabled="true" - minBitRate="64000" maxBitRate="2000000" - minFrameWidth="176" maxFrameWidth="800" - minFrameHeight="144" maxFrameHeight="480" - minFrameRate="15" maxFrameRate="30" /> - - <VideoEncoderCap name="m4v" enabled="true" - minBitRate="64000" maxBitRate="40000000" - minFrameWidth="176" maxFrameWidth="1920" - minFrameHeight="144" maxFrameHeight="1080" - minFrameRate="15" maxFrameRate="30" /> - - <AudioEncoderCap name="aac" enabled="true" - minBitRate="758" maxBitRate="288000" - minSampleRate="8000" maxSampleRate="48000" - minChannels="1" maxChannels="1" /> - - <AudioEncoderCap name="heaac" enabled="true" - minBitRate="8000" maxBitRate="64000" - minSampleRate="16000" maxSampleRate="48000" - minChannels="1" maxChannels="1" /> - - <AudioEncoderCap name="aaceld" enabled="true" - minBitRate="16000" maxBitRate="192000" - minSampleRate="16000" maxSampleRate="48000" - minChannels="1" maxChannels="1" /> - - <AudioEncoderCap name="amrwb" enabled="true" - minBitRate="6600" maxBitRate="23050" - minSampleRate="16000" maxSampleRate="16000" - minChannels="1" maxChannels="1" /> - - <AudioEncoderCap name="amrnb" enabled="true" - minBitRate="5525" maxBitRate="12200" - minSampleRate="8000" maxSampleRate="8000" - minChannels="1" maxChannels="1" /> - - <!-- - FIXME: - We do not check decoder capabilities at present - At present, we only check whether windows media is visible - for TEST applications. For other applications, we do - not perform any checks at all. - --> - <VideoDecoderCap name="wmv" enabled="false"/> - <AudioDecoderCap name="wma" enabled="false"/> - - <!-- - The VideoEditor Capability configuration: - - maxInputFrameWidth: maximum video width of imported video clip. - - maxInputFrameHeight: maximum video height of imported video clip. - - maxOutputFrameWidth: maximum video width of exported video clip. - - maxOutputFrameHeight: maximum video height of exported video clip. - - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder, - used to limit the amount of memory for prefetched YUV frames. - For this platform, it allows maximum 30MB(3MB per 1080p frame x 10 - frames) memory. - --> - <VideoEditorCap maxInputFrameWidth="1920" - maxInputFrameHeight="1080" maxOutputFrameWidth="1920" - maxOutputFrameHeight="1080" maxPrefetchYUVFrames="10"/> - <!-- - The VideoEditor Export codec profile and level values - correspond to the values in OMX_Video.h. - E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline - and level 4096 means OMX_VIDEO_AVCLevel41. - Please note that the values are in decimal. - These values are for video encoder. - --> - <!-- - Codec = h.264, Baseline profile, level 4.0 - --> - <ExportVideoProfile name="h264" profile= "1" level="2048"/> - <!-- - Codec = h.263, Baseline profile, level 70 - --> - <ExportVideoProfile name="h263" profile= "1" level="128"/> - <!-- - Codec = mpeg4, Simple profile, level 5 - --> - <ExportVideoProfile name="m4v" profile= "1" level="128"/> -</MediaSettings> diff --git a/common/meta_image/Android.mk b/common/meta_image/Android.mk deleted file mode 100644 index f1c2d6e7..00000000 --- a/common/meta_image/Android.mk +++ /dev/null @@ -1,9 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := meta_image -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk -LOCAL_CFLAGS += -g -Wall -LOCAL_SRC_FILES := \ - meta_image.c -#include $(BUILD_HOST_EXECUTABLE) diff --git a/common/meta_image/meta_format.h b/common/meta_image/meta_format.h deleted file mode 100644 index 252cfa41..00000000 --- a/common/meta_image/meta_format.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2015, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of The Linux Foundation nor - * the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _META_FORMAT_H_ -#define _META_FORMAT_H_ - -#define META_HEADER_MAGIC 0xce1ad63c -#define MAX_GPT_NAME_SIZE 72 -typedef unsigned int u32; -typedef unsigned short int u16; - -typedef struct meta_header { - u32 magic; /* 0xce1ad63c */ - u16 major_version; /* (0x1) - reject images with higher major versions */ - u16 minor_version; /* (0x0) - allow images with higer minor versions */ - char img_version[64]; /* Top level version for images in this meta */ - u16 meta_hdr_sz; /* size of this header */ - u16 img_hdr_sz; /* size of img_header_entry list */ -} meta_header_t; - -typedef struct img_header_entry { - char ptn_name[MAX_GPT_NAME_SIZE]; - u32 start_offset; - u32 size; -} img_header_entry_t; - - - -typedef int bool; -typedef struct device_info device_info; - -#define DEVICE_MAGIC "ANDROID-BOOT!" -#define DEVICE_MAGIC_SIZE 13 -#define MAX_PANEL_ID_LEN 64 -#define MAX_VERSION_LEN 64 - -struct device_info -{ - unsigned char magic[DEVICE_MAGIC_SIZE]; - bool is_unlocked; - bool is_tampered; - bool is_verified; - bool charger_screen_enabled; - char display_panel[MAX_PANEL_ID_LEN]; - char bootloader_version[MAX_VERSION_LEN]; - char radio_version[MAX_VERSION_LEN]; -}; - -#endif diff --git a/common/meta_image/meta_image.c b/common/meta_image/meta_image.c deleted file mode 100644 index e825ef28..00000000 --- a/common/meta_image/meta_image.c +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) 2015, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of The Linux Foundation nor - * the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#define VERBOSE 1 - -#include <stdio.h> -#include <stdlib.h> -#include <malloc.h> -#include <string.h> -#include <sys/stat.h> -#include "meta_format.h" - -#define MAX_IMAGES 16 - -meta_header_t meta_header; -img_header_entry_t img_header[MAX_IMAGES]; - -enum MetaImage -{ - undefined, - bootloader, - radio -}; - -enum MetaImage meta_image = undefined; -struct device_info di; - -void usage() -{ - printf("\nUsage:\n"); - printf("meta_image <ptn1> <file1> <ptn2> <file2> ... <ptnN> <fileN> -o <output_file> -v <version>\n"); - printf("eg: meta_image sbl1 sbl1.mbn rpm rpm.mbn tz tz.mbn hyp hyp.mbn aboot emmc_appsboot.mbn -o bootloader.img -v M8916AAAAAULGD21210017.1\n"); -} - -int read_devinfo () -{ - FILE *fin = fopen("devinfo.bin", "rb"); - fread(&di, sizeof(di), 1, fin); - fclose(fin); -} - -int write_devinfo () -{ - FILE *fout; - /* If image exists, just update it */ - read_devinfo(); - - /* No devinfo.bin, create new one */ - strncpy(di.magic, DEVICE_MAGIC, sizeof(DEVICE_MAGIC)); - di.is_unlocked = 1; - di.is_tampered = 0; - di.is_verified = 0; - di.charger_screen_enabled = 1; - memset(di.display_panel, 0, sizeof(di.display_panel)); - - if (meta_image == bootloader) - memcpy(di.bootloader_version, meta_header.img_version, sizeof(di.bootloader_version)); - else if (meta_image == radio) - memcpy(di.radio_version, meta_header.img_version, sizeof(di.radio_version)); - - fout = fopen("devinfo.bin", "wb"); - fwrite(&di, sizeof(di), 1, fout); - fclose(fout); -} - -int extract_images (char *file_path) -{ - FILE *fp; - FILE *fout; - void *buffer; - int i, images = 0; - -#if VERBOSE - printf ("Extracting images...\n"); -#endif - - if(strstr(file_path, "bootloader")) - meta_image = bootloader; - else - meta_image = radio; - - if(file_path != NULL) { - fp = fopen(file_path, "rb"); - fread(&meta_header, sizeof(meta_header), 1, fp); - fread(&img_header, sizeof(img_header), 1, fp); -#if VERBOSE - printf("Image version: %s\n", meta_header.img_version); -#endif - - images = meta_header.img_hdr_sz / sizeof(img_header_entry_t); - for(i=0; i<images; i++) { - if((img_header[i].ptn_name == NULL) || - (img_header[i].start_offset == 0) || - (img_header[i].size == 0)) - break; -#if VERBOSE - printf("%16s %8d %8d\n", img_header[i].ptn_name, img_header[i].start_offset, img_header[i].size); -#endif - fout = fopen(strcat(img_header[i].ptn_name,".bin"), "wb"); - fseek(fp, img_header[i].start_offset, SEEK_SET); - buffer = malloc(img_header[i].size); - fread(buffer, img_header[i].size, 1, fp); - fwrite(buffer, img_header[i].size, 1, fout); - free(buffer); - fclose(fout); - } - fclose(fp); - } - - write_devinfo(); - - return 0; -} - -int main(int argc, char *argv[]) -{ - int i, entry=0; - int images=0; - int start_offset = sizeof(meta_header_t) + sizeof(img_header); - struct stat st; - FILE *f[MAX_IMAGES], *meta_image = NULL; - void *buffer; - - meta_header.magic = META_HEADER_MAGIC; - meta_header.major_version = 1; - meta_header.minor_version = 0; - meta_header.meta_hdr_sz = sizeof(meta_header); - meta_header.img_hdr_sz = sizeof(img_header); - - for (i=1; i<argc; i++) { - - if (strcmp(argv[i], "-o") == 0) { - /* Output file name */ - meta_image = fopen(argv[++i], "wb"); - } else if (strcmp(argv[i], "-v") == 0) { - /* Image version string */ - strncpy(meta_header.img_version, argv[++i], 32); - } else if (strcmp(argv[i], "-x") == 0) { - /* Special case - extract images from meta_image */ - extract_images(argv[++i]); - return 0; - } else { - /* Populate entry in img_header for ptn name, size & offset */ - strcpy(img_header[entry].ptn_name, argv[i]); - img_header[entry].start_offset = start_offset; - i++; - stat(argv[i], &st); - img_header[entry].size = st.st_size; - start_offset += st.st_size; - f[entry] = fopen(argv[i], "rb"); - entry++; - images++; - } - } - - if(meta_image == NULL) { - printf("Error: output file not specificed\n"); - usage(); - exit(-1); - } - -#if VERBOSE - printf ("Generating meta image from %d images...\n", images); -#endif - fwrite (&meta_header, sizeof(meta_header), 1, meta_image); - fwrite (img_header, sizeof(img_header), 1, meta_image); -#if VERBOSE - printf (" ptn_name start_offset size\n"); -#endif - for (i=0; i<images; i++) { - printf ("%16s %8d %8d\n", img_header[i].ptn_name, - img_header[i].start_offset, - img_header[i].size); - - buffer = malloc(img_header[i].size); - fread(buffer, img_header[i].size, 1, f[i]); - fwrite (buffer, img_header[i].size, 1, meta_image); - fclose(f[i]); - free(buffer); - } - -#if VERBOSE - printf ("Done.\n"); -#endif - fclose(meta_image); - return 0; -} - diff --git a/common/power/Android.mk b/common/power/Android.mk deleted file mode 100644 index 4755ab93..00000000 --- a/common/power/Android.mk +++ /dev/null @@ -1,54 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -ifeq ($(call is-vendor-board-platform,QCOM),true) - -# HAL module implemenation stored in -# hw/<POWERS_HARDWARE_MODULE_ID>.<ro.hardware>.so -include $(CLEAR_VARS) - -LOCAL_MODULE_RELATIVE_PATH := hw -LOCAL_SHARED_LIBRARIES := liblog libcutils libdl -LOCAL_SRC_FILES := power.c metadata-parser.c utils.c list.c hint-data.c - -# Include target-specific files. -ifeq ($(call is-board-platform-in-list, msm8974), true) -LOCAL_SRC_FILES += power-8974.c -endif - -ifeq ($(call is-board-platform-in-list, msm8226), true) -LOCAL_SRC_FILES += power-8226.c -endif - -ifeq ($(call is-board-platform-in-list, msm8610), true) -LOCAL_SRC_FILES += power-8610.c -endif - -ifeq ($(call is-board-platform-in-list, apq8084), true) -LOCAL_SRC_FILES += power-8084.c -endif - -ifeq ($(call is-board-platform-in-list, msm8994), true) -LOCAL_SRC_FILES += power-8994.c -endif - -ifeq ($(call is-board-platform-in-list, msm8996), true) -LOCAL_SRC_FILES += power-8996.c -endif - -ifeq ($(call is-board-platform-in-list,msm8952), true) -LOCAL_SRC_FILES += power-8952.c -endif - -ifeq ($(TARGET_USES_INTERACTION_BOOST),true) - LOCAL_CFLAGS += -DINTERACTION_BOOST -endif - -ifneq ($(TARGET_USES_AOSP),true) - LOCAL_CFLAGS += -DEXTRA_POWERHAL_HINTS -endif - -LOCAL_MODULE := power.$(patsubst %f,%,$(subst _eas,,$(subst aosp_,,$(TARGET_PRODUCT)))) -LOCAL_MODULE_TAGS := optional -include $(BUILD_SHARED_LIBRARY) - -endif diff --git a/common/power/hint-data.c b/common/power/hint-data.c deleted file mode 100644 index 67da77ad..00000000 --- a/common/power/hint-data.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "hint-data.h" - -int hint_compare(struct hint_data *first_hint, - struct hint_data *other_hint) { - if (first_hint == other_hint) { - return 0; - } else if ((first_hint && other_hint) && - (first_hint->hint_id == other_hint->hint_id)) { - return 0; - } else { - return 1; - } -} - -void hint_dump(struct hint_data *hint) -{ - /*ALOGI("hint_id: %lu", hint->hint_id);*/ -} diff --git a/common/power/hint-data.h b/common/power/hint-data.h deleted file mode 100644 index 9564843d..00000000 --- a/common/power/hint-data.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Default use-case hint IDs */ -#define DEFAULT_VIDEO_ENCODE_HINT_ID (0x0A00) -#define DEFAULT_VIDEO_DECODE_HINT_ID (0x0B00) -#define DISPLAY_STATE_HINT_ID (0x0C00) -#define DISPLAY_STATE_HINT_ID_2 (0x0D00) -#define CAM_PREVIEW_HINT_ID (0x0E00) - -struct hint_data { - unsigned long hint_id; /* This is our key. */ - unsigned long perflock_handle; -}; - -int hint_compare(struct hint_data *first_hint, - struct hint_data *other_hint); -void hint_dump(struct hint_data *hint); diff --git a/common/power/list.c b/common/power/list.c deleted file mode 100644 index 0fe8de29..00000000 --- a/common/power/list.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "list.h" -#include <utils/Log.h> - -int init_list_head(struct list_node *head) -{ - if (head == NULL) - return -1; - - memset(head, 0, sizeof(*head)); - - return 0; -} - -struct list_node *add_list_node(struct list_node *head, void *data) -{ - /* Create a new list_node. And put 'data' into it. */ - struct list_node *new_node; - - if (head == NULL) { - return NULL; - } - - if (!(new_node = malloc(sizeof(struct list_node)))) { - return NULL; - } - - new_node->data = data; - new_node->next = head->next; - new_node->compare = head->compare; - new_node->dump = head->dump; - head->next = new_node; - - return new_node; -} - -int is_list_empty(struct list_node *head) -{ - return (head == NULL || head->next == NULL); -} - -/* - * Delink and de-allocate 'node'. - */ -int remove_list_node(struct list_node *head, struct list_node *del_node) -{ - struct list_node *current_node; - struct list_node *saved_node; - - if (head == NULL || head->next == NULL) { - return -1; - } - - current_node = head->next; - saved_node = head; - - while (current_node && current_node != del_node) { - saved_node = current_node; - current_node = current_node->next; - } - - if (saved_node) { - if (current_node) { - saved_node->next = current_node->next; - } else { - /* Node not found. */ - return -1; - } - } - - if (del_node) { - free(del_node); - } - - return 0; -} - -void dump_list(struct list_node *head) -{ - struct list_node *current_node = head; - - if (head == NULL) - return; - - printf("List:\n"); - - while ((current_node = current_node->next)) { - if (current_node->dump) { - current_node->dump(current_node->data); - } - } -} - -struct list_node *find_node(struct list_node *head, void *comparison_data) -{ - struct list_node *current_node = head; - - if (head == NULL) - return NULL; - - while ((current_node = current_node->next)) { - if (current_node->compare) { - if (current_node->compare(current_node->data, - comparison_data) == 0) { - /* Match found. Return current_node. */ - return current_node; - } - } - } - - /* No match found. */ - return NULL; -} diff --git a/common/power/list.h b/common/power/list.h deleted file mode 100644 index d68c3df1..00000000 --- a/common/power/list.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -struct list_node { - struct list_node *next; - void *data; - int (*compare)(void *data1, void *data2); - void (*dump)(void *data); -}; - -int init_list_head(struct list_node *head); -struct list_node * add_list_node(struct list_node *head, void *data); -int remove_list_node(struct list_node *head, struct list_node *del_node); -void dump_list(struct list_node *head); -struct list_node *find_node(struct list_node *head, void *comparison_data); diff --git a/common/power/metadata-defs.h b/common/power/metadata-defs.h deleted file mode 100644 index 44cb1958..00000000 --- a/common/power/metadata-defs.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#define ATTRIBUTE_VALUE_DELIM ('=') -#define ATTRIBUTE_STRING_DELIM (";") - -#define METADATA_PARSING_ERR (-1) -#define METADATA_PARSING_CONTINUE (0) -#define METADATA_PARSING_DONE (1) - -#define MIN(x,y) (((x)>(y))?(y):(x)) - -struct video_encode_metadata_t { - int hint_id; - int state; -}; - -struct video_decode_metadata_t { - int hint_id; - int state; -}; - -struct cam_preview_metadata_t { - int hint_id; - int state; -}; - -int parse_metadata(char *metadata, char **metadata_saveptr, - char *attribute, int attribute_size, char *value, int value_size); -int parse_video_encode_metadata(char *metadata, - struct video_encode_metadata_t *video_encode_metadata); -int parse_video_decode_metadata(char *metadata, - struct video_decode_metadata_t *video_decode_metadata); -int parse_cam_preview_metadata(char *metadata, - struct cam_preview_metadata_t *video_decode_metadata); diff --git a/common/power/metadata-parser.c b/common/power/metadata-parser.c deleted file mode 100644 index bd9fb861..00000000 --- a/common/power/metadata-parser.c +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - -#include "metadata-defs.h" - -int parse_metadata(char *metadata, char **metadata_saveptr, - char *attribute, int attribute_size, char *value, int value_size) -{ - char *attribute_string; - char *attribute_value_delim; - unsigned int bytes_to_copy; - - attribute_string = strtok_r(metadata, ATTRIBUTE_STRING_DELIM, - metadata_saveptr); - - if (attribute_string == NULL) - return METADATA_PARSING_DONE; - - attribute[0] = value[0] = '\0'; - - if ((attribute_value_delim = strchr(attribute_string, - ATTRIBUTE_VALUE_DELIM)) != NULL) { - bytes_to_copy = MIN((attribute_value_delim - attribute_string), - attribute_size - 1); - strncpy(attribute, attribute_string, - bytes_to_copy); - attribute[bytes_to_copy] = '\0'; - - bytes_to_copy = MIN(strlen(attribute_string) - strlen(attribute) - 1, - value_size - 1); - strncpy(value, attribute_value_delim + 1, - bytes_to_copy); - value[bytes_to_copy] = '\0'; - } - - return METADATA_PARSING_CONTINUE; -} - -int parse_cam_preview_metadata(char *metadata, - struct cam_preview_metadata_t *cam_preview_metadata) -{ - char attribute[1024], value[1024], *saveptr; - char *temp_metadata = metadata; - int parsing_status; - - while ((parsing_status = parse_metadata(temp_metadata, &saveptr, - attribute, sizeof(attribute), value, sizeof(value))) == METADATA_PARSING_CONTINUE) { - if (strlen(attribute) == strlen("hint_id") && - (strncmp(attribute, "hint_id", strlen("hint_id")) == 0)) { - if (strlen(value) > 0) { - cam_preview_metadata->hint_id = atoi(value); - } - } - - if (strlen(attribute) == strlen("state") && - (strncmp(attribute, "state", strlen("state")) == 0)) { - if (strlen(value) > 0) { - cam_preview_metadata->state = atoi(value); - } - } - - temp_metadata = NULL; - } - - if (parsing_status == METADATA_PARSING_ERR) - return -1; - - return 0; -} - -int parse_video_encode_metadata(char *metadata, - struct video_encode_metadata_t *video_encode_metadata) -{ - char attribute[1024], value[1024], *saveptr; - char *temp_metadata = metadata; - int parsing_status; - - while ((parsing_status = parse_metadata(temp_metadata, &saveptr, - attribute, sizeof(attribute), value, sizeof(value))) == METADATA_PARSING_CONTINUE) { - if (strlen(attribute) == strlen("hint_id") && - (strncmp(attribute, "hint_id", strlen("hint_id")) == 0)) { - if (strlen(value) > 0) { - video_encode_metadata->hint_id = atoi(value); - } - } - - if (strlen(attribute) == strlen("state") && - (strncmp(attribute, "state", strlen("state")) == 0)) { - if (strlen(value) > 0) { - video_encode_metadata->state = atoi(value); - } - } - - temp_metadata = NULL; - } - - if (parsing_status == METADATA_PARSING_ERR) - return -1; - - return 0; -} - -int parse_video_decode_metadata(char *metadata, - struct video_decode_metadata_t *video_decode_metadata) -{ - char attribute[1024], value[1024], *saveptr; - char *temp_metadata = metadata; - int parsing_status; - - while ((parsing_status = parse_metadata(temp_metadata, &saveptr, - attribute, sizeof(attribute), value, sizeof(value))) == METADATA_PARSING_CONTINUE) { - if (strlen(attribute) == strlen("hint_id") && - (strncmp(attribute, "hint_id", strlen("hint_id")) == 0)) { - if (strlen(value) > 0) { - video_decode_metadata->hint_id = atoi(value); - } - } - - if (strlen(attribute) == strlen("state") && - (strncmp(attribute, "state", strlen("state")) == 0)) { - if (strlen(value) > 0) { - video_decode_metadata->state = atoi(value); - } - } - - temp_metadata = NULL; - } - - if (parsing_status == METADATA_PARSING_ERR) - return -1; - - return 0; -} diff --git a/common/power/performance.h b/common/power/performance.h deleted file mode 100755 index b6db6377..00000000 --- a/common/power/performance.h +++ /dev/null @@ -1,244 +0,0 @@ -/* Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#define FAILED -1 -#define SUCCESS 0 -#define INDEFINITE_DURATION 0 - -enum SCREEN_DISPLAY_TYPE { - DISPLAY_OFF = 0x00FF, -}; - -enum PWR_CLSP_TYPE { - ALL_CPUS_PWR_CLPS_DIS = 0x101, -}; - -/* For CPUx min freq, the leftmost byte - * represents the CPU and the - * rightmost byte represents the frequency - * All intermediate frequencies on the - * device are supported. The hex value - * passed into PerfLock will be multiplied - * by 10^5. This frequency or the next - * highest frequency available will be set - * - * For example, if 1.4 Ghz is required on - * CPU0, use 0x20E - * - * If the highest available frequency - * on the device is required, use - * CPUx_MIN_FREQ_TURBO_MAX - * where x represents the CPU - */ -enum CPU0_MIN_FREQ_LVL { - CPU0_MIN_FREQ_NONTURBO_MAX = 0x20A, - CPU0_MIN_FREQ_TURBO_MAX = 0x2FE, -}; - -enum CPU1_MIN_FREQ_LVL { - CPU1_MIN_FREQ_NONTURBO_MAX = 0x30A, - CPU1_MIN_FREQ_TURBO_MAX = 0x3FE, -}; - -enum CPU2_MIN_FREQ_LVL { - CPU2_MIN_FREQ_NONTURBO_MAX = 0x40A, - CPU2_MIN_FREQ_TURBO_MAX = 0x4FE, -}; - -enum CPU3_MIN_FREQ_LVL { - CPU3_MIN_FREQ_NONTURBO_MAX = 0x50A, - CPU3_MIN_FREQ_TURBO_MAX = 0x5FE, -}; - -enum CPU0_MAX_FREQ_LVL { - CPU0_MAX_FREQ_NONTURBO_MAX = 0x150A, -}; - -enum CPU1_MAX_FREQ_LVL { - CPU1_MAX_FREQ_NONTURBO_MAX = 0x160A, -}; - -enum CPU2_MAX_FREQ_LVL { - CPU2_MAX_FREQ_NONTURBO_MAX = 0x170A, -}; - -enum CPU3_MAX_FREQ_LVL { - CPU3_MAX_FREQ_NONTURBO_MAX = 0x180A, -}; - -enum MIN_CPUS_ONLINE_LVL { - CPUS_ONLINE_MIN_2 = 0x702, - CPUS_ONLINE_MIN_3 = 0x703, - CPUS_ONLINE_MIN_4 = 0x704, - CPUS_ONLINE_MPD_OVERRIDE = 0x777, - CPUS_ONLINE_MAX = 0x7FF, -}; - -enum MAX_CPUS_ONLINE_LVL { - CPUS_ONLINE_MAX_LIMIT_1 = 0x8FE, - CPUS_ONLINE_MAX_LIMIT_2 = 0x8FD, - CPUS_ONLINE_MAX_LIMIT_3 = 0x8FC, - CPUS_ONLINE_MAX_LIMIT_4 = 0x8FB, - CPUS_ONLINE_MAX_LIMIT_MAX = 0x8FB, -}; - -enum SAMPLING_RATE_LVL { - MS_500 = 0xBCD, - MS_50 = 0xBFA, - MS_20 = 0xBFD, -}; - -enum ONDEMAND_IO_BUSY_LVL { - IO_BUSY_OFF = 0xC00, - IO_BUSY_ON = 0xC01, -}; - -enum ONDEMAND_SAMPLING_DOWN_FACTOR_LVL { - SAMPLING_DOWN_FACTOR_1 = 0xD01, - SAMPLING_DOWN_FACTOR_4 = 0xD04, -}; - -enum INTERACTIVE_TIMER_RATE_LVL { - TR_MS_500 = 0xECD, - TR_MS_100 = 0xEF5, - TR_MS_50 = 0xEFA, - TR_MS_30 = 0xEFC, - TR_MS_20 = 0xEFD, -}; - -/* This timer rate applicable to cpu0 - across 8939/8952 series chipset */ -enum INTERACTIVE_TIMER_RATE_LVL_CPU0_8939 { - TR_MS_CPU0_500 = 0x30CD, - TR_MS_CPU0_100 = 0x30F5, - TR_MS_CPU0_50 = 0x30FA, - TR_MS_CPU0_30 = 0x30FC, - TR_MS_CPU0_20 = 0x30FD, -}; - -/* This timer rate applicable to cpu4 - across 8939/8952 series chipset */ -enum INTERACTIVE_TIMER_RATE_LVL_CPU4_8939 { - TR_MS_CPU4_500 = 0x3BCD, - TR_MS_CPU4_100 = 0x3BF5, - TR_MS_CPU4_50 = 0x3BFA, - TR_MS_CPU4_30 = 0x3BFC, - TR_MS_CPU4_20 = 0x3BFD, -}; - -enum INTERACTIVE_HISPEED_FREQ_LVL { - HS_FREQ_1026 = 0xF0A, -}; - -enum INTERACTIVE_HISPEED_LOAD_LVL { - HISPEED_LOAD_90 = 0x105A, -}; - -enum SYNC_FREQ_LVL { - SYNC_FREQ_300 = 0x1103, - SYNC_FREQ_600 = 0X1106, - SYNC_FREQ_384 = 0x1103, - SYNC_FREQ_NONTURBO_MAX = 0x110A, - SYNC_FREQ_TURBO = 0x110F, -}; - -enum OPTIMAL_FREQ_LVL { - OPTIMAL_FREQ_300 = 0x1203, - OPTIMAL_FREQ_600 = 0x1206, - OPTIMAL_FREQ_384 = 0x1203, - OPTIMAL_FREQ_NONTURBO_MAX = 0x120A, - OPTIMAL_FREQ_TURBO = 0x120F, -}; - -enum SCREEN_PWR_CLPS_LVL { - PWR_CLPS_DIS = 0x1300, - PWR_CLPS_ENA = 0x1301, -}; - -enum THREAD_MIGRATION_LVL { - THREAD_MIGRATION_SYNC_OFF = 0x1400, -}; - -enum SCHED_GUIDED_LVL { - INTERACTIVE_USE_SCHED_LOAD_OFF = 0x5201, - INTERACTIVE_USE_MIGRATION_NOTIF_OFF = 0x5301 -}; - -enum INTERACTIVE_IO_BUSY_LVL { - INTERACTIVE_IO_BUSY_OFF = 0x1B00, - INTERACTIVE_IO_BUSY_ON = 0x1B01, -}; - -enum SCHED_BOOST_LVL { - SCHED_BOOST_ON = 0x1E01, -}; - -enum CPU4_MIN_FREQ_LVL { - CPU4_MIN_FREQ_NONTURBO_MAX = 0x1F0A, - CPU4_MIN_FREQ_TURBO_MAX = 0x1FFE, -}; - -enum CPU5_MIN_FREQ_LVL { - CPU5_MIN_FREQ_NONTURBO_MAX = 0x200A, - CPU5_MIN_FREQ_TURBO_MAX = 0x20FE, -}; - -enum CPU6_MIN_FREQ_LVL { - CPU6_MIN_FREQ_NONTURBO_MAX = 0x210A, - CPU6_MIN_FREQ_TURBO_MAX = 0x21FE, -}; - -enum CPU7_MIN_FREQ_LVL { - CPU7_MIN_FREQ_NONTURBO_MAX = 0x220A, - CPU7_MIN_FREQ_TURBO_MAX = 0x22FE, -}; - -enum CPU4_MAX_FREQ_LVL { - CPU4_MAX_FREQ_NONTURBO_MAX = 0x230A, -}; - -enum CPU5_MAX_FREQ_LVL { - CPU5_MAX_FREQ_NONTURBO_MAX = 0x240A, -}; - -enum CPU6_MAX_FREQ_LVL { - CPU6_MAX_FREQ_NONTURBO_MAX = 0x250A, -}; - -enum CPU7_MAX_FREQ_LVL { - CPU7_MAX_FREQ_NONTURBO_MAX = 0x260A, -}; - -#ifdef __cplusplus -} -#endif diff --git a/common/power/power-8084.c b/common/power/power-8084.c deleted file mode 100644 index e4aacb71..00000000 --- a/common/power/power-8084.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#define LOG_NIDEBUG 0 - -#include <errno.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <dlfcn.h> -#include <stdlib.h> - -#define LOG_TAG "QCOM PowerHAL" -#include <utils/Log.h> -#include <hardware/hardware.h> -#include <hardware/power.h> - -#include "utils.h" -#include "metadata-defs.h" -#include "hint-data.h" -#include "performance.h" -#include "power-common.h" - -static int display_hint_sent; -static int display_hint2_sent; -static int first_display_off_hint; -extern int display_boost; - -int set_interactive_override(struct power_module *module, int on) -{ - char governor[80]; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return HINT_NONE; - } - - if (!on) { - /* Display off. */ - /* - * We need to be able to identify the first display off hint - * and release the current lock holder - */ - if (display_boost) { - if (!first_display_off_hint) { - undo_initial_hint_action(); - first_display_off_hint = 1; - } - /* used for all subsequent toggles to the display */ - if (!display_hint2_sent) { - undo_hint_action(DISPLAY_STATE_HINT_ID_2); - display_hint2_sent = 1; - } - } - - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - int resource_values[] = {MS_500, SYNC_FREQ_600, OPTIMAL_FREQ_600, THREAD_MIGRATION_SYNC_OFF}; - - if (!display_hint_sent) { - perform_hint_action(DISPLAY_STATE_HINT_ID, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - display_hint_sent = 1; - } - - return HINT_HANDLED; - } - } else { - /* Display on */ - if (display_boost && display_hint2_sent) { - int resource_values2[] = {CPUS_ONLINE_MIN_2}; - perform_hint_action(DISPLAY_STATE_HINT_ID_2, - resource_values2, sizeof(resource_values2)/sizeof(resource_values2[0])); - display_hint2_sent = 0; - } - - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - undo_hint_action(DISPLAY_STATE_HINT_ID); - display_hint_sent = 0; - - return HINT_HANDLED; - } - } - - return HINT_NONE; -} diff --git a/common/power/power-8226.c b/common/power/power-8226.c deleted file mode 100644 index 6df62df7..00000000 --- a/common/power/power-8226.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#define LOG_NIDEBUG 0 - -#include <errno.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <dlfcn.h> -#include <stdlib.h> - -#define LOG_TAG "QCOM PowerHAL" -#include <utils/Log.h> -#include <hardware/hardware.h> -#include <hardware/power.h> - -#include "utils.h" -#include "metadata-defs.h" -#include "hint-data.h" -#include "performance.h" -#include "power-common.h" - -static int display_hint_sent; - -int power_hint_override(struct power_module *module, power_hint_t hint, void *data) -{ - switch(hint) { - case POWER_HINT_INTERACTION: - { - int resources[] = {0x702, 0x20B, 0x30B}; - int duration = 3000; - - interaction(duration, sizeof(resources)/sizeof(resources[0]), resources); - return HINT_HANDLED; - } - } - return HINT_NONE; -} diff --git a/common/power/power-8610.c b/common/power/power-8610.c deleted file mode 100644 index 6df62df7..00000000 --- a/common/power/power-8610.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#define LOG_NIDEBUG 0 - -#include <errno.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <dlfcn.h> -#include <stdlib.h> - -#define LOG_TAG "QCOM PowerHAL" -#include <utils/Log.h> -#include <hardware/hardware.h> -#include <hardware/power.h> - -#include "utils.h" -#include "metadata-defs.h" -#include "hint-data.h" -#include "performance.h" -#include "power-common.h" - -static int display_hint_sent; - -int power_hint_override(struct power_module *module, power_hint_t hint, void *data) -{ - switch(hint) { - case POWER_HINT_INTERACTION: - { - int resources[] = {0x702, 0x20B, 0x30B}; - int duration = 3000; - - interaction(duration, sizeof(resources)/sizeof(resources[0]), resources); - return HINT_HANDLED; - } - } - return HINT_NONE; -} diff --git a/common/power/power-8952.c b/common/power/power-8952.c deleted file mode 100644 index 9e8b9896..00000000 --- a/common/power/power-8952.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2015, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#define LOG_NIDEBUG 0 - -#include <errno.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <dlfcn.h> -#include <stdlib.h> - -#define LOG_TAG "QTI PowerHAL" -#include <utils/Log.h> -#include <hardware/hardware.h> -#include <hardware/power.h> - -#include "utils.h" -#include "metadata-defs.h" -#include "hint-data.h" -#include "performance.h" -#include "power-common.h" - -static int saved_interactive_mode = -1; -static int display_hint_sent; -static int video_encode_hint_sent; - -static void process_video_encode_hint(void *metadata); - -int power_hint_override(struct power_module *module, power_hint_t hint, - void *data) -{ - - switch(hint) { - case POWER_HINT_VSYNC: - break; - case POWER_HINT_VIDEO_ENCODE: - { - process_video_encode_hint(data); - return HINT_HANDLED; - } - } - return HINT_NONE; -} - -int set_interactive_override(struct power_module *module, int on) -{ - char governor[80]; - char tmp_str[NODE_MAX]; - struct video_encode_metadata_t video_encode_metadata; - int rc; - - ALOGI("Got set_interactive hint"); - - if (get_scaling_governor_check_cores(governor, sizeof(governor),CPU0) == -1) { - if (get_scaling_governor_check_cores(governor, sizeof(governor),CPU1) == -1) { - if (get_scaling_governor_check_cores(governor, sizeof(governor),CPU2) == -1) { - if (get_scaling_governor_check_cores(governor, sizeof(governor),CPU3) == -1) { - ALOGE("Can't obtain scaling governor."); - return HINT_HANDLED; - } - } - } - } - - if (!on) { - /* Display off. */ - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - int resource_values[] = {TR_MS_CPU0_50,TR_MS_CPU4_50, THREAD_MIGRATION_SYNC_OFF}; - - if (!display_hint_sent) { - perform_hint_action(DISPLAY_STATE_HINT_ID, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - display_hint_sent = 1; - } - } /* Perf time rate set for CORE0,CORE4 8952 target*/ - - } else { - /* Display on. */ - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - - undo_hint_action(DISPLAY_STATE_HINT_ID); - display_hint_sent = 0; - } - } - saved_interactive_mode = !!on; - return HINT_HANDLED; -} - -/* Video Encode Hint */ -static void process_video_encode_hint(void *metadata) -{ - char governor[80]; - struct video_encode_metadata_t video_encode_metadata; - - ALOGI("Got process_video_encode_hint"); - - if (get_scaling_governor_check_cores(governor, - sizeof(governor),CPU0) == -1) { - if (get_scaling_governor_check_cores(governor, - sizeof(governor),CPU1) == -1) { - if (get_scaling_governor_check_cores(governor, - sizeof(governor),CPU2) == -1) { - if (get_scaling_governor_check_cores(governor, - sizeof(governor),CPU3) == -1) { - ALOGE("Can't obtain scaling governor."); - return HINT_HANDLED; - } - } - } - } - - /* Initialize encode metadata struct fields. */ - memset(&video_encode_metadata, 0, sizeof(struct video_encode_metadata_t)); - video_encode_metadata.state = -1; - video_encode_metadata.hint_id = DEFAULT_VIDEO_ENCODE_HINT_ID; - - if (metadata) { - if (parse_video_encode_metadata((char *)metadata, - &video_encode_metadata) == -1) { - ALOGE("Error occurred while parsing metadata."); - return; - } - } else { - return; - } - - if (video_encode_metadata.state == 1) { - if ((strncmp(governor, INTERACTIVE_GOVERNOR, - strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - /* Sched_load and migration_notif*/ - int resource_values[] = {INTERACTIVE_USE_SCHED_LOAD_OFF, - INTERACTIVE_USE_MIGRATION_NOTIF_OFF}; - if (!video_encode_hint_sent) { - perform_hint_action(video_encode_metadata.hint_id, - resource_values, - sizeof(resource_values)/sizeof(resource_values[0])); - video_encode_hint_sent = 1; - } - } - } else if (video_encode_metadata.state == 0) { - if ((strncmp(governor, INTERACTIVE_GOVERNOR, - strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - undo_hint_action(video_encode_metadata.hint_id); - video_encode_hint_sent = 0; - return ; - } - } - return; -} diff --git a/common/power/power-8974.c b/common/power/power-8974.c deleted file mode 100644 index 7aa15294..00000000 --- a/common/power/power-8974.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#define LOG_NIDEBUG 0 - -#include <errno.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <dlfcn.h> -#include <stdlib.h> - -#define LOG_TAG "QCOM PowerHAL" -#include <utils/Log.h> -#include <hardware/hardware.h> -#include <hardware/power.h> - -#include "utils.h" -#include "metadata-defs.h" -#include "hint-data.h" -#include "performance.h" -#include "power-common.h" - -static int display_hint_sent; -static int display_hint2_sent; -static int first_display_off_hint; -extern int display_boost; - -int set_interactive_override(struct power_module *module, int on) -{ - char governor[80]; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return HINT_NONE; - } - - if (!on) { - /* Display off. */ - /* - * We need to be able to identify the first display off hint - * and release the current lock holder - */ - if (display_boost) { - if (!first_display_off_hint) { - undo_initial_hint_action(); - first_display_off_hint = 1; - } - /* used for all subsequent toggles to the display */ - if (!display_hint2_sent) { - undo_hint_action(DISPLAY_STATE_HINT_ID_2); - display_hint2_sent = 1; - } - } - - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - int resource_values[] = {MS_500, SYNC_FREQ_600, OPTIMAL_FREQ_600, THREAD_MIGRATION_SYNC_OFF}; - - if (!display_hint_sent) { - perform_hint_action(DISPLAY_STATE_HINT_ID, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - display_hint_sent = 1; - } - - return HINT_HANDLED; - } - } else { - /* Display on */ - if (display_boost && display_hint2_sent) { - int resource_values2[] = {CPUS_ONLINE_MIN_2}; - perform_hint_action(DISPLAY_STATE_HINT_ID_2, - resource_values2, sizeof(resource_values2)/sizeof(resource_values2[0])); - display_hint2_sent = 0; - } - - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - undo_hint_action(DISPLAY_STATE_HINT_ID); - display_hint_sent = 0; - - return HINT_HANDLED; - } - } - - return HINT_NONE; -} diff --git a/common/power/power-8994.c b/common/power/power-8994.c deleted file mode 100644 index 8658e068..00000000 --- a/common/power/power-8994.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2014, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#define LOG_NIDEBUG 0 - -#include <errno.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <dlfcn.h> -#include <stdlib.h> - -#define LOG_TAG "QCOM PowerHAL" -#include <utils/Log.h> -#include <hardware/hardware.h> -#include <hardware/power.h> - -#include "utils.h" -#include "metadata-defs.h" -#include "hint-data.h" -#include "performance.h" -#include "power-common.h" - -static int display_hint_sent; - -static int process_video_encode_hint(void *metadata) -{ - char governor[80]; - struct video_encode_metadata_t video_encode_metadata; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return HINT_NONE; - } - - /* Initialize encode metadata struct fields */ - memset(&video_encode_metadata, 0, sizeof(struct video_encode_metadata_t)); - video_encode_metadata.state = -1; - video_encode_metadata.hint_id = DEFAULT_VIDEO_ENCODE_HINT_ID; - - if (metadata) { - if (parse_video_encode_metadata((char *)metadata, &video_encode_metadata) == - -1) { - ALOGE("Error occurred while parsing metadata."); - return HINT_NONE; - } - } else { - return HINT_NONE; - } - - if (video_encode_metadata.state == 1) { - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - /* sched and cpufreq params - * hispeed freq - 768 MHz - * target load - 90 - * above_hispeed_delay - 40ms - * sched_small_tsk - 50 - */ - int resource_values[] = {0x2C07, 0x2F5A, 0x2704, 0x4032}; - - perform_hint_action(video_encode_metadata.hint_id, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - return HINT_HANDLED; - } - } else if (video_encode_metadata.state == 0) { - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - undo_hint_action(video_encode_metadata.hint_id); - return HINT_HANDLED; - } - } - return HINT_NONE; -} - -int power_hint_override(struct power_module *module, power_hint_t hint, void *data) -{ - int ret_val = HINT_NONE; - switch(hint) { - case POWER_HINT_VIDEO_ENCODE: - ret_val = process_video_encode_hint(data); - break; - default: - break; - } - return ret_val; -} - -int set_interactive_override(struct power_module *module, int on) -{ - return HINT_NONE; /* Don't excecute this code path, not in use */ - char governor[80]; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return HINT_NONE; - } - - if (!on) { - /* Display off */ - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - int resource_values[] = {}; /* dummy node */ - if (!display_hint_sent) { - perform_hint_action(DISPLAY_STATE_HINT_ID, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - display_hint_sent = 1; - return HINT_HANDLED; - } - } - } else { - /* Display on */ - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - undo_hint_action(DISPLAY_STATE_HINT_ID); - display_hint_sent = 0; - return HINT_HANDLED; - } - } - return HINT_NONE; -} diff --git a/common/power/power-8996.c b/common/power/power-8996.c deleted file mode 100644 index ac3f6481..00000000 --- a/common/power/power-8996.c +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Copyright (c) 2015, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#define LOG_NIDEBUG 0 - -#include <errno.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <dlfcn.h> -#include <stdlib.h> - -#define LOG_TAG "QCOM PowerHAL" -#include <utils/Log.h> -#include <hardware/hardware.h> -#include <hardware/power.h> - -#include "utils.h" -#include "metadata-defs.h" -#include "hint-data.h" -#include "performance.h" -#include "power-common.h" - -static int display_hint_sent; - -#ifdef EXTRA_POWERHAL_HINTS -static int process_cam_preview_hint(void *metadata) -{ - char governor[80]; - struct cam_preview_metadata_t cam_preview_metadata; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return HINT_NONE; - } - - /* Initialize encode metadata struct fields */ - memset(&cam_preview_metadata, 0, sizeof(struct cam_preview_metadata_t)); - cam_preview_metadata.state = -1; - cam_preview_metadata.hint_id = CAM_PREVIEW_HINT_ID; - - if (metadata) { - if (parse_cam_preview_metadata((char *)metadata, &cam_preview_metadata) == - -1) { - ALOGE("Error occurred while parsing metadata."); - return HINT_NONE; - } - } else { - return HINT_NONE; - } - - if (cam_preview_metadata.state == 1) { - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - /* sched and cpufreq params - * above_hispeed_delay for LVT - 40ms - * go hispeed load for LVT - 95 - * hispeed freq for LVT - 556 MHz - * target load for LVT - 90 - * above hispeed delay for sLVT - 40ms - * go hispeed load for sLVT - 95 - * hispeed freq for sLVT - 556 MHz - * target load for sLVT - 90 - * bus DCVS set to V2 config: - * low power ceil mpbs - 2500 - * low power io percent - 50 - */ - int resource_values[] = {0x41400000, 0x4, 0x41410000, 0x5F, 0x41414000, 0x22C, - 0x41420000, 0x5A, 0x41400100, 0x4, 0x41410100, 0x5F, 0x41414100, 0x22C, - 0x41420100, 0x5A, 0x41810000, 0x9C4, 0x41814000, 0x32}; - - perform_hint_action(cam_preview_metadata.hint_id, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - ALOGI("Cam Preview hint start"); - return HINT_HANDLED; - } else if ((strncmp(governor, SCHED_GOVERNOR, strlen(SCHED_GOVERNOR)) == 0) && - (strlen(governor) == strlen(SCHED_GOVERNOR))) { - /* - * lower bus BW to save power - * 0x41810000: low power ceil mpbs = 2500 - * 0x41814000: low power io percent = 50 - */ - int resource_values[] = {0x41810000, 0x9C4, 0x41814000, 0x32}; - - perform_hint_action( - cam_preview_metadata.hint_id, resource_values, - sizeof(resource_values) / sizeof(resource_values[0])); - ALOGI("Cam Preview hint start"); - return HINT_HANDLED; - } - } else if (cam_preview_metadata.state == 0) { - if (((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) || - ((strncmp(governor, SCHED_GOVERNOR, strlen(SCHED_GOVERNOR)) == 0) && - (strlen(governor) == strlen(SCHED_GOVERNOR)))) { - undo_hint_action(cam_preview_metadata.hint_id); - ALOGI("Cam Preview hint stop"); - return HINT_HANDLED; - } - } - return HINT_NONE; -} -#endif - -static int process_boost(int boost_handle, int duration) -{ - char governor[80]; - int eas_launch_resources[] = {0x40804000, 0xFFF, 0x40804100, 0xFFF, - 0x40800000, 0xFFF, 0x40800100, 0xFFF, - 0x41800000, 140, 0x40400000, 0x1}; - int hmp_launch_resources[] = {0x40C00000, 0x1, 0x40804000, 0xFFF, - 0x40804100, 0xFFF, 0x40800000, 0xFFF, - 0x40800100, 0xFFF, 0x41800000, 140, - 0x40400000, 0x1}; - int* launch_resources; - size_t launch_resources_size; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - return -1; - } - if (strncmp(governor, SCHED_GOVERNOR, strlen(SCHED_GOVERNOR)) == 0) { - launch_resources = eas_launch_resources; - launch_resources_size = sizeof(eas_launch_resources) / sizeof(eas_launch_resources[0]); - } else if (strncmp(governor, INTERACTIVE_GOVERNOR, - strlen(INTERACTIVE_GOVERNOR)) == 0) { /*HMP boost*/ - launch_resources = hmp_launch_resources; - launch_resources_size = sizeof(hmp_launch_resources) / sizeof(hmp_launch_resources[0]); - } - boost_handle = interaction_with_handle( - boost_handle, duration, launch_resources_size, launch_resources); - return boost_handle; -} - -static int process_video_encode_hint(void *metadata) -{ - char governor[80]; - struct video_encode_metadata_t video_encode_metadata; - static int boost_handle = -1; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return HINT_NONE; - } - - /* Initialize encode metadata struct fields */ - memset(&video_encode_metadata, 0, sizeof(struct video_encode_metadata_t)); - video_encode_metadata.state = -1; - video_encode_metadata.hint_id = DEFAULT_VIDEO_ENCODE_HINT_ID; - - if (metadata) { - if (parse_video_encode_metadata((char *)metadata, &video_encode_metadata) == - -1) { - ALOGE("Error occurred while parsing metadata."); - return HINT_NONE; - } - } else { - return HINT_NONE; - } - - if (video_encode_metadata.state == 1) { - int duration = 2000; // boosts 2s for starting encoding - boost_handle = process_boost(boost_handle, duration); - ALOGD("LAUNCH ENCODER-ON: %d MS", duration); - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - /* 1. cpufreq params - * -above_hispeed_delay for LVT - 40ms - * -go hispeed load for LVT - 95 - * -hispeed freq for LVT - 556 MHz - * -target load for LVT - 90 - * -above hispeed delay for sLVT - 40ms - * -go hispeed load for sLVT - 95 - * -hispeed freq for sLVT - 806 MHz - * -target load for sLVT - 90 - * 2. bus DCVS set to V2 config: - * -low power ceil mpbs - 2500 - * -low power io percent - 50 - * 3. hysteresis optimization - * -bus dcvs hysteresis tuning - * -sample_ms of 10 ms - * -disable ignore_hispeed_notif - * -sLVT hispeed freq to 806MHz - */ - int resource_values[] = { - 0x41810000, 0x9C4, 0x41814000, 0x32, 0x4180C000, 0x0, 0x41820000, 0xA, - 0x41438100, 0x1, 0x41438000, 0x1 }; - - perform_hint_action(video_encode_metadata.hint_id, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - ALOGI("Video Encode hint start"); - return HINT_HANDLED; - } else if ((strncmp(governor, SCHED_GOVERNOR, strlen(SCHED_GOVERNOR)) == 0) && - (strlen(governor) == strlen(SCHED_GOVERNOR))) { - - /* 1. bus DCVS set to V2 config: - * 0x41810000: low power ceil mpbs - 2500 - * 0x41814000: low power io percent - 50 - * 2. hysteresis optimization - * 0x4180C000: bus dcvs hysteresis tuning - * 0x41820000: sample_ms of 10 ms - */ - int resource_values[] = {0x41810000, 0x9C4, 0x41814000, 0x32, - 0x4180C000, 0x0, 0x41820000, 0xA}; - - perform_hint_action(video_encode_metadata.hint_id, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - ALOGI("Video Encode hint start"); - return HINT_HANDLED; - } - } else if (video_encode_metadata.state == 0) { - // boost handle is intentionally not released, release_request(boost_handle); - if (((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) || - ((strncmp(governor, SCHED_GOVERNOR, strlen(SCHED_GOVERNOR)) == 0) && - (strlen(governor) == strlen(SCHED_GOVERNOR)))) { - undo_hint_action(video_encode_metadata.hint_id); - ALOGI("Video Encode hint stop"); - return HINT_HANDLED; - } - } - return HINT_NONE; -} - -static int process_activity_launch_hint(void *data) -{ - static int launch_handle = -1; - static int launch_mode; - // boost will timeout in 5s - int duration = 5000; - - ALOGD("LAUNCH HINT: %s", data ? "ON" : "OFF"); - if (data && launch_mode == 0) { - launch_handle = process_boost(launch_handle, duration); - if (launch_handle > 0) { - launch_mode = 1; - ALOGI("Activity launch hint handled"); - return HINT_HANDLED; - } else { - return HINT_NONE; - } - } else if (data == NULL && launch_mode == 1) { - release_request(launch_handle); - launch_mode = 0; - return HINT_HANDLED; - } - return HINT_NONE; -} - -int power_hint_override(struct power_module *module, power_hint_t hint, void *data) -{ - int ret_val = HINT_NONE; - switch(hint) { -#ifdef EXTRA_POWERHAL_HINTS - case POWER_HINT_CAM_PREVIEW: - ret_val = process_cam_preview_hint(data); - break; -#endif - case POWER_HINT_VIDEO_ENCODE: - ret_val = process_video_encode_hint(data); - break; - case POWER_HINT_LAUNCH: - ret_val = process_activity_launch_hint(data); - break; - default: - break; - } - return ret_val; -} - -int set_interactive_override(struct power_module *module, int on) -{ - return HINT_HANDLED; /* Don't excecute this code path, not in use */ - char governor[80]; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return HINT_NONE; - } - - if (!on) { - /* Display off */ - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - int resource_values[] = {}; /* dummy node */ - if (!display_hint_sent) { - perform_hint_action(DISPLAY_STATE_HINT_ID, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - display_hint_sent = 1; - ALOGI("Display Off hint start"); - return HINT_HANDLED; - } - } - } else { - /* Display on */ - if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - undo_hint_action(DISPLAY_STATE_HINT_ID); - display_hint_sent = 0; - ALOGI("Display Off hint stop"); - return HINT_HANDLED; - } - } - return HINT_NONE; -} diff --git a/common/power/power-common.h b/common/power/power-common.h deleted file mode 100644 index aefce30e..00000000 --- a/common/power/power-common.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#define NODE_MAX (64) - -#define SCALING_GOVERNOR_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" -#define DCVS_CPU0_SLACK_MAX_NODE "/sys/module/msm_dcvs/cores/cpu0/slack_time_max_us" -#define DCVS_CPU0_SLACK_MIN_NODE "/sys/module/msm_dcvs/cores/cpu0/slack_time_min_us" -#define MPDECISION_SLACK_MAX_NODE "/sys/module/msm_mpdecision/slack_time_max_us" -#define MPDECISION_SLACK_MIN_NODE "/sys/module/msm_mpdecision/slack_time_min_us" -#define SCALING_MIN_FREQ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq" -#define ONDEMAND_GOVERNOR "ondemand" -#define INTERACTIVE_GOVERNOR "interactive" -#define MSMDCVS_GOVERNOR "msm-dcvs" -#define SCHED_GOVERNOR "sched" - -#define HINT_HANDLED (0) -#define HINT_NONE (-1) - -enum CPU_GOV_CHECK { - CPU0 = 0, - CPU1 = 1, - CPU2 = 2, - CPU3 = 3 -}; diff --git a/common/power/power.c b/common/power/power.c deleted file mode 100644 index 7825f160..00000000 --- a/common/power/power.c +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#define LOG_NIDEBUG 0 - -#include <errno.h> -#include <inttypes.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <dlfcn.h> -#include <stdlib.h> - -#define LOG_TAG "QCOM PowerHAL" -#include <utils/Log.h> -#include <hardware/hardware.h> -#include <hardware/power.h> -#include <cutils/properties.h> - -#include "utils.h" -#include "metadata-defs.h" -#include "hint-data.h" -#include "performance.h" -#include "power-common.h" - -#define USINSEC 1000000L -#define NSINUS 1000L - -#define PLATFORM_SLEEP_MODES 2 -#define XO_VOTERS 4 -#define VMIN_VOTERS 0 - -#define RPM_PARAMETERS 4 -#define NUM_PARAMETERS 12 - -#ifndef RPM_STAT -#define RPM_STAT "/d/rpm_stats" -#endif - -#ifndef RPM_MASTER_STAT -#define RPM_MASTER_STAT "/d/rpm_master_stats" -#endif - -/* RPM runs at 19.2Mhz. Divide by 19200 for msec */ -#define RPM_CLK 19200 - -const char *parameter_names[] = { - "vlow_count", - "accumulated_vlow_time", - "vmin_count", - "accumulated_vmin_time", - "xo_accumulated_duration", - "xo_count", - "xo_accumulated_duration", - "xo_count", - "xo_accumulated_duration", - "xo_count", - "xo_accumulated_duration", - "xo_count" -}; - -static int saved_dcvs_cpu0_slack_max = -1; -static int saved_dcvs_cpu0_slack_min = -1; -static int saved_mpdecision_slack_max = -1; -static int saved_mpdecision_slack_min = -1; -static int saved_interactive_mode = -1; -static int slack_node_rw_failed = 0; -static int display_hint_sent; -int display_boost; - -//interaction boost global variables -static pthread_mutex_t s_interaction_lock = PTHREAD_MUTEX_INITIALIZER; -static struct timespec s_previous_boost_timespec; -static int s_previous_duration; - -static struct hw_module_methods_t power_module_methods = { - .open = NULL, -}; - -static void power_init(struct power_module *module) -{ - ALOGI("QCOM power HAL initing."); - - int fd; - char buf[10] = {0}; - - fd = open("/sys/devices/soc0/soc_id", O_RDONLY); - if (fd >= 0) { - if (read(fd, buf, sizeof(buf) - 1) == -1) { - ALOGW("Unable to read soc_id"); - } else { - int soc_id = atoi(buf); - if (soc_id == 194 || (soc_id >= 208 && soc_id <= 218) || soc_id == 178) { - display_boost = 1; - } - } - close(fd); - } -} - -static void process_video_decode_hint(void *metadata) -{ - char governor[80]; - struct video_decode_metadata_t video_decode_metadata; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return; - } - - if (metadata) { - ALOGI("Processing video decode hint. Metadata: %s", (char *)metadata); - } - - /* Initialize encode metadata struct fields. */ - memset(&video_decode_metadata, 0, sizeof(struct video_decode_metadata_t)); - video_decode_metadata.state = -1; - video_decode_metadata.hint_id = DEFAULT_VIDEO_DECODE_HINT_ID; - - if (metadata) { - if (parse_video_decode_metadata((char *)metadata, &video_decode_metadata) == - -1) { - ALOGE("Error occurred while parsing metadata."); - return; - } - } else { - return; - } - - if (video_decode_metadata.state == 1) { - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - int resource_values[] = {THREAD_MIGRATION_SYNC_OFF}; - - perform_hint_action(video_decode_metadata.hint_id, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - } else if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - int resource_values[] = {TR_MS_30, HISPEED_LOAD_90, HS_FREQ_1026, THREAD_MIGRATION_SYNC_OFF}; - - perform_hint_action(video_decode_metadata.hint_id, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - } - } else if (video_decode_metadata.state == 0) { - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - } else if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - undo_hint_action(video_decode_metadata.hint_id); - } - } -} - -static void process_video_encode_hint(void *metadata) -{ - char governor[80]; - struct video_encode_metadata_t video_encode_metadata; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return; - } - - /* Initialize encode metadata struct fields. */ - memset(&video_encode_metadata, 0, sizeof(struct video_encode_metadata_t)); - video_encode_metadata.state = -1; - video_encode_metadata.hint_id = DEFAULT_VIDEO_ENCODE_HINT_ID; - - if (metadata) { - if (parse_video_encode_metadata((char *)metadata, &video_encode_metadata) == - -1) { - ALOGE("Error occurred while parsing metadata."); - return; - } - } else { - return; - } - - if (video_encode_metadata.state == 1) { - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - int resource_values[] = {IO_BUSY_OFF, SAMPLING_DOWN_FACTOR_1, THREAD_MIGRATION_SYNC_OFF}; - - perform_hint_action(video_encode_metadata.hint_id, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - } else if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - int resource_values[] = {TR_MS_30, HISPEED_LOAD_90, HS_FREQ_1026, THREAD_MIGRATION_SYNC_OFF, - INTERACTIVE_IO_BUSY_OFF}; - - perform_hint_action(video_encode_metadata.hint_id, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - } - } else if (video_encode_metadata.state == 0) { - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - undo_hint_action(video_encode_metadata.hint_id); - } else if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - undo_hint_action(video_encode_metadata.hint_id); - } - } -} - -int __attribute__ ((weak)) power_hint_override(struct power_module *module, power_hint_t hint, - void *data) -{ - return HINT_NONE; -} - -/* Declare function before use */ -void interaction(int duration, int num_args, int opt_list[]); -void release_request(int lock_handle); - -static long long calc_timespan_us(struct timespec start, struct timespec end) { - long long diff_in_us = 0; - diff_in_us += (end.tv_sec - start.tv_sec) * USINSEC; - diff_in_us += (end.tv_nsec - start.tv_nsec) / NSINUS; - return diff_in_us; -} - -static void power_hint(struct power_module *module, power_hint_t hint, - void *data) -{ - /* Check if this hint has been overridden. */ - if (power_hint_override(module, hint, data) == HINT_HANDLED) { - /* The power_hint has been handled. We can skip the rest. */ - return; - } - - switch(hint) { - case POWER_HINT_VSYNC: - break; - case POWER_HINT_INTERACTION: - { - char governor[80]; - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - return; - } - - int duration = 1500; // 1.5s by default - if (data) { - int input_duration = *((int*)data) + 750; - if (input_duration > duration) { - duration = (input_duration > 5750) ? 5750 : input_duration; - } - } - - struct timespec cur_boost_timespec; - clock_gettime(CLOCK_MONOTONIC, &cur_boost_timespec); - - pthread_mutex_lock(&s_interaction_lock); - long long elapsed_time = calc_timespan_us(s_previous_boost_timespec, cur_boost_timespec); - // don't hint if previous hint's duration covers this hint's duration - if ((s_previous_duration * 1000) > (elapsed_time + duration * 1000)) { - pthread_mutex_unlock(&s_interaction_lock); - return; - } - s_previous_boost_timespec = cur_boost_timespec; - s_previous_duration = duration; - pthread_mutex_unlock(&s_interaction_lock); - - // Scheduler is EAS. - if (strncmp(governor, SCHED_GOVERNOR, strlen(SCHED_GOVERNOR)) == 0) { - // Setting the value of foreground schedtune boost to 40 and - // scaling_min_freq to 900MHz. - int resources[] = {0x42C0C000, 0x32, 0x41800000, 0x33, 0x40800000, 900, 0x40800100, 900}; - interaction(duration, sizeof(resources)/sizeof(resources[0]), resources); - } else { // Scheduler is HMP. - int resources[] = {0x41800000, 0x33, 0x40800000, 1000, 0x40800100, 1000, 0x40C00000, 0x1}; - interaction(duration, sizeof(resources)/sizeof(resources[0]), resources); - } - } - break; - case POWER_HINT_VIDEO_ENCODE: - process_video_encode_hint(data); - break; - case POWER_HINT_VIDEO_DECODE: - process_video_decode_hint(data); - break; - } -} - -int __attribute__ ((weak)) set_interactive_override(struct power_module *module, int on) -{ - return HINT_NONE; -} - -void set_interactive(struct power_module *module, int on) -{ - char governor[80]; - char tmp_str[NODE_MAX]; - struct video_encode_metadata_t video_encode_metadata; - int rc = 0; - - if (set_interactive_override(module, on) == HINT_HANDLED) { - return; - } - - ALOGI("Got set_interactive hint"); - - if (get_scaling_governor(governor, sizeof(governor)) == -1) { - ALOGE("Can't obtain scaling governor."); - - return; - } - - if (!on) { - /* Display off. */ - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - int resource_values[] = {DISPLAY_OFF, MS_500, THREAD_MIGRATION_SYNC_OFF}; - - if (!display_hint_sent) { - perform_hint_action(DISPLAY_STATE_HINT_ID, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - display_hint_sent = 1; - } - } else if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - int resource_values[] = {TR_MS_50, THREAD_MIGRATION_SYNC_OFF}; - - if (!display_hint_sent) { - perform_hint_action(DISPLAY_STATE_HINT_ID, - resource_values, sizeof(resource_values)/sizeof(resource_values[0])); - display_hint_sent = 1; - } - } else if ((strncmp(governor, MSMDCVS_GOVERNOR, strlen(MSMDCVS_GOVERNOR)) == 0) && - (strlen(governor) == strlen(MSMDCVS_GOVERNOR))) { - if (saved_interactive_mode == 1){ - /* Display turned off. */ - if (sysfs_read(DCVS_CPU0_SLACK_MAX_NODE, tmp_str, NODE_MAX - 1)) { - if (!slack_node_rw_failed) { - ALOGE("Failed to read from %s", DCVS_CPU0_SLACK_MAX_NODE); - } - - rc = 1; - } else { - saved_dcvs_cpu0_slack_max = atoi(tmp_str); - } - - if (sysfs_read(DCVS_CPU0_SLACK_MIN_NODE, tmp_str, NODE_MAX - 1)) { - if (!slack_node_rw_failed) { - ALOGE("Failed to read from %s", DCVS_CPU0_SLACK_MIN_NODE); - } - - rc = 1; - } else { - saved_dcvs_cpu0_slack_min = atoi(tmp_str); - } - - if (sysfs_read(MPDECISION_SLACK_MAX_NODE, tmp_str, NODE_MAX - 1)) { - if (!slack_node_rw_failed) { - ALOGE("Failed to read from %s", MPDECISION_SLACK_MAX_NODE); - } - - rc = 1; - } else { - saved_mpdecision_slack_max = atoi(tmp_str); - } - - if (sysfs_read(MPDECISION_SLACK_MIN_NODE, tmp_str, NODE_MAX - 1)) { - if(!slack_node_rw_failed) { - ALOGE("Failed to read from %s", MPDECISION_SLACK_MIN_NODE); - } - - rc = 1; - } else { - saved_mpdecision_slack_min = atoi(tmp_str); - } - - /* Write new values. */ - if (saved_dcvs_cpu0_slack_max != -1) { - snprintf(tmp_str, NODE_MAX, "%d", 10 * saved_dcvs_cpu0_slack_max); - - if (sysfs_write(DCVS_CPU0_SLACK_MAX_NODE, tmp_str) != 0) { - if (!slack_node_rw_failed) { - ALOGE("Failed to write to %s", DCVS_CPU0_SLACK_MAX_NODE); - } - - rc = 1; - } - } - - if (saved_dcvs_cpu0_slack_min != -1) { - snprintf(tmp_str, NODE_MAX, "%d", 10 * saved_dcvs_cpu0_slack_min); - - if (sysfs_write(DCVS_CPU0_SLACK_MIN_NODE, tmp_str) != 0) { - if(!slack_node_rw_failed) { - ALOGE("Failed to write to %s", DCVS_CPU0_SLACK_MIN_NODE); - } - - rc = 1; - } - } - - if (saved_mpdecision_slack_max != -1) { - snprintf(tmp_str, NODE_MAX, "%d", 10 * saved_mpdecision_slack_max); - - if (sysfs_write(MPDECISION_SLACK_MAX_NODE, tmp_str) != 0) { - if(!slack_node_rw_failed) { - ALOGE("Failed to write to %s", MPDECISION_SLACK_MAX_NODE); - } - - rc = 1; - } - } - - if (saved_mpdecision_slack_min != -1) { - snprintf(tmp_str, NODE_MAX, "%d", 10 * saved_mpdecision_slack_min); - - if (sysfs_write(MPDECISION_SLACK_MIN_NODE, tmp_str) != 0) { - if(!slack_node_rw_failed) { - ALOGE("Failed to write to %s", MPDECISION_SLACK_MIN_NODE); - } - - rc = 1; - } - } - } - - slack_node_rw_failed = rc; - } - } else { - /* Display on. */ - if ((strncmp(governor, ONDEMAND_GOVERNOR, strlen(ONDEMAND_GOVERNOR)) == 0) && - (strlen(governor) == strlen(ONDEMAND_GOVERNOR))) { - undo_hint_action(DISPLAY_STATE_HINT_ID); - display_hint_sent = 0; - } else if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) && - (strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) { - undo_hint_action(DISPLAY_STATE_HINT_ID); - display_hint_sent = 0; - } else if ((strncmp(governor, MSMDCVS_GOVERNOR, strlen(MSMDCVS_GOVERNOR)) == 0) && - (strlen(governor) == strlen(MSMDCVS_GOVERNOR))) { - if (saved_interactive_mode == -1 || saved_interactive_mode == 0) { - /* Display turned on. Restore if possible. */ - if (saved_dcvs_cpu0_slack_max != -1) { - snprintf(tmp_str, NODE_MAX, "%d", saved_dcvs_cpu0_slack_max); - - if (sysfs_write(DCVS_CPU0_SLACK_MAX_NODE, tmp_str) != 0) { - if (!slack_node_rw_failed) { - ALOGE("Failed to write to %s", DCVS_CPU0_SLACK_MAX_NODE); - } - - rc = 1; - } - } - - if (saved_dcvs_cpu0_slack_min != -1) { - snprintf(tmp_str, NODE_MAX, "%d", saved_dcvs_cpu0_slack_min); - - if (sysfs_write(DCVS_CPU0_SLACK_MIN_NODE, tmp_str) != 0) { - if (!slack_node_rw_failed) { - ALOGE("Failed to write to %s", DCVS_CPU0_SLACK_MIN_NODE); - } - - rc = 1; - } - } - - if (saved_mpdecision_slack_max != -1) { - snprintf(tmp_str, NODE_MAX, "%d", saved_mpdecision_slack_max); - - if (sysfs_write(MPDECISION_SLACK_MAX_NODE, tmp_str) != 0) { - if (!slack_node_rw_failed) { - ALOGE("Failed to write to %s", MPDECISION_SLACK_MAX_NODE); - } - - rc = 1; - } - } - - if (saved_mpdecision_slack_min != -1) { - snprintf(tmp_str, NODE_MAX, "%d", saved_mpdecision_slack_min); - - if (sysfs_write(MPDECISION_SLACK_MIN_NODE, tmp_str) != 0) { - if (!slack_node_rw_failed) { - ALOGE("Failed to write to %s", MPDECISION_SLACK_MIN_NODE); - } - - rc = 1; - } - } - } - - slack_node_rw_failed = rc; - } - } - - saved_interactive_mode = !!on; -} - -static ssize_t get_number_of_platform_modes(struct power_module *module) { - return PLATFORM_SLEEP_MODES; -} - -static int get_voter_list(struct power_module *module, size_t *voter) { - voter[0] = XO_VOTERS; - voter[1] = VMIN_VOTERS; - - return 0; -} - -static int extract_stats(uint64_t *list, char *file, - unsigned int num_parameters, unsigned int index) { - FILE *fp; - ssize_t read; - size_t len; - char *line; - int ret; - - fp = fopen(file, "r"); - if (fp == NULL) { - ret = -errno; - ALOGE("%s: failed to open: %s", __func__, strerror(errno)); - return ret; - } - - for (line = NULL, len = 0; - ((read = getline(&line, &len, fp) != -1) && (index < num_parameters)); - free(line), line = NULL, len = 0) { - uint64_t value; - char* offset; - - size_t begin = strspn(line, " \t"); - if (strncmp(line + begin, parameter_names[index], strlen(parameter_names[index]))) { - continue; - } - - offset = memchr(line, ':', len); - if (!offset) { - continue; - } - - if (!strcmp(file, RPM_MASTER_STAT)) { - /* RPM_MASTER_STAT is reported in hex */ - sscanf(offset, ":%" SCNx64, &value); - /* Duration is reported in rpm SLEEP TICKS */ - if (!strcmp(parameter_names[index], "xo_accumulated_duration")) { - value /= RPM_CLK; - } - } else { - /* RPM_STAT is reported in decimal */ - sscanf(offset, ":%" SCNu64, &value); - } - list[index] = value; - index++; - } - free(line); - - fclose(fp); - return 0; -} - -static int get_platform_low_power_stats(struct power_module *module, - power_state_platform_sleep_state_t *list) { - uint64_t stats[sizeof(parameter_names)] = {0}; - int ret; - - if (!list) { - return -EINVAL; - } - - ret = extract_stats(stats, RPM_STAT, RPM_PARAMETERS, 0); - - if (ret) { - return ret; - } - - ret = extract_stats(stats, RPM_MASTER_STAT, NUM_PARAMETERS, RPM_PARAMETERS); - - if (ret) { - return ret; - } - - /* Update statistics for XO_shutdown */ - strcpy(list[0].name, "XO_shutdown"); - list[0].total_transitions = stats[0]; - list[0].residency_in_msec_since_boot = stats[1]; - list[0].supported_only_in_suspend = false; - list[0].number_of_voters = XO_VOTERS; - - /* Update statistics for APSS voter */ - strcpy(list[0].voters[0].name, "APSS"); - list[0].voters[0].total_time_in_msec_voted_for_since_boot = stats[4]; - list[0].voters[0].total_number_of_times_voted_since_boot = stats[5]; - - /* Update statistics for MPSS voter */ - strcpy(list[0].voters[1].name, "MPSS"); - list[0].voters[1].total_time_in_msec_voted_for_since_boot = stats[6]; - list[0].voters[1].total_number_of_times_voted_since_boot = stats[7]; - - /* Update statistics for ADSP voter */ - strcpy(list[0].voters[2].name, "ADSP"); - list[0].voters[2].total_time_in_msec_voted_for_since_boot = stats[8]; - list[0].voters[2].total_number_of_times_voted_since_boot = stats[9]; - - /* Update statistics for SLPI voter */ - strcpy(list[0].voters[3].name, "SLPI"); - list[0].voters[3].total_time_in_msec_voted_for_since_boot = stats[10]; - list[0].voters[3].total_number_of_times_voted_since_boot = stats[11]; - - /* Update statistics for VMIN state */ - strcpy(list[1].name, "VMIN"); - list[1].total_transitions = stats[2]; - list[1].residency_in_msec_since_boot = stats[3]; - list[1].supported_only_in_suspend = false; - list[1].number_of_voters = VMIN_VOTERS; - - return 0; -} - -struct power_module HAL_MODULE_INFO_SYM = { - .common = { - .tag = HARDWARE_MODULE_TAG, - .module_api_version = POWER_MODULE_API_VERSION_0_5, - .hal_api_version = HARDWARE_HAL_API_VERSION, - .id = POWER_HARDWARE_MODULE_ID, - .name = "QCOM Power HAL", - .author = "Qualcomm", - .methods = &power_module_methods, - }, - - .init = power_init, - .powerHint = power_hint, - .setInteractive = set_interactive, - .get_number_of_platform_modes = get_number_of_platform_modes, - .get_platform_low_power_stats = get_platform_low_power_stats, - .get_voter_list = get_voter_list -}; diff --git a/common/power/utils.c b/common/power/utils.c deleted file mode 100644 index dc16fd58..00000000 --- a/common/power/utils.c +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#define LOG_NIDEBUG 0 - -#include <dlfcn.h> -#include <fcntl.h> -#include <errno.h> -#include <stdlib.h> -#include <string.h> -#include <sys/stat.h> - -#include "utils.h" -#include "list.h" -#include "hint-data.h" -#include "power-common.h" - -#define LOG_TAG "QCOM PowerHAL" -#include <utils/Log.h> - -#define INTERACTION_BOOST - -char scaling_gov_path[4][80] ={ - "sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", - "sys/devices/system/cpu/cpu1/cpufreq/scaling_governor", - "sys/devices/system/cpu/cpu2/cpufreq/scaling_governor", - "sys/devices/system/cpu/cpu3/cpufreq/scaling_governor" -}; - -static void *qcopt_handle; -static int (*perf_lock_acq)(unsigned long handle, int duration, - int list[], int numArgs); -static int (*perf_lock_rel)(unsigned long handle); -static struct list_node active_hint_list_head; - -static void *get_qcopt_handle() -{ - char qcopt_lib_path[PATH_MAX] = {0}; - void *handle = NULL; - - dlerror(); - - if (property_get("ro.vendor.extension_library", qcopt_lib_path, - NULL)) { - handle = dlopen(qcopt_lib_path, RTLD_NOW); - if (!handle) { - ALOGE("Unable to open %s: %s\n", qcopt_lib_path, - dlerror()); - } - } - - return handle; -} - -static void __attribute__ ((constructor)) initialize(void) -{ - qcopt_handle = get_qcopt_handle(); - - if (!qcopt_handle) { - ALOGE("Failed to get qcopt handle.\n"); - } else { - /* - * qc-opt handle obtained. Get the perflock acquire/release - * function pointers. - */ - perf_lock_acq = dlsym(qcopt_handle, "perf_lock_acq"); - - if (!perf_lock_acq) { - ALOGE("Unable to get perf_lock_acq function handle.\n"); - } - - perf_lock_rel = dlsym(qcopt_handle, "perf_lock_rel"); - - if (!perf_lock_rel) { - ALOGE("Unable to get perf_lock_rel function handle.\n"); - } - } -} - -static void __attribute__ ((destructor)) cleanup(void) -{ - if (qcopt_handle) { - if (dlclose(qcopt_handle)) - ALOGE("Error occurred while closing qc-opt library."); - } -} - -int sysfs_read(char *path, char *s, int num_bytes) -{ - char buf[80]; - int count; - int ret = 0; - int fd = open(path, O_RDONLY); - - if (fd < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error opening %s: %s\n", path, buf); - - return -1; - } - - if ((count = read(fd, s, num_bytes - 1)) < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error writing to %s: %s\n", path, buf); - - ret = -1; - } else { - s[count] = '\0'; - } - - close(fd); - - return ret; -} - -int sysfs_write(char *path, char *s) -{ - char buf[80]; - int len; - int ret = 0; - int fd = open(path, O_WRONLY); - - if (fd < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error opening %s: %s\n", path, buf); - return -1 ; - } - - len = write(fd, s, strlen(s)); - if (len < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error writing to %s: %s\n", path, buf); - - ret = -1; - } - - close(fd); - - return ret; -} - -int get_scaling_governor(char governor[], int size) -{ - if (sysfs_read(SCALING_GOVERNOR_PATH, governor, - size) == -1) { - // Can't obtain the scaling governor. Return. - return -1; - } else { - // Strip newline at the end. - int len = strlen(governor); - - len--; - - while (len >= 0 && (governor[len] == '\n' || governor[len] == '\r')) - governor[len--] = '\0'; - } - - return 0; -} - -int get_scaling_governor_check_cores(char governor[], int size,int core_num) -{ - - if (sysfs_read(scaling_gov_path[core_num], governor, - size) == -1) { - // Can't obtain the scaling governor. Return. - return -1; - } - - // Strip newline at the end. - int len = strlen(governor); - len--; - while (len >= 0 && (governor[len] == '\n' || governor[len] == '\r')) - governor[len--] = '\0'; - - return 0; -} - -void interaction(int duration, int num_args, int opt_list[]) -{ -#ifdef INTERACTION_BOOST - static int lock_handle = 0; - - if (duration < 0 || num_args < 1 || opt_list[0] == NULL) - return; - - if (qcopt_handle) { - if (perf_lock_acq) { - lock_handle = perf_lock_acq(lock_handle, duration, opt_list, num_args); - if (lock_handle == -1) - ALOGE("Failed to acquire lock."); - } - } -#endif -} - -int interaction_with_handle(int lock_handle, int duration, int num_args, int opt_list[]) -{ -#ifdef INTERACTION_BOOST - if (duration < 0 || num_args < 1 || opt_list[0] == NULL) - return 0; - - if (qcopt_handle) { - if (perf_lock_acq) { - lock_handle = perf_lock_acq(lock_handle, duration, opt_list, num_args); - if (lock_handle == -1) - ALOGE("Failed to acquire lock."); - } - } - return lock_handle; -#endif - return 0; -} - -void release_request(int lock_handle) { - if (qcopt_handle && perf_lock_rel) - perf_lock_rel(lock_handle); -} - -void perform_hint_action(int hint_id, int resource_values[], int num_resources) -{ - if (qcopt_handle) { - struct hint_data temp_hint_data = { - .hint_id = hint_id - }; - struct list_node *found_node = find_node(&active_hint_list_head, - &temp_hint_data); - if (found_node) { - ALOGE("hint ID %d already active", hint_id); - return; - } - if (perf_lock_acq) { - /* Acquire an indefinite lock for the requested resources. */ - int lock_handle = perf_lock_acq(0, 0, resource_values, - num_resources); - - if (lock_handle == -1) { - ALOGE("Failed to acquire lock."); - } else { - /* Add this handle to our internal hint-list. */ - struct hint_data *new_hint = - (struct hint_data *)malloc(sizeof(struct hint_data)); - - if (new_hint) { - if (!active_hint_list_head.compare) { - active_hint_list_head.compare = - (int (*)(void *, void *))hint_compare; - active_hint_list_head.dump = (void (*)(void *))hint_dump; - } - - new_hint->hint_id = hint_id; - new_hint->perflock_handle = lock_handle; - - if (add_list_node(&active_hint_list_head, new_hint) == NULL) { - free(new_hint); - /* Can't keep track of this lock. Release it. */ - if (perf_lock_rel) - perf_lock_rel(lock_handle); - - ALOGE("Failed to process hint."); - } - } else { - /* Can't keep track of this lock. Release it. */ - if (perf_lock_rel) - perf_lock_rel(lock_handle); - - ALOGE("Failed to process hint."); - } - } - } - } -} - -void undo_hint_action(int hint_id) -{ - if (qcopt_handle) { - if (perf_lock_rel) { - /* Get hint-data associated with this hint-id */ - struct list_node *found_node; - struct hint_data temp_hint_data = { - .hint_id = hint_id - }; - - found_node = find_node(&active_hint_list_head, - &temp_hint_data); - - if (found_node) { - /* Release this lock. */ - struct hint_data *found_hint_data = - (struct hint_data *)(found_node->data); - - if (found_hint_data) { - if (perf_lock_rel(found_hint_data->perflock_handle) == -1) - ALOGE("Perflock release failed: %d", hint_id); - } - - if (found_node->data) { - /* We can free the hint-data for this node. */ - free(found_node->data); - } - - remove_list_node(&active_hint_list_head, found_node); - ALOGV("Undo of hint ID %d succeeded", hint_id); - } else { - ALOGE("Invalid hint ID: %d", hint_id); - } - } - } -} - -/* - * Used to release initial lock holding - * two cores online when the display is on - */ -void undo_initial_hint_action() -{ - if (qcopt_handle) { - if (perf_lock_rel) { - perf_lock_rel(1); - } - } -} diff --git a/common/power/utils.h b/common/power/utils.h deleted file mode 100644 index 3172155b..00000000 --- a/common/power/utils.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2012, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <cutils/properties.h> - -int sysfs_read(char *path, char *s, int num_bytes); -int sysfs_write(char *path, char *s); -int sysfs_get_size_in_bytes(char *path); -int get_scaling_governor(char governor[], int size); -int get_scaling_governor_check_cores(char governor[], int size,int core_num); - -void vote_ondemand_io_busy_off(); -void unvote_ondemand_io_busy_off(); -void vote_ondemand_sdf_low(); -void unvote_ondemand_sdf_low(); -void perform_hint_action(int hint_id, int resource_values[], - int num_resources); -void undo_hint_action(int hint_id); -void release_request(int lock_handle); -int interaction_with_handle(int lock_handle, int duration, int num_args, int opt_list[]); diff --git a/common/recovery/Android.mk b/common/recovery/Android.mk deleted file mode 100644 index 65711611..00000000 --- a/common/recovery/Android.mk +++ /dev/null @@ -1 +0,0 @@ -include $(all-subdir-makefiles) diff --git a/common/recovery/miniui/Android.mk b/common/recovery/miniui/Android.mk deleted file mode 100644 index ff727d31..00000000 --- a/common/recovery/miniui/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -ifeq ($(TARGET_RECOVERY_UI_LIB),librecovery_ui_msm) -ifneq ($(TARGET_SIMULATOR),true) -ifneq ($(filter arm arm64, $(TARGET_ARCH)),) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := librecovery_ui_msm - -LOCAL_MODULE_TAGS := optional - -LOCAL_C_INCLUDES += bootable/recovery - -LOCAL_SRC_FILES += msm_recovery_ui.cpp - -include $(BUILD_STATIC_LIBRARY) -endif # TARGET_ARCH == arm -endif # !TARGET_SIMULATOR -endif diff --git a/common/recovery/miniui/msm_recovery_ui.cpp b/common/recovery/miniui/msm_recovery_ui.cpp deleted file mode 100644 index 8f29050a..00000000 --- a/common/recovery/miniui/msm_recovery_ui.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (c) 2015, The Linux Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "device.h" -#include "screen_ui.h" - - -class MSM_Device : public Device -{ -public: - MSM_Device(ScreenRecoveryUI* ui) : Device(ui) {} - - bool PostWipeDevice() { - clear_keys_required = true; - return true; - } - - char const* GetRebootReason() { - if (clear_keys_required) - return "keys clear"; - return ""; - } - -private: - bool clear_keys_required = false; -}; - -Device* make_device() { - return new MSM_Device(new ScreenRecoveryUI); -} diff --git a/common/recovery/oem-recovery/Android.mk b/common/recovery/oem-recovery/Android.mk deleted file mode 100644 index 7ce1c127..00000000 --- a/common/recovery/oem-recovery/Android.mk +++ /dev/null @@ -1,31 +0,0 @@ -ifneq ($(filter librecovery_updater_msm,$(TARGET_RECOVERY_UPDATER_LIBS)),) -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := bootable/recovery \ - system/core/libsparse -LOCAL_SRC_FILES := gpt-utils.cpp dec.cpp oem-updater.cpp -ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) -LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include -LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr -endif -LOCAL_SHARED_LIBRARIES := liblog -LOCAL_MODULE := librecovery_updater_msm -LOCAL_MODULE_OWNER := qti -include $(BUILD_STATIC_LIBRARY) -include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := bootable/recovery \ - system/core/libsparse -LOCAL_SRC_FILES := gpt-utils.cpp -ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) -LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include -LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr -endif -LOCAL_SHARED_LIBRARIES += liblog libsparse libcutils -LOCAL_MODULE := librecovery_updater_msm -LOCAL_MODULE_OWNER += qti -LOCAL_COPY_HEADERS_TO := gpt-utils/inc -LOCAL_COPY_HEADERS := gpt-utils.h -include $(BUILD_SHARED_LIBRARY) -endif diff --git a/common/recovery/oem-recovery/dec.cpp b/common/recovery/oem-recovery/dec.cpp deleted file mode 100644 index a8b1d2c5..00000000 --- a/common/recovery/oem-recovery/dec.cpp +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <stdio.h> -#include <fcntl.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include <sys/mman.h> -#include <linux/qseecom.h> -#include <linux/msm_ion.h> - -/* Service IDs */ -#define SCM_SVC_SSD 0x07 - -/* Service specific command IDs */ -#define SSD_PARSE_MD_ID 0x06 -#define SSD_DECRYPT_IMG_FRAG_ID 0x07 - -/* SSD parsing status messages from TZ */ -#define SSD_PMD_ENCRYPTED 0 -#define SSD_PMD_NOT_ENCRYPTED 1 -#define SSD_PMD_PARSING_INCOMPLETE 6 - -#define SSD_HEADER_MIN_SIZE 128 -#define MULTIPLICATION_FACTOR 2 - -#define SMCMOD_DECRYPT_REQ_OP_METADATA 1 -#define SMCMOD_DECRYPT_REQ_OP_IMG_FRAG 2 - -struct smcmod_decrypt_req { - uint32_t service_id; /* in */ - uint32_t command_id; /* in */ - uint32_t operation; /* in */ - - union { - struct { - uint32_t len; - uint32_t ion_fd; - } metadata; - struct { - uint32_t ctx_id; - uint32_t last_frag; - uint32_t frag_len; - uint32_t ion_fd; - uint32_t offset; - } img_frag; - } request; - - union { - struct { - uint32_t status; - uint32_t ctx_id; - uint32_t end_offset; - } metadata; - struct { - uint32_t status; - } img_frag; - } response; -}; - -#define SMCMOD_IOC_MAGIC 0x97 -#define SMCMOD_IOCTL_DECRYPT_CMD \ - _IOWR(SMCMOD_IOC_MAGIC, 37, struct smcmod_decrypt_req) - -struct ion_buf_handle { - unsigned char *buffer; - uint32_t buffer_len; - int ion_fd; - int ifd_data_fd; - struct ion_handle_data ion_alloc_handle; -}; - -static int -ion_memalloc(struct ion_buf_handle *buf, uint32_t size, uint32_t heap) -{ - struct ion_allocation_data alloc_data; - struct ion_fd_data fd_data; - unsigned char *va; - struct ion_handle_data handle_data; - int ion_fd; - int rc; - - ion_fd = open("/dev/ion", O_RDONLY); - if (ion_fd < 0) { - fprintf(stderr, "Cannot open ION device (%s)\n", strerror(errno)); - return -1; - } - - alloc_data.len = (size + 4095) & ~4095; - alloc_data.align = 4096; - - alloc_data.flags = 0; - alloc_data.heap_id_mask = ION_HEAP(heap); - - /* Set the buffers to be uncached */ - alloc_data.flags = 0; - - rc = ioctl(ion_fd, ION_IOC_ALLOC, &alloc_data); - if (rc) { - fprintf(stderr, "ION buffer allocation failed (%s)\n", - strerror(errno)); - goto alloc_fail; - } - - if (alloc_data.handle) { - fd_data.handle = alloc_data.handle; - } else { - fprintf(stderr, "ION alloc data returned NULL\n"); - rc = -1; - goto alloc_fail; - } - - rc = ioctl(ion_fd, ION_IOC_MAP, &fd_data); - if (rc) { - fprintf(stderr, "ION map call failed(%s)\n", strerror(errno)); - goto ioctl_fail; - } - - va = (unsigned char*)mmap(NULL, alloc_data.len, PROT_READ | PROT_WRITE, - MAP_SHARED, fd_data.fd, 0); - if (va == MAP_FAILED) { - fprintf(stderr, "ION memory map failed (%s)\n", strerror(errno)); - rc = -1; - goto map_fail; - } - - buf->ion_fd = ion_fd; - buf->ifd_data_fd = fd_data.fd; - buf->buffer = va; - buf->ion_alloc_handle.handle = alloc_data.handle; - buf->buffer_len = alloc_data.len; - - memset(buf->buffer, 0, buf->buffer_len); - return 0; - -map_fail: -ioctl_fail: - handle_data.handle = alloc_data.handle; - if (buf->ifd_data_fd) - close(buf->ifd_data_fd); - rc = ioctl(ion_fd, ION_IOC_FREE, &handle_data); - if (rc) - fprintf(stderr, "ION free failed (%s)\n", strerror(errno)); -alloc_fail: - if (ion_fd >= 0) - close(ion_fd); - buf->ion_fd = -1; - return rc; -} - -static int ion_memfree(struct ion_buf_handle *handle) -{ - struct ion_handle_data handle_data; - int ret; - - ret = munmap(handle->buffer, (handle->buffer_len + 4095) & ~4095); - if (ret) - fprintf(stderr, "munmap failed (%s)\n", strerror(errno)); - - handle_data.handle = handle->ion_alloc_handle.handle; - close(handle->ifd_data_fd); - ret = ioctl(handle->ion_fd, ION_IOC_FREE, &handle_data); - if (ret) - fprintf(stderr, "ION free failed (%s)\n", strerror(errno)); - close(handle->ion_fd); - - return ret; -} - -static int ion_buffer_clean_inval(struct ion_buf_handle *buf, uint32_t cmd) -{ - struct ion_flush_data data; - int rc; - - data.fd = buf->ifd_data_fd; - data.vaddr = buf->buffer; - data.length = buf->buffer_len; - data.offset = 0; - data.handle = buf->ion_alloc_handle.handle; - - rc = ioctl(buf->ion_fd, cmd, &data); - if (rc < 0) - fprintf(stderr, "clean_inval cache failed (%s)\n", strerror(errno)); - - return rc; -} - -static int is_encrypted(int smcmod_fd, struct ion_buf_handle *buf, - uint32_t len, uint32_t *ctx_id, uint32_t *end_offset) -{ - struct smcmod_decrypt_req req; - uint32_t status; - int ret; - - req.service_id = SCM_SVC_SSD; - req.command_id = SSD_PARSE_MD_ID; - req.operation = SMCMOD_DECRYPT_REQ_OP_METADATA; - req.request.metadata.len = - (len >= SSD_HEADER_MIN_SIZE) ? SSD_HEADER_MIN_SIZE : len; - req.request.metadata.ion_fd = buf->ifd_data_fd; - - do { - ret = ioctl(smcmod_fd, SMCMOD_IOCTL_DECRYPT_CMD, &req); - if (ret < 0) - fprintf(stderr, "%s: ioctl ret=%d, %s\n", __func__, ret, - strerror(errno)); - - status = req.response.metadata.status; - - if (!ret && (status == SSD_PMD_PARSING_INCOMPLETE)) { - req.request.metadata.len *= MULTIPLICATION_FACTOR; - continue; - } else { - break; - } - } while (1); - - if (!ret) { - if (status == SSD_PMD_ENCRYPTED) { - *ctx_id = req.response.metadata.ctx_id; - *end_offset = req.response.metadata.end_offset; - ret = 1; - } else { - fprintf(stderr, "Image is not encrypted (response status %d)\n", - status); - } - } else { - fprintf(stderr, "%s: call failed\n", __func__); - } - - return ret; -} - -static int decrypt(int smcmod_fd, struct ion_buf_handle *buf, uint32_t len, - uint32_t md_ctx, uint32_t offset) -{ - struct smcmod_decrypt_req req; - int ret; - - req.service_id = SCM_SVC_SSD; - req.command_id = SSD_DECRYPT_IMG_FRAG_ID; - req.operation = SMCMOD_DECRYPT_REQ_OP_IMG_FRAG; - req.request.img_frag.ctx_id = md_ctx; - req.request.img_frag.last_frag = 1; - req.request.img_frag.ion_fd = buf->ifd_data_fd; - req.request.img_frag.frag_len = len - offset; - req.request.img_frag.offset = offset; - - ret = ioctl(smcmod_fd, SMCMOD_IOCTL_DECRYPT_CMD, &req); - if (ret < 0) { - fprintf(stderr, "decrypt ioctl failed (%s)\n", strerror(errno)); - return ret; - } - - return 0; -} - -static int save_file(const char *fname, unsigned char *buf, size_t len) -{ - FILE *file; - size_t written; - - file = fopen(fname, "wb"); - if (!file) { - fprintf(stderr, "Failed to open %s (%s)\n", fname, strerror(errno)); - return -errno; - } - - written = fwrite(buf, len, 1, file); - if (written != 1) { - fclose(file); - fprintf(stderr, "Failed to write %s (%s)\n", fname, strerror(errno)); - return -errno; - } - fflush(file); - fclose(file); - fprintf(stdout, "%s written %d bytes\n", fname, len); - return 0; -} - -int decrypt_image(const char *src_file, const char *dst_file) -{ - int ret = -1; - uint32_t md_ctx = 0, offset = 0; - uint32_t fsize = 0; - FILE *file = NULL; - struct ion_buf_handle ionbuf; - int smcmod_fd = -1; - int qseecom_fd = -1; - size_t read; - - memset(&ionbuf, 0, sizeof(ionbuf)); - ionbuf.ion_fd = -1; - - qseecom_fd = open("/dev/qseecom", O_RDWR); - if (qseecom_fd < 0) { - fprintf(stderr, "Failed to open /dev/qseecom device (%s)\n", - strerror(errno)); - goto exit; - } - - smcmod_fd = open("/dev/smcmod", O_RDWR); - if (smcmod_fd < 0) { - fprintf(stderr, "Failed to open /dev/smcmod device (%s)\n", - strerror(errno)); - goto exit; - } - - file = fopen(src_file, "rb"); - if (!file) { - fprintf(stderr, "Failed to open %s (%s)\n", src_file, strerror(errno)); - goto exit; - } - - fseek(file, 0, SEEK_END); - fsize = ftell(file); - fseek(file, 0, SEEK_SET); - - ret = ion_memalloc(&ionbuf, fsize, ION_PIL1_HEAP_ID); - if (ret) - goto exit; - - read = fread(ionbuf.buffer, fsize, 1, file); - if (read != 1) { - fprintf(stderr, "Failed to read %s (%s)\n", src_file, strerror(errno)); - ret = -errno; - goto exit; - } - - ret = ion_buffer_clean_inval(&ionbuf, ION_IOC_CLEAN_INV_CACHES); - if (ret < 0) - goto exit; - - ret = ioctl(qseecom_fd, QSEECOM_IOCTL_PERF_ENABLE_REQ); - if (ret < 0) - goto exit; - - ret = is_encrypted(smcmod_fd, &ionbuf, fsize, &md_ctx, &offset); - if (ret < 0) - goto exit; - - if (ret == 1) { - fprintf(stdout, "decrypting %s ...\n", src_file); - ret = decrypt(smcmod_fd, &ionbuf, fsize, md_ctx, offset); - if (ret < 0) - goto exit; - - ion_buffer_clean_inval(&ionbuf, ION_IOC_INV_CACHES); - - ret = save_file(dst_file, ionbuf.buffer + offset, fsize - offset); - if (ret < 0) - goto exit; - - fprintf(stdout, "decrypting done!\n"); - } - -exit: - if (ionbuf.ion_fd >= 0) - ion_memfree(&ionbuf); - - if (qseecom_fd >= 0) { - ioctl(qseecom_fd, QSEECOM_IOCTL_PERF_DISABLE_REQ); - close(qseecom_fd); - } - - if (smcmod_fd >= 0) - close(smcmod_fd); - - if (file) - fclose(file); - - return ret; -} diff --git a/common/recovery/oem-recovery/dec.h b/common/recovery/oem-recovery/dec.h deleted file mode 100644 index b08f5b2c..00000000 --- a/common/recovery/oem-recovery/dec.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __DEC_H__ -#define __DEC_H__ -int decrypt_image(const char *src_file, const char *dst_file); -#endif diff --git a/common/recovery/oem-recovery/gpt-utils.cpp b/common/recovery/oem-recovery/gpt-utils.cpp deleted file mode 100644 index d2f90d89..00000000 --- a/common/recovery/oem-recovery/gpt-utils.cpp +++ /dev/null @@ -1,1506 +0,0 @@ -/* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#define _LARGEFILE64_SOURCE /* enable lseek64() */ - -/****************************************************************************** - * INCLUDE SECTION - ******************************************************************************/ -#include <stdio.h> -#include <fcntl.h> -#include <string.h> -#include <errno.h> -#include <sys/stat.h> -#include <sys/ioctl.h> -#include <scsi/ufs/ioctl.h> -#include <scsi/ufs/ufs.h> -#include <unistd.h> -#include <linux/fs.h> -#include <limits.h> -#include <dirent.h> -#include <linux/kernel.h> -#include <asm/byteorder.h> -#define LOG_TAG "gpt-utils" -#include <cutils/log.h> -#include <cutils/properties.h> -#include "gpt-utils.h" -#ifdef __cplusplus -extern "C" { -#endif -#include "sparse_crc32.h" -#ifdef __cplusplus -} -#endif -#include <endian.h> - - -/****************************************************************************** - * DEFINE SECTION - ******************************************************************************/ -#define BLK_DEV_FILE "/dev/block/mmcblk0" -/* list the names of the backed-up partitions to be swapped */ -/* extension used for the backup partitions - tzbak, abootbak, etc. */ -#define BAK_PTN_NAME_EXT "bak" -#define XBL_PRIMARY "/dev/block/bootdevice/by-name/xbl" -#define XBL_BACKUP "/dev/block/bootdevice/by-name/xblbak" -#define XBL_AB_PRIMARY "/dev/block/bootdevice/by-name/xbl_a" -#define XBL_AB_SECONDARY "/dev/block/bootdevice/by-name/xbl_b" -/* GPT defines */ -#define MAX_LUNS 26 -//Size of the buffer that needs to be passed to the UFS ioctl -#define UFS_ATTR_DATA_SIZE 32 -//This will allow us to get the root lun path from the path to the partition. -//i.e: from /dev/block/sdaXXX get /dev/block/sda. The assumption here is that -//the boot critical luns lie between sda to sdz which is acceptable because -//only user added external disks,etc would lie beyond that limit which do not -//contain partitions that interest us here. -#define PATH_TRUNCATE_LOC (sizeof("/dev/block/sda") - 1) - -//From /dev/block/sda get just sda -#define LUN_NAME_START_LOC (sizeof("/dev/block/") - 1) -#define BOOT_LUN_A_ID 1 -#define BOOT_LUN_B_ID 2 -/****************************************************************************** - * MACROS - ******************************************************************************/ - - -#define GET_4_BYTES(ptr) ((uint32_t) *((uint8_t *)(ptr)) | \ - ((uint32_t) *((uint8_t *)(ptr) + 1) << 8) | \ - ((uint32_t) *((uint8_t *)(ptr) + 2) << 16) | \ - ((uint32_t) *((uint8_t *)(ptr) + 3) << 24)) - -#define GET_8_BYTES(ptr) ((uint64_t) *((uint8_t *)(ptr)) | \ - ((uint64_t) *((uint8_t *)(ptr) + 1) << 8) | \ - ((uint64_t) *((uint8_t *)(ptr) + 2) << 16) | \ - ((uint64_t) *((uint8_t *)(ptr) + 3) << 24) | \ - ((uint64_t) *((uint8_t *)(ptr) + 4) << 32) | \ - ((uint64_t) *((uint8_t *)(ptr) + 5) << 40) | \ - ((uint64_t) *((uint8_t *)(ptr) + 6) << 48) | \ - ((uint64_t) *((uint8_t *)(ptr) + 7) << 56)) - -#define PUT_4_BYTES(ptr, y) *((uint8_t *)(ptr)) = (y) & 0xff; \ - *((uint8_t *)(ptr) + 1) = ((y) >> 8) & 0xff; \ - *((uint8_t *)(ptr) + 2) = ((y) >> 16) & 0xff; \ - *((uint8_t *)(ptr) + 3) = ((y) >> 24) & 0xff; - -/****************************************************************************** - * TYPES - ******************************************************************************/ - -enum gpt_state { - GPT_OK = 0, - GPT_BAD_SIGNATURE, - GPT_BAD_CRC -}; -//List of LUN's containing boot critical images. -//Required in the case of UFS devices -struct update_data { - char lun_list[MAX_LUNS][PATH_MAX]; - uint32_t num_valid_entries; -}; - -/****************************************************************************** - * FUNCTIONS - ******************************************************************************/ -/** - * ========================================================================== - * - * \brief Read/Write len bytes from/to block dev - * - * \param [in] fd block dev file descriptor (returned from open) - * \param [in] rw RW flag: 0 - read, != 0 - write - * \param [in] offset block dev offset [bytes] - RW start position - * \param [in] buf Pointer to the buffer containing the data - * \param [in] len RW size in bytes. Buf must be at least that big - * - * \return 0 on success - * - * ========================================================================== - */ -static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len) -{ - int r; - - if (lseek64(fd, offset, SEEK_SET) < 0) { - fprintf(stderr, "block dev lseek64 %lld failed: %s\n", offset, - strerror(errno)); - return -1; - } - - if (rw) - r = write(fd, buf, len); - else - r = read(fd, buf, len); - - if (r < 0) - fprintf(stderr, "block dev %s failed: %s\n", rw ? "write" : "read", - strerror(errno)); - else - r = 0; - - return r; -} - - - -/** - * ========================================================================== - * - * \brief Search within GPT for partition entry with the given name - * or it's backup twin (name-bak). - * - * \param [in] ptn_name Partition name to seek - * \param [in] pentries_start Partition entries array start pointer - * \param [in] pentries_end Partition entries array end pointer - * \param [in] pentry_size Single partition entry size [bytes] - * - * \return First partition entry pointer that matches the name or NULL - * - * ========================================================================== - */ -static uint8_t *gpt_pentry_seek(const char *ptn_name, - const uint8_t *pentries_start, - const uint8_t *pentries_end, - uint32_t pentry_size) -{ - char *pentry_name; - unsigned len = strlen(ptn_name); - - for (pentry_name = (char *) (pentries_start + PARTITION_NAME_OFFSET); - pentry_name < (char *) pentries_end; pentry_name += pentry_size) { - char name8[MAX_GPT_NAME_SIZE / 2]; - unsigned i; - - /* Partition names in GPT are UTF-16 - ignoring UTF-16 2nd byte */ - for (i = 0; i < sizeof(name8); i++) - name8[i] = pentry_name[i * 2]; - if (!strncmp(ptn_name, name8, len)) - if (name8[len] == 0 || !strcmp(&name8[len], BAK_PTN_NAME_EXT)) - return (uint8_t *) (pentry_name - PARTITION_NAME_OFFSET); - } - - return NULL; -} - - - -/** - * ========================================================================== - * - * \brief Swaps boot chain in GPT partition entries array - * - * \param [in] pentries_start Partition entries array start - * \param [in] pentries_end Partition entries array end - * \param [in] pentry_size Single partition entry size - * - * \return 0 on success, 1 if no backup partitions found - * - * ========================================================================== - */ -static int gpt_boot_chain_swap(const uint8_t *pentries_start, - const uint8_t *pentries_end, - uint32_t pentry_size) -{ - const char ptn_swap_list[][MAX_GPT_NAME_SIZE] = { PTN_SWAP_LIST }; - - int backup_not_found = 1; - unsigned i; - - for (i = 0; i < ARRAY_SIZE(ptn_swap_list); i++) { - uint8_t *ptn_entry; - uint8_t *ptn_bak_entry; - uint8_t ptn_swap[PTN_ENTRY_SIZE]; - //Skip the xbl partition on UFS devices. That is handled - //seperately. - if (gpt_utils_is_ufs_device() && !strncmp(ptn_swap_list[i], - PTN_XBL, - strlen(PTN_XBL))) - continue; - - ptn_entry = gpt_pentry_seek(ptn_swap_list[i], pentries_start, - pentries_end, pentry_size); - if (ptn_entry == NULL) - continue; - - ptn_bak_entry = gpt_pentry_seek(ptn_swap_list[i], - ptn_entry + pentry_size, pentries_end, pentry_size); - if (ptn_bak_entry == NULL) { - fprintf(stderr, "'%s' partition not backup - skip safe update\n", - ptn_swap_list[i]); - continue; - } - - /* swap primary <-> backup partition entries */ - memcpy(ptn_swap, ptn_entry, PTN_ENTRY_SIZE); - memcpy(ptn_entry, ptn_bak_entry, PTN_ENTRY_SIZE); - memcpy(ptn_bak_entry, ptn_swap, PTN_ENTRY_SIZE); - backup_not_found = 0; - } - - return backup_not_found; -} - - - -/** - * ========================================================================== - * - * \brief Sets secondary GPT boot chain - * - * \param [in] fd block dev file descriptor - * \param [in] boot Boot chain to switch to - * - * \return 0 on success - * - * ========================================================================== - */ -static int gpt2_set_boot_chain(int fd, enum boot_chain boot) -{ - int64_t gpt2_header_offset; - uint64_t pentries_start_offset; - uint32_t gpt_header_size; - uint32_t pentry_size; - uint32_t pentries_array_size; - - uint8_t *gpt_header = NULL; - uint8_t *pentries = NULL; - uint32_t crc; - uint32_t blk_size = 0; - int r; - - if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { - fprintf(stderr, "Failed to get GPT device block size: %s\n", - strerror(errno)); - r = -1; - goto EXIT; - } - gpt_header = (uint8_t*)malloc(blk_size); - if (!gpt_header) { - fprintf(stderr, "Failed to allocate memory to hold GPT block\n"); - r = -1; - goto EXIT; - } - gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; - if (gpt2_header_offset < 0) { - fprintf(stderr, "Getting secondary GPT header offset failed: %s\n", - strerror(errno)); - r = -1; - goto EXIT; - } - - /* Read primary GPT header from block dev */ - r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); - - if (r) { - fprintf(stderr, "Failed to read primary GPT header from blk dev\n"); - goto EXIT; - } - pentries_start_offset = - GET_8_BYTES(gpt_header + PENTRIES_OFFSET) * blk_size; - pentry_size = GET_4_BYTES(gpt_header + PENTRY_SIZE_OFFSET); - pentries_array_size = - GET_4_BYTES(gpt_header + PARTITION_COUNT_OFFSET) * pentry_size; - - pentries = (uint8_t *) calloc(1, pentries_array_size); - if (pentries == NULL) { - fprintf(stderr, - "Failed to alloc memory for GPT partition entries array\n"); - r = -1; - goto EXIT; - } - /* Read primary GPT partititon entries array from block dev */ - r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); - if (r) - goto EXIT; - - crc = sparse_crc32(0, pentries, pentries_array_size); - if (GET_4_BYTES(gpt_header + PARTITION_CRC_OFFSET) != crc) { - fprintf(stderr, "Primary GPT partition entries array CRC invalid\n"); - r = -1; - goto EXIT; - } - - /* Read secondary GPT header from block dev */ - r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size); - if (r) - goto EXIT; - - gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET); - pentries_start_offset = - GET_8_BYTES(gpt_header + PENTRIES_OFFSET) * blk_size; - - if (boot == BACKUP_BOOT) { - r = gpt_boot_chain_swap(pentries, pentries + pentries_array_size, - pentry_size); - if (r) - goto EXIT; - } - - crc = sparse_crc32(0, pentries, pentries_array_size); - PUT_4_BYTES(gpt_header + PARTITION_CRC_OFFSET, crc); - - /* header CRC is calculated with this field cleared */ - PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0); - crc = sparse_crc32(0, gpt_header, gpt_header_size); - PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc); - - /* Write the modified GPT header back to block dev */ - r = blk_rw(fd, 1, gpt2_header_offset, gpt_header, blk_size); - if (!r) - /* Write the modified GPT partititon entries array back to block dev */ - r = blk_rw(fd, 1, pentries_start_offset, pentries, - pentries_array_size); - -EXIT: - if(gpt_header) - free(gpt_header); - if (pentries) - free(pentries); - return r; -} - -/** - * ========================================================================== - * - * \brief Checks GPT state (header signature and CRC) - * - * \param [in] fd block dev file descriptor - * \param [in] gpt GPT header to be checked - * \param [out] state GPT header state - * - * \return 0 on success - * - * ========================================================================== - */ -static int gpt_get_state(int fd, enum gpt_instance gpt, enum gpt_state *state) -{ - int64_t gpt_header_offset; - uint32_t gpt_header_size; - uint8_t *gpt_header = NULL; - uint32_t crc; - uint32_t blk_size = 0; - - *state = GPT_OK; - - if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { - fprintf(stderr, "Failed to get GPT device block size: %s\n", - strerror(errno)); - goto error; - } - gpt_header = (uint8_t*)malloc(blk_size); - if (!gpt_header) { - fprintf(stderr, "gpt_get_state:Failed to alloc memory for header\n"); - goto error; - } - if (gpt == PRIMARY_GPT) - gpt_header_offset = blk_size; - else { - gpt_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; - if (gpt_header_offset < 0) { - fprintf(stderr, "gpt_get_state:Seek to end of GPT part fail\n"); - goto error; - } - } - - if (blk_rw(fd, 0, gpt_header_offset, gpt_header, blk_size)) { - fprintf(stderr, "gpt_get_state: blk_rw failed\n"); - goto error; - } - if (memcmp(gpt_header, GPT_SIGNATURE, sizeof(GPT_SIGNATURE))) - *state = GPT_BAD_SIGNATURE; - gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET); - - crc = GET_4_BYTES(gpt_header + HEADER_CRC_OFFSET); - /* header CRC is calculated with this field cleared */ - PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0); - if (sparse_crc32(0, gpt_header, gpt_header_size) != crc) - *state = GPT_BAD_CRC; - free(gpt_header); - return 0; -error: - if (gpt_header) - free(gpt_header); - return -1; -} - - - -/** - * ========================================================================== - * - * \brief Sets GPT header state (used to corrupt and fix GPT signature) - * - * \param [in] fd block dev file descriptor - * \param [in] gpt GPT header to be checked - * \param [in] state GPT header state to set (GPT_OK or GPT_BAD_SIGNATURE) - * - * \return 0 on success - * - * ========================================================================== - */ -static int gpt_set_state(int fd, enum gpt_instance gpt, enum gpt_state state) -{ - int64_t gpt_header_offset; - uint32_t gpt_header_size; - uint8_t *gpt_header = NULL; - uint32_t crc; - uint32_t blk_size = 0; - - if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { - fprintf(stderr, "Failed to get GPT device block size: %s\n", - strerror(errno)); - goto error; - } - gpt_header = (uint8_t*)malloc(blk_size); - if (!gpt_header) { - fprintf(stderr, "Failed to alloc memory for gpt header\n"); - goto error; - } - if (gpt == PRIMARY_GPT) - gpt_header_offset = blk_size; - else { - gpt_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; - if (gpt_header_offset < 0) { - fprintf(stderr, "Failed to seek to end of GPT device\n"); - goto error; - } - } - if (blk_rw(fd, 0, gpt_header_offset, gpt_header, blk_size)) { - fprintf(stderr, "Failed to r/w gpt header\n"); - goto error; - } - if (state == GPT_OK) - memcpy(gpt_header, GPT_SIGNATURE, sizeof(GPT_SIGNATURE)); - else if (state == GPT_BAD_SIGNATURE) - *gpt_header = 0; - else { - fprintf(stderr, "gpt_set_state: Invalid state\n"); - goto error; - } - - gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET); - - /* header CRC is calculated with this field cleared */ - PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0); - crc = sparse_crc32(0, gpt_header, gpt_header_size); - PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc); - - if (blk_rw(fd, 1, gpt_header_offset, gpt_header, blk_size)) { - fprintf(stderr, "gpt_set_state: blk write failed\n"); - goto error; - } - return 0; -error: - if(gpt_header) - free(gpt_header); - return -1; -} - -int get_scsi_node_from_bootdevice(const char *bootdev_path, - char *sg_node_path, - size_t buf_size) -{ - char sg_dir_path[PATH_MAX] = {0}; - char real_path[PATH_MAX] = {0}; - DIR *scsi_dir = NULL; - struct dirent *de; - int node_found = 0; - if (!bootdev_path || !sg_node_path) { - fprintf(stderr, "%s : invalid argument\n", - __func__); - goto error; - } - if (readlink(bootdev_path, real_path, sizeof(real_path) - 1) < 0) { - fprintf(stderr, "failed to resolve link for %s(%s)\n", - bootdev_path, - strerror(errno)); - goto error; - } - if(strlen(real_path) < PATH_TRUNCATE_LOC + 1){ - fprintf(stderr, "Unrecognized path :%s:\n", - real_path); - goto error; - } - //For the safe side in case there are additional partitions on - //the XBL lun we truncate the name. - real_path[PATH_TRUNCATE_LOC] = '\0'; - if(strlen(real_path) < LUN_NAME_START_LOC + 1){ - fprintf(stderr, "Unrecognized truncated path :%s:\n", - real_path); - goto error; - } - //This will give us /dev/block/sdb/device/scsi_generic - //which contains a file sgY whose name gives us the path - //to /dev/sgY which we return - snprintf(sg_dir_path, sizeof(sg_dir_path) - 1, - "/sys/block/%s/device/scsi_generic", - &real_path[LUN_NAME_START_LOC]); - scsi_dir = opendir(sg_dir_path); - if (!scsi_dir) { - fprintf(stderr, "%s : Failed to open %s(%s)\n", - __func__, - sg_dir_path, - strerror(errno)); - goto error; - } - while((de = readdir(scsi_dir))) { - if (de->d_name[0] == '.') - continue; - else if (!strncmp(de->d_name, "sg", 2)) { - snprintf(sg_node_path, - buf_size -1, - "/dev/%s", - de->d_name); - fprintf(stderr, "%s:scsi generic node is :%s:\n", - __func__, - sg_node_path); - node_found = 1; - break; - } - } - if(!node_found) { - fprintf(stderr,"%s: Unable to locate scsi generic node\n", - __func__); - goto error; - } - closedir(scsi_dir); - return 0; -error: - if (scsi_dir) - closedir(scsi_dir); - return -1; -} - -int set_boot_lun(char *sg_dev, uint8_t boot_lun_id) -{ - int fd = -1; - int rc; - struct ufs_ioctl_query_data *data = NULL; - size_t ioctl_data_size = sizeof(struct ufs_ioctl_query_data) + UFS_ATTR_DATA_SIZE; - - data = (struct ufs_ioctl_query_data*)malloc(ioctl_data_size); - if (!data) { - fprintf(stderr, "%s: Failed to alloc query data struct\n", - __func__); - goto error; - } - memset(data, 0, ioctl_data_size); - data->opcode = UPIU_QUERY_OPCODE_WRITE_ATTR; - data->idn = QUERY_ATTR_IDN_BOOT_LU_EN; - data->buf_size = UFS_ATTR_DATA_SIZE; - data->buffer[0] = boot_lun_id; - fd = open(sg_dev, O_RDWR); - if (fd < 0) { - fprintf(stderr, "%s: Failed to open %s(%s)\n", - __func__, - sg_dev, - strerror(errno)); - goto error; - } - rc = ioctl(fd, UFS_IOCTL_QUERY, data); - if (rc) { - fprintf(stderr, "%s: UFS query ioctl failed(%s)\n", - __func__, - strerror(errno)); - goto error; - } - close(fd); - free(data); - return 0; -error: - if (fd >= 0) - close(fd); - if (data) - free(data); - return -1; -} - -//Swtich betwieen using either the primary or the backup -//boot LUN for boot. This is required since UFS boot partitions -//cannot have a backup GPT which is what we use for failsafe -//updates of the other 'critical' partitions. This function will -//not be invoked for emmc targets and on UFS targets is only required -//to be invoked for XBL. -// -//The algorithm to do this is as follows: -//- Find the real block device(eg: /dev/block/sdb) that corresponds -// to the /dev/block/bootdevice/by-name/xbl(bak) symlink -// -//- Once we have the block device 'node' name(sdb in the above example) -// use this node to to locate the scsi generic device that represents -// it by checking the file /sys/block/sdb/device/scsi_generic/sgY -// -//- Once we locate sgY we call the query ioctl on /dev/sgy to switch -//the boot lun to either LUNA or LUNB -int gpt_utils_set_xbl_boot_partition(enum boot_chain chain) -{ - struct stat st; - ///sys/block/sdX/device/scsi_generic/ - char sg_dev_node[PATH_MAX] = {0}; - uint8_t boot_lun_id = 0; - const char *boot_dev = NULL; - - if (chain == BACKUP_BOOT) { - boot_lun_id = BOOT_LUN_B_ID; - if (!stat(XBL_BACKUP, &st)) - boot_dev = XBL_BACKUP; - else if (!stat(XBL_AB_SECONDARY, &st)) - boot_dev = XBL_AB_SECONDARY; - else { - fprintf(stderr, "%s: Failed to locate secondary xbl\n", - __func__); - goto error; - } - } else if (chain == NORMAL_BOOT) { - boot_lun_id = BOOT_LUN_A_ID; - if (!stat(XBL_PRIMARY, &st)) - boot_dev = XBL_PRIMARY; - else if (!stat(XBL_AB_PRIMARY, &st)) - boot_dev = XBL_AB_PRIMARY; - else { - fprintf(stderr, "%s: Failed to locate primary xbl\n", - __func__); - goto error; - } - } else { - fprintf(stderr, "%s: Invalid boot chain id\n", __func__); - goto error; - } - //We need either both xbl and xblbak or both xbl_a and xbl_b to exist at - //the same time. If not the current configuration is invalid. - if((stat(XBL_PRIMARY, &st) || - stat(XBL_BACKUP, &st)) && - (stat(XBL_AB_PRIMARY, &st) || - stat(XBL_AB_SECONDARY, &st))) { - fprintf(stderr, "%s:primary/secondary XBL prt not found(%s)\n", - __func__, - strerror(errno)); - goto error; - } - fprintf(stderr, "%s: setting %s lun as boot lun\n", - __func__, - boot_dev); - if (get_scsi_node_from_bootdevice(boot_dev, - sg_dev_node, - sizeof(sg_dev_node))) { - fprintf(stderr, "%s: Failed to get scsi node path for xblbak\n", - __func__); - goto error; - } - if (set_boot_lun(sg_dev_node, boot_lun_id)) { - fprintf(stderr, "%s: Failed to set xblbak as boot partition\n", - __func__); - goto error; - } - return 0; -error: - return -1; -} - -int gpt_utils_is_ufs_device() -{ - char bootdevice[PROPERTY_VALUE_MAX] = {0}; - property_get("ro.boot.bootdevice", bootdevice, "N/A"); - if (strlen(bootdevice) < strlen(".ufshc") + 1) - return 0; - return (!strncmp(&bootdevice[strlen(bootdevice) - strlen(".ufshc")], - ".ufshc", - sizeof(".ufshc"))); -} -//dev_path is the path to the block device that contains the GPT image that -//needs to be updated. This would be the device which holds one or more critical -//boot partitions and their backups. In the case of EMMC this function would -//be invoked only once on /dev/block/mmcblk1 since it holds the GPT image -//containing all the partitions For UFS devices it could potentially be -//invoked multiple times, once for each LUN containing critical image(s) and -//their backups -int prepare_partitions(enum boot_update_stage stage, const char *dev_path) -{ - int r = 0; - int fd = -1; - int is_ufs = gpt_utils_is_ufs_device(); - enum gpt_state gpt_prim, gpt_second; - enum boot_update_stage internal_stage; - struct stat xbl_partition_stat; - struct stat ufs_dir_stat; - - if (!dev_path) { - fprintf(stderr, "%s: Invalid dev_path\n", - __func__); - r = -1; - goto EXIT; - } - fd = open(dev_path, O_RDWR); - if (fd < 0) { - fprintf(stderr, "%s: Opening '%s' failed: %s\n", - __func__, - BLK_DEV_FILE, - strerror(errno)); - r = -1; - goto EXIT; - } - r = gpt_get_state(fd, PRIMARY_GPT, &gpt_prim) || - gpt_get_state(fd, SECONDARY_GPT, &gpt_second); - if (r) { - fprintf(stderr, "%s: Getting GPT headers state failed\n", - __func__); - goto EXIT; - } - - /* These 2 combinations are unexpected and unacceptable */ - if (gpt_prim == GPT_BAD_CRC || gpt_second == GPT_BAD_CRC) { - fprintf(stderr, "%s: GPT headers CRC corruption detected, aborting\n", - __func__); - r = -1; - goto EXIT; - } - if (gpt_prim == GPT_BAD_SIGNATURE && gpt_second == GPT_BAD_SIGNATURE) { - fprintf(stderr, "%s: Both GPT headers corrupted, aborting\n", - __func__); - r = -1; - goto EXIT; - } - - /* Check internal update stage according GPT headers' state */ - if (gpt_prim == GPT_OK && gpt_second == GPT_OK) - internal_stage = UPDATE_MAIN; - else if (gpt_prim == GPT_BAD_SIGNATURE) - internal_stage = UPDATE_BACKUP; - else if (gpt_second == GPT_BAD_SIGNATURE) - internal_stage = UPDATE_FINALIZE; - else { - fprintf(stderr, "%s: Abnormal GPTs state: primary (%d), secondary (%d), " - "aborting\n", __func__, gpt_prim, gpt_second); - r = -1; - goto EXIT; - } - - /* Stage already set - ready for update, exitting */ - if ((int) stage == (int) internal_stage - 1) - goto EXIT; - /* Unexpected stage given */ - if (stage != internal_stage) { - r = -1; - goto EXIT; - } - - switch (stage) { - case UPDATE_MAIN: - if (is_ufs) { - if(stat(XBL_PRIMARY, &xbl_partition_stat)|| - stat(XBL_BACKUP, &xbl_partition_stat)){ - //Non fatal error. Just means this target does not - //use XBL but relies on sbl whose update is handled - //by the normal methods. - fprintf(stderr, "%s: xbl part not found(%s).Assuming sbl in use\n", - __func__, - strerror(errno)); - } else { - //Switch the boot lun so that backup boot LUN is used - r = gpt_utils_set_xbl_boot_partition(BACKUP_BOOT); - if(r){ - fprintf(stderr, "%s: Failed to set xbl backup partition as boot\n", - __func__); - goto EXIT; - } - } - } - //Fix up the backup GPT table so that it actually points to - //the backup copy of the boot critical images - fprintf(stderr, "%s: Preparing for primary partition update\n", - __func__); - r = gpt2_set_boot_chain(fd, BACKUP_BOOT); - if (r) { - if (r < 0) - fprintf(stderr, - "%s: Setting secondary GPT to backup boot failed\n", - __func__); - /* No backup partitions - do not corrupt GPT, do not flag error */ - else - r = 0; - goto EXIT; - } - //corrupt the primary GPT so that the backup(which now points to - //the backup boot partitions is used) - r = gpt_set_state(fd, PRIMARY_GPT, GPT_BAD_SIGNATURE); - if (r) { - fprintf(stderr, "%s: Corrupting primary GPT header failed\n", - __func__); - goto EXIT; - } - break; - case UPDATE_BACKUP: - if (is_ufs) { - if(stat(XBL_PRIMARY, &xbl_partition_stat)|| - stat(XBL_BACKUP, &xbl_partition_stat)){ - //Non fatal error. Just means this target does not - //use XBL but relies on sbl whose update is handled - //by the normal methods. - fprintf(stderr, "%s: xbl part not found(%s).Assuming sbl in use\n", - __func__, - strerror(errno)); - } else { - //Switch the boot lun so that backup boot LUN is used - r = gpt_utils_set_xbl_boot_partition(NORMAL_BOOT); - if(r) { - fprintf(stderr, "%s: Failed to set xbl backup partition as boot\n", - __func__); - goto EXIT; - } - } - } - //Fix the primary GPT header so that is used - fprintf(stderr, "%s: Preparing for backup partition update\n", - __func__); - r = gpt_set_state(fd, PRIMARY_GPT, GPT_OK); - if (r) { - fprintf(stderr, "%s: Fixing primary GPT header failed\n", - __func__); - goto EXIT; - } - //Corrupt the scondary GPT header - r = gpt_set_state(fd, SECONDARY_GPT, GPT_BAD_SIGNATURE); - if (r) { - fprintf(stderr, "%s: Corrupting secondary GPT header failed\n", - __func__); - goto EXIT; - } - break; - case UPDATE_FINALIZE: - //Undo the changes we had made in the UPDATE_MAIN stage so that the - //primary/backup GPT headers once again point to the same set of - //partitions - fprintf(stderr, "%s: Finalizing partitions\n", - __func__); - r = gpt2_set_boot_chain(fd, NORMAL_BOOT); - if (r < 0) { - fprintf(stderr, "%s: Setting secondary GPT to normal boot failed\n", - __func__); - goto EXIT; - } - - r = gpt_set_state(fd, SECONDARY_GPT, GPT_OK); - if (r) { - fprintf(stderr, "%s: Fixing secondary GPT header failed\n", - __func__); - goto EXIT; - } - break; - default:; - } - -EXIT: - if (fd >= 0) { - fsync(fd); - close(fd); - } - return r; -} - -int add_lun_to_update_list(char *lun_path, struct update_data *dat) -{ - uint32_t i = 0; - struct stat st; - if (!lun_path || !dat){ - fprintf(stderr, "%s: Invalid data", - __func__); - return -1; - } - if (stat(lun_path, &st)) { - fprintf(stderr, "%s: Unable to access %s. Skipping adding to list", - __func__, - lun_path); - return -1; - } - if (dat->num_valid_entries == 0) { - fprintf(stderr, "%s: Copying %s into lun_list[%d]\n", - __func__, - lun_path, - i); - strlcpy(dat->lun_list[0], lun_path, - PATH_MAX * sizeof(char)); - dat->num_valid_entries = 1; - } else { - for (i = 0; (i < dat->num_valid_entries) && - (dat->num_valid_entries < MAX_LUNS - 1); i++) { - //Check if the current LUN is not already part - //of the lun list - if (!strncmp(lun_path,dat->lun_list[i], - strlen(dat->lun_list[i]))) { - //LUN already in list..Return - return 0; - } - } - fprintf(stderr, "%s: Copying %s into lun_list[%d]\n", - __func__, - lun_path, - dat->num_valid_entries); - //Add LUN path lun list - strlcpy(dat->lun_list[dat->num_valid_entries], lun_path, - PATH_MAX * sizeof(char)); - dat->num_valid_entries++; - } - return 0; -} - -int prepare_boot_update(enum boot_update_stage stage) -{ - int r, fd; - int is_ufs = gpt_utils_is_ufs_device(); - struct stat ufs_dir_stat; - struct update_data data; - int rcode = 0; - uint32_t i = 0; - int is_error = 0; - const char ptn_swap_list[][MAX_GPT_NAME_SIZE] = { PTN_SWAP_LIST }; - //Holds /dev/block/bootdevice/by-name/*bak entry - char buf[PATH_MAX] = {0}; - //Holds the resolved path of the symlink stored in buf - char real_path[PATH_MAX] = {0}; - - if (!is_ufs) { - //emmc device. Just pass in path to mmcblk0 - return prepare_partitions(stage, BLK_DEV_FILE); - } else { - //Now we need to find the list of LUNs over - //which the boot critical images are spread - //and set them up for failsafe updates.To do - //this we find out where the symlinks for the - //each of the paths under - ///dev/block/bootdevice/by-name/PTN_SWAP_LIST - //actually point to. - fprintf(stderr, "%s: Running on a UFS device\n", - __func__); - memset(&data, '\0', sizeof(struct update_data)); - for (i=0; i < ARRAY_SIZE(ptn_swap_list); i++) { - //XBL on UFS does not follow the convention - //of being loaded based on well known GUID'S. - //We take care of switching the UFS boot LUN - //explicitly later on. - if (!strncmp(ptn_swap_list[i], - PTN_XBL, - strlen(PTN_XBL))) - continue; - snprintf(buf, sizeof(buf), - "%s/%sbak", - BOOT_DEV_DIR, - ptn_swap_list[i]); - if (stat(buf, &ufs_dir_stat)) { - continue; - } - if (readlink(buf, real_path, sizeof(real_path) - 1) < 0) - { - fprintf(stderr, "%s: readlink error. Skipping %s", - __func__, - strerror(errno)); - } else { - if(strlen(real_path) < PATH_TRUNCATE_LOC + 1){ - fprintf(stderr, "Unknown path.Skipping :%s:\n", - real_path); - } else { - real_path[PATH_TRUNCATE_LOC] = '\0'; - add_lun_to_update_list(real_path, &data); - } - } - memset(buf, '\0', sizeof(buf)); - memset(real_path, '\0', sizeof(real_path)); - } - for (i=0; i < data.num_valid_entries; i++) { - fprintf(stderr, "%s: Preparing %s for update stage %d\n", - __func__, - data.lun_list[i], - stage); - rcode = prepare_partitions(stage, data.lun_list[i]); - if (rcode != 0) - { - fprintf(stderr, "%s: Failed to prepare %s.Continuing..\n", - __func__, - data.lun_list[i]); - is_error = 1; - } - } - } - if (is_error) - return -1; - return 0; -} - -//Given a parttion name(eg: rpm) get the path to the block device that -//represents the GPT disk the partition resides on. In the case of emmc it -//would be the default emmc dev(/dev/mmcblk0). In the case of UFS we look -//through the /dev/block/bootdevice/by-name/ tree for partname, and resolve -//the path to the LUN from there. -static int get_dev_path_from_partition_name(const char *partname, - char *buf, - size_t buflen) -{ - struct stat st; - char path[PATH_MAX] = {0}; - if (!partname || !buf || buflen < ((PATH_TRUNCATE_LOC) + 1)) { - ALOGE("%s: Invalid argument", __func__); - goto error; - } - if (gpt_utils_is_ufs_device()) { - //Need to find the lun that holds partition partname - snprintf(path, sizeof(path), - "%s/%s", - BOOT_DEV_DIR, - partname); - if (stat(path, &st)) { - ALOGE("%s: Unable to find (%s) : %s", - __func__, - path, - strerror(errno)); - goto error; - } - if (readlink(path, buf, buflen) < 0) - { - ALOGE("%s: readlink error :%s", - __func__, - strerror(errno)); - goto error; - } else { - buf[PATH_TRUNCATE_LOC] = '\0'; - } - } else { - snprintf(buf, buflen, "/dev/mmcblk0"); - } - return 0; - -error: - return -1; -} - -//Get the block size of the disk represented by decsriptor fd -static uint32_t gpt_get_block_size(int fd) -{ - uint32_t block_size = 0; - if (fd < 0) { - ALOGE("%s: invalid descriptor", - __func__); - goto error; - } - if (ioctl(fd, BLKSSZGET, &block_size) != 0) { - ALOGE("%s: Failed to get GPT dev block size : %s", - __func__, - strerror(errno)); - goto error; - } - return block_size; -error: - return 0; -} - -//Write the GPT header present in the passed in buffer back to the -//disk represented by fd -static int gpt_set_header(uint8_t *gpt_header, int fd, - enum gpt_instance instance) -{ - uint32_t block_size = 0; - off_t gpt_header_offset = 0; - if (!gpt_header || fd < 0) { - ALOGE("%s: Invalid arguments", - __func__); - goto error; - } - block_size = gpt_get_block_size(fd); - if (block_size == 0) { - ALOGE("%s: Failed to get block size", __func__); - goto error; - } - if (instance == PRIMARY_GPT) - gpt_header_offset = block_size; - else - gpt_header_offset = lseek64(fd, 0, SEEK_END) - block_size; - if (gpt_header_offset <= 0) { - ALOGE("%s: Failed to get gpt header offset",__func__); - goto error; - } - if (blk_rw(fd, 1, gpt_header_offset, gpt_header, block_size)) { - ALOGE("%s: Failed to write back GPT header", __func__); - goto error; - } - return 0; -error: - return -1; -} - -//Read out the GPT header for the disk that contains the partition partname -static uint8_t* gpt_get_header(const char *partname, enum gpt_instance instance) -{ - uint8_t* hdr = NULL; - char devpath[PATH_MAX] = {0}; - int64_t hdr_offset = 0; - uint32_t block_size = 0; - int fd = -1; - if (!partname) { - ALOGE("%s: Invalid partition name", __func__); - goto error; - } - if (get_dev_path_from_partition_name(partname, devpath, sizeof(devpath)) - != 0) { - ALOGE("%s: Failed to resolve path for %s", - __func__, - partname); - goto error; - } - fd = open(devpath, O_RDWR); - if (fd < 0) { - ALOGE("%s: Failed to open %s : %s", - __func__, - devpath, - strerror(errno)); - goto error; - } - block_size = gpt_get_block_size(fd); - if (block_size == 0) - { - ALOGE("%s: Failed to get gpt block size for %s", - __func__, - partname); - goto error; - } - - hdr = (uint8_t*)malloc(block_size); - if (!hdr) { - ALOGE("%s: Failed to allocate memory for gpt header", - __func__); - } - if (instance == PRIMARY_GPT) - hdr_offset = block_size; - else { - hdr_offset = lseek64(fd, 0, SEEK_END) - block_size; - } - if (hdr_offset < 0) { - ALOGE("%s: Failed to get gpt header offset", - __func__); - goto error; - } - if (blk_rw(fd, 0, hdr_offset, hdr, block_size)) { - ALOGE("%s: Failed to read GPT header from device", - __func__); - goto error; - } - close(fd); - return hdr; -error: - if (fd >= 0) - close(fd); - if (hdr) - free(hdr); - return NULL; -} - -//Returns the partition entry array based on the -//passed in buffer which contains the gpt header. -//The fd here is the descriptor for the 'disk' which -//holds the partition -static uint8_t* gpt_get_pentry_arr(uint8_t *hdr, int fd) -{ - uint64_t pentries_start = 0; - uint32_t pentry_size = 0; - uint32_t block_size = 0; - uint32_t pentries_arr_size = 0; - uint8_t *pentry_arr = NULL; - int rc = 0; - if (!hdr) { - ALOGE("%s: Invalid header", __func__); - goto error; - } - if (fd < 0) { - ALOGE("%s: Invalid fd", __func__); - goto error; - } - block_size = gpt_get_block_size(fd); - if (!block_size) { - ALOGE("%s: Failed to get gpt block size for", - __func__); - goto error; - } - pentries_start = GET_8_BYTES(hdr + PENTRIES_OFFSET) * block_size; - pentry_size = GET_4_BYTES(hdr + PENTRY_SIZE_OFFSET); - pentries_arr_size = - GET_4_BYTES(hdr + PARTITION_COUNT_OFFSET) * pentry_size; - pentry_arr = (uint8_t*)calloc(1, pentries_arr_size); - if (!pentry_arr) { - ALOGE("%s: Failed to allocate memory for partition array", - __func__); - goto error; - } - rc = blk_rw(fd, 0, - pentries_start, - pentry_arr, - pentries_arr_size); - if (rc) { - ALOGE("%s: Failed to read partition entry array", - __func__); - goto error; - } - return pentry_arr; -error: - if (pentry_arr) - free(pentry_arr); - return NULL; -} - -static int gpt_set_pentry_arr(uint8_t *hdr, int fd, uint8_t* arr) -{ - uint32_t block_size = 0; - uint64_t pentries_start = 0; - uint32_t pentry_size = 0; - uint32_t pentries_arr_size = 0; - int rc = 0; - if (!hdr || fd < 0 || !arr) { - ALOGE("%s: Invalid argument", __func__); - goto error; - } - block_size = gpt_get_block_size(fd); - if (!block_size) { - ALOGE("%s: Failed to get gpt block size for", - __func__); - goto error; - } - pentries_start = GET_8_BYTES(hdr + PENTRIES_OFFSET) * block_size; - pentry_size = GET_4_BYTES(hdr + PENTRY_SIZE_OFFSET); - pentries_arr_size = - GET_4_BYTES(hdr + PARTITION_COUNT_OFFSET) * pentry_size; - rc = blk_rw(fd, 1, - pentries_start, - arr, - pentries_arr_size); - if (rc) { - ALOGE("%s: Failed to read partition entry array", - __func__); - goto error; - } - return 0; -error: - return -1; -} - - - -//Allocate a handle used by calls to the "gpt_disk" api's -struct gpt_disk * gpt_disk_alloc() -{ - struct gpt_disk *disk; - disk = (struct gpt_disk *)malloc(sizeof(struct gpt_disk)); - if (!disk) { - ALOGE("%s: Failed to allocate memory", __func__); - goto end; - } - memset(disk, 0, sizeof(struct gpt_disk)); -end: - return disk; -} - -//Free previously allocated/initialized handle -void gpt_disk_free(struct gpt_disk *disk) -{ - if (!disk) - return; - if (disk->hdr) - free(disk->hdr); - if (disk->hdr_bak) - free(disk->hdr_bak); - if (disk->pentry_arr) - free(disk->pentry_arr); - if (disk->pentry_arr_bak) - free(disk->pentry_arr_bak); - free(disk); - return; -} - -//fills up the passed in gpt_disk struct with information about the -//disk represented by path dev. Returns 0 on success and -1 on error. -int gpt_disk_get_disk_info(const char *dev, struct gpt_disk *dsk) -{ - struct gpt_disk *disk = NULL; - int fd = -1; - uint32_t gpt_header_size = 0; - - if (!dsk || !dev) { - ALOGE("%s: Invalid arguments", __func__); - goto error; - } - disk = dsk; - disk->hdr = gpt_get_header(dev, PRIMARY_GPT); - if (!disk->hdr) { - ALOGE("%s: Failed to get primary header", __func__); - goto error; - } - gpt_header_size = GET_4_BYTES(disk->hdr + HEADER_SIZE_OFFSET); - disk->hdr_crc = sparse_crc32(0, disk->hdr, gpt_header_size); - disk->hdr_bak = gpt_get_header(dev, PRIMARY_GPT); - if (!disk->hdr_bak) { - ALOGE("%s: Failed to get backup header", __func__); - goto error; - } - disk->hdr_bak_crc = sparse_crc32(0, disk->hdr_bak, gpt_header_size); - - //Descriptor for the block device. We will use this for further - //modifications to the partition table - if (get_dev_path_from_partition_name(dev, - disk->devpath, - sizeof(disk->devpath)) != 0) { - ALOGE("%s: Failed to resolve path for %s", - __func__, - dev); - goto error; - } - fd = open(disk->devpath, O_RDWR); - if (fd < 0) { - ALOGE("%s: Failed to open %s: %s", - __func__, - disk->devpath, - strerror(errno)); - goto error; - } - disk->pentry_arr = gpt_get_pentry_arr(disk->hdr, fd); - if (!disk->pentry_arr) { - ALOGE("%s: Failed to obtain partition entry array", - __func__); - goto error; - } - disk->pentry_arr_bak = gpt_get_pentry_arr(disk->hdr_bak, fd); - if (!disk->pentry_arr_bak) { - ALOGE("%s: Failed to obtain backup partition entry array", - __func__); - goto error; - } - disk->pentry_size = GET_4_BYTES(disk->hdr + PENTRY_SIZE_OFFSET); - disk->pentry_arr_size = - GET_4_BYTES(disk->hdr + PARTITION_COUNT_OFFSET) * - disk->pentry_size; - disk->pentry_arr_crc = GET_4_BYTES(disk->hdr + PARTITION_CRC_OFFSET); - disk->pentry_arr_bak_crc = GET_4_BYTES(disk->hdr_bak + - PARTITION_CRC_OFFSET); - disk->block_size = gpt_get_block_size(fd); - close(fd); - disk->is_initialized = GPT_DISK_INIT_MAGIC; - return 0; -error: - if (fd >= 0) - close(fd); - return -1; -} - -//Get pointer to partition entry from a allocated gpt_disk structure -uint8_t* gpt_disk_get_pentry(struct gpt_disk *disk, - const char *partname, - enum gpt_instance instance) -{ - uint8_t *ptn_arr = NULL; - if (!disk || !partname || disk->is_initialized != GPT_DISK_INIT_MAGIC) { - ALOGE("%s: Invalid argument",__func__); - goto error; - } - ptn_arr = (instance == PRIMARY_GPT) ? - disk->pentry_arr : disk->pentry_arr_bak; - return (gpt_pentry_seek(partname, ptn_arr, - ptn_arr + disk->pentry_arr_size , - disk->pentry_size)); -error: - return NULL; -} - -//Update CRC values for the various components of the gpt_disk -//structure. This function should be called after any of the fields -//have been updated before the structure contents are written back to -//disk. -int gpt_disk_update_crc(struct gpt_disk *disk) -{ - uint32_t gpt_header_size = 0; - if (!disk || (disk->is_initialized != GPT_DISK_INIT_MAGIC)) { - ALOGE("%s: invalid argument", __func__); - goto error; - } - //Recalculate the CRC of the primary partiton array - disk->pentry_arr_crc = sparse_crc32(0, - disk->pentry_arr, - disk->pentry_arr_size); - //Recalculate the CRC of the backup partition array - disk->pentry_arr_bak_crc = sparse_crc32(0, - disk->pentry_arr_bak, - disk->pentry_arr_size); - //Update the partition CRC value in the primary GPT header - PUT_4_BYTES(disk->hdr + PARTITION_CRC_OFFSET, disk->pentry_arr_crc); - //Update the partition CRC value in the backup GPT header - PUT_4_BYTES(disk->hdr_bak + PARTITION_CRC_OFFSET, - disk->pentry_arr_bak_crc); - //Update the CRC value of the primary header - gpt_header_size = GET_4_BYTES(disk->hdr + HEADER_SIZE_OFFSET); - //Header CRC is calculated with its own CRC field set to 0 - PUT_4_BYTES(disk->hdr + HEADER_CRC_OFFSET, 0); - PUT_4_BYTES(disk->hdr_bak + HEADER_CRC_OFFSET, 0); - disk->hdr_crc = sparse_crc32(0, disk->hdr, gpt_header_size); - disk->hdr_bak_crc = sparse_crc32(0, disk->hdr_bak, gpt_header_size); - PUT_4_BYTES(disk->hdr + HEADER_CRC_OFFSET, disk->hdr_crc); - PUT_4_BYTES(disk->hdr_bak + HEADER_CRC_OFFSET, disk->hdr_bak_crc); - return 0; -error: - return -1; -} - -//Write the contents of struct gpt_disk back to the actual disk -int gpt_disk_commit(struct gpt_disk *disk) -{ - int fd = -1; - if (!disk || (disk->is_initialized != GPT_DISK_INIT_MAGIC)){ - ALOGE("%s: Invalid args", __func__); - goto error; - } - fd = open(disk->devpath, O_RDWR); - if (fd < 0) { - ALOGE("%s: Failed to open %s: %s", - __func__, - disk->devpath, - strerror(errno)); - goto error; - } - //Write the primary header - if(gpt_set_header(disk->hdr, fd, PRIMARY_GPT) != 0) { - ALOGE("%s: Failed to update primary GPT header", - __func__); - goto error; - } - //Write back the primary partition array - if (gpt_set_pentry_arr(disk->hdr, fd, disk->pentry_arr)) { - ALOGE("%s: Failed to write primary GPT partition arr", - __func__); - goto error; - } - close(fd); - return 0; -error: - if (fd >= 0) - close(fd); - return -1; -} diff --git a/common/recovery/oem-recovery/gpt-utils.h b/common/recovery/oem-recovery/gpt-utils.h deleted file mode 100644 index 74c346d5..00000000 --- a/common/recovery/oem-recovery/gpt-utils.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __GPT_UTILS_H__ -#define __GPT_UTILS_H__ -#ifdef __cplusplus -extern "C" { -#endif -#include <unistd.h> -#include <stdlib.h> -/****************************************************************************** - * GPT HEADER DEFINES - ******************************************************************************/ -#define GPT_SIGNATURE "EFI PART" -#define HEADER_SIZE_OFFSET 12 -#define HEADER_CRC_OFFSET 16 -#define PRIMARY_HEADER_OFFSET 24 -#define BACKUP_HEADER_OFFSET 32 -#define FIRST_USABLE_LBA_OFFSET 40 -#define LAST_USABLE_LBA_OFFSET 48 -#define PENTRIES_OFFSET 72 -#define PARTITION_COUNT_OFFSET 80 -#define PENTRY_SIZE_OFFSET 84 -#define PARTITION_CRC_OFFSET 88 - -#define TYPE_GUID_OFFSET 0 -#define TYPE_GUID_SIZE 16 -#define PTN_ENTRY_SIZE 128 -#define UNIQUE_GUID_OFFSET 16 -#define FIRST_LBA_OFFSET 32 -#define LAST_LBA_OFFSET 40 -#define ATTRIBUTE_FLAG_OFFSET 48 -#define PARTITION_NAME_OFFSET 56 -#define MAX_GPT_NAME_SIZE 72 - -/****************************************************************************** - * AB RELATED DEFINES - ******************************************************************************/ -//Bit 48 onwords in the attribute field are the ones where we are allowed to -//store our AB attributes. -#define AB_FLAG_OFFSET (ATTRIBUTE_FLAG_OFFSET + 6) -#define GPT_DISK_INIT_MAGIC 0xABCD -#define AB_PARTITION_ATTR_SLOT_ACTIVE (0x1<<2) -#define AB_PARTITION_ATTR_BOOT_SUCCESSFUL (0x1<<6) -#define AB_PARTITION_ATTR_UNBOOTABLE (0x1<<7) -#define AB_SLOT_ACTIVE_VAL 0x3F -#define AB_SLOT_INACTIVE_VAL 0x0 -#define AB_SLOT_ACTIVE 1 -#define AB_SLOT_INACTIVE 0 -#define AB_SLOT_A_SUFFIX "_a" -#define AB_SLOT_B_SUFFIX "_b" -#define PTN_XBL "xbl" -#define PTN_SWAP_LIST PTN_XBL, "sbl1", "rpm", "tz", "aboot", "hyp", "lksecapp", "keymaster", "cmnlib", "cmnlib32", "cmnlib64", "pmic", "apdp", "devcfg", "hosd", "keystore", "msadp" -#define AB_PTN_LIST PTN_SWAP_LIST, "boot", "system", "vendor", "modem", "bluetooth" -#define BOOT_DEV_DIR "/dev/block/bootdevice/by-name" - -/****************************************************************************** - * HELPER MACROS - ******************************************************************************/ -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -/****************************************************************************** - * TYPES - ******************************************************************************/ -enum boot_update_stage { - UPDATE_MAIN = 1, - UPDATE_BACKUP, - UPDATE_FINALIZE -}; - -enum gpt_instance { - PRIMARY_GPT = 0, - SECONDARY_GPT -}; - -enum boot_chain { - NORMAL_BOOT = 0, - BACKUP_BOOT -}; - -struct gpt_disk { - //GPT primary header - uint8_t *hdr; - //primary header crc - uint32_t hdr_crc; - //GPT backup header - uint8_t *hdr_bak; - //backup header crc - uint32_t hdr_bak_crc; - //Partition entries array - uint8_t *pentry_arr; - //Partition entries array for backup table - uint8_t *pentry_arr_bak; - //Size of the pentry array - uint32_t pentry_arr_size; - //Size of each element in the pentry array - uint32_t pentry_size; - //CRC of the partition entry array - uint32_t pentry_arr_crc; - //CRC of the backup partition entry array - uint32_t pentry_arr_bak_crc; - //Path to block dev representing the disk - char devpath[PATH_MAX]; - //Block size of disk - uint32_t block_size; - uint32_t is_initialized; -}; - -/****************************************************************************** - * FUNCTION PROTOTYPES - ******************************************************************************/ -int prepare_boot_update(enum boot_update_stage stage); -//GPT disk methods -struct gpt_disk* gpt_disk_alloc(); -//Free previously allocated gpt_disk struct -void gpt_disk_free(struct gpt_disk *disk); -//Get the details of the disk holding the partition whose name -//is passed in via dev -int gpt_disk_get_disk_info(const char *dev, struct gpt_disk *disk); - -//Get pointer to partition entry from a allocated gpt_disk structure -uint8_t* gpt_disk_get_pentry(struct gpt_disk *disk, - const char *partname, - enum gpt_instance instance); - -//Update the crc fields of the modified disk structure -int gpt_disk_update_crc(struct gpt_disk *disk); - -//Write the contents of struct gpt_disk back to the actual disk -int gpt_disk_commit(struct gpt_disk *disk); - -//Return if the current device is UFS based or not -int gpt_utils_is_ufs_device(); - -//Swtich betwieen using either the primary or the backup -//boot LUN for boot. This is required since UFS boot partitions -//cannot have a backup GPT which is what we use for failsafe -//updates of the other 'critical' partitions. This function will -//not be invoked for emmc targets and on UFS targets is only required -//to be invoked for XBL. -// -//The algorithm to do this is as follows: -//- Find the real block device(eg: /dev/block/sdb) that corresponds -// to the /dev/block/bootdevice/by-name/xbl(bak) symlink -// -//- Once we have the block device 'node' name(sdb in the above example) -// use this node to to locate the scsi generic device that represents -// it by checking the file /sys/block/sdb/device/scsi_generic/sgY -// -//- Once we locate sgY we call the query ioctl on /dev/sgy to switch -//the boot lun to either LUNA or LUNB -int gpt_utils_set_xbl_boot_partition(enum boot_chain chain); -#ifdef __cplusplus -} -#endif -#endif /* __GPT_UTILS_H__ */ diff --git a/common/recovery/oem-recovery/oem-updater.cpp b/common/recovery/oem-recovery/oem-updater.cpp deleted file mode 100644 index 4a6c8b4b..00000000 --- a/common/recovery/oem-recovery/oem-updater.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "edify/expr.h" -#include "dec.h" -#include "gpt-utils.h" - -Value* DecryptFn(const char* name, State* state, int argc, Expr* argv[]) { - int rc = -1; - char *src_file, *dst_file; - - if (argc != 2) - return ErrorAbort(state, "%s expects 2 args, got %d", name, argc); - - if (ReadArgs(state, argv, 2, &src_file, &dst_file)) - return NULL; - - rc = decrypt_image(src_file, dst_file); - - free(src_file); - free(dst_file); - - return StringValue(strdup(rc >= 0 ? "t" : "")); -} - -Value* BootUpdateFn(const char* name, State* state, int argc, Expr* argv[]) -{ - int rc = 0; - char *stageStr; - enum boot_update_stage stage; - - if (argc != 1) - return ErrorAbort(state, "%s() expects 1 args, got %d", name, argc); - - if (ReadArgs(state, argv, 1, &stageStr)) - return NULL; - - if (!strcmp(stageStr, "main")) - stage = UPDATE_MAIN; - else if (!strcmp(stageStr, "backup")) - stage = UPDATE_BACKUP; - else if (!strcmp(stageStr, "finalize")) - stage = UPDATE_FINALIZE; - else { - fprintf(stderr, "Unrecognized boot update stage, exitting\n"); - rc = -1; - } - - free(stageStr); - - if (!rc) - rc = prepare_boot_update(stage); - - return StringValue(strdup(rc ? "" : "t")); -} - -void Register_librecovery_updater_msm() { - RegisterFunction("msm.decrypt", DecryptFn); - RegisterFunction("msm.boot_update", BootUpdateFn); -} diff --git a/common/releasetools.py b/common/releasetools.py deleted file mode 100755 index f50b751c..00000000 --- a/common/releasetools.py +++ /dev/null @@ -1,362 +0,0 @@ -# Copyright (C) 2009 The Android Open Source Project -# Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Emit commands needed for QCOM devices during OTA installation -(installing the radio image).""" - -import common -import re - - -bootImages = {} -binImages = {} -fwImages = {} - - -# Parse filesmap file containing firmware residing places -def LoadFilesMap(zip, name="RADIO/filesmap"): - try: - data = zip.read(name) - except KeyError: - print "Warning: could not find %s in %s." % (name, zip) - data = "" - d = {} - for line in data.split("\n"): - line = line.strip() - if not line or line.startswith("#"): - continue - pieces = line.split() - if not (len(pieces) == 2): - raise ValueError("malformed filesmap line: \"%s\"" % (line,)) - d[pieces[0]] = pieces[1] - return d - - -# Read firmware images from target files zip -def GetRadioFiles(z): - out = {} - for info in z.infolist(): - f = info.filename - if f.startswith("RADIO/") and (f.__len__() > len("RADIO/")): - fn = f[6:] - if fn.startswith("filesmap"): - continue - data = z.read(f) - out[fn] = common.File(f, data) - return out - - -# Get firmware residing place from filesmap -def GetFileDestination(fn, filesmap): - # if file is encoded disregard the .enc extention - if fn.endswith('.enc'): - fn = fn[:-4] - - # get backup destination as well if present - backup = None - if fn + ".bak" in filesmap: - backup = filesmap[fn + ".bak"] - - # If full filename is not specified in filesmap get only the name part - # and look for this token - if fn not in filesmap: - fn = fn.split(".")[0] + ".*" - if fn not in filesmap: - print "warning radio-update: '%s' not found in filesmap" % (fn) - return None, backup - return filesmap[fn], backup - - -# Separate image types as each type needs different handling -def SplitFwTypes(files): - boot = {} - bin = {} - fw = {} - - for f in files: - extIdx = -1 - dotSeparated = f.split(".") - while True: - if dotSeparated[extIdx] != 'p' and dotSeparated[extIdx] != 'enc': - break - extIdx -= 1 - - if dotSeparated[extIdx] == 'mbn' or dotSeparated[extIdx] == 'elf': - boot[f] = files[f] - elif dotSeparated[extIdx] == 'bin': - bin[f] = files[f] - else: - fw[f] = files[f] - return boot, bin, fw - - -# Prepare radio-update files and verify them -def OTA_VerifyEnd(info, api_version, target_zip, source_zip=None): - if api_version < 3: - print "warning radio-update: no support for api_version less than 3" - return False - - print "Loading radio filesmap..." - filesmap = LoadFilesMap(target_zip) - if filesmap == {}: - print "warning radio-update: no or invalid filesmap file found" - return False - - print "Loading radio target..." - tgt_files = GetRadioFiles(target_zip) - if tgt_files == {}: - print "warning radio-update: no radio images in input target_files" - return False - - src_files = None - if source_zip is not None: - print "Loading radio source..." - src_files = GetRadioFiles(source_zip) - - update_list = {} - largest_source_size = 0 - - print "Preparing radio-update files..." - for fn in tgt_files: - dest, destBak = GetFileDestination(fn, filesmap) - if dest is None: - continue - - tf = tgt_files[fn] - sf = None - if src_files is not None: - sf = src_files.get(fn, None) - - full = sf is None or fn.endswith('.enc') - if not full: - # no difference - skip this file - if tf.sha1 == sf.sha1: - continue - d = common.Difference(tf, sf) - _, _, d = d.ComputePatch() - # no difference - skip this file - if d is None: - continue - # if patch is almost as big as the file - don't bother patching - full = len(d) > tf.size * common.OPTIONS.patch_threshold - if not full: - f = "patch/firmware-update/" + fn + ".p" - common.ZipWriteStr(info.output_zip, f, d) - update_list[f] = (dest, destBak, tf, sf) - largest_source_size = max(largest_source_size, sf.size) - if full: - f = "firmware-update/" + fn - common.ZipWriteStr(info.output_zip, f, tf.data) - update_list[f] = (dest, destBak, None, None) - - global bootImages - global binImages - global fwImages - bootImages, binImages, fwImages = SplitFwTypes(update_list) - - # If there are incremental patches verify them - if largest_source_size != 0: - info.script.Comment("---- radio update verification ----") - info.script.Print("Verifying radio-update...") - - for f in bootImages: - dest, destBak, tf, sf = bootImages[f] - # Not incremental - if sf is None: - continue - info.script.PatchCheck("EMMC:%s:%d:%s:%d:%s" % - (dest, sf.size, sf.sha1, tf.size, tf.sha1)) - if destBak is not None: - info.script.PatchCheck("EMMC:%s:%d:%s:%d:%s" % - (destBak, sf.size, sf.sha1, tf.size, tf.sha1)) - for f in binImages: - dest, destBak, tf, sf = binImages[f] - # Not incremental - if sf is None: - continue - info.script.PatchCheck("EMMC:%s:%d:%s:%d:%s" % - (dest, sf.size, sf.sha1, tf.size, tf.sha1)) - - last_mounted = "" - for f in fwImages: - dest, destBak, tf, sf = fwImages[f] - # Not incremental - if sf is None: - continue - # Get the filename without the path and the patch (.p) extention - f = f.split("/")[-1][:-2] - # Parse filesmap destination paths for "/dev/" pattern in the beginng. - # This would mean that the file must be written to block device - - # fs mount needed - if dest.startswith("/dev/"): - if last_mounted != dest: - info.script.AppendExtra('unmount("/firmware");') - info.script.AppendExtra('mount("vfat", "EMMC", "%s", "/firmware");' % - (dest)) - last_mounted = dest - dest = "/firmware/image/" + f - else: - dest = dest + "/" + f - info.script.PatchCheck(dest, tf.sha1, sf.sha1) - - info.script.CacheFreeSpaceCheck(largest_source_size) - return True - - -def FullOTA_Assertions(info): - #TODO: Implement device specific asserstions. - return - - -def IncrementalOTA_Assertions(info): - #TODO: Implement device specific asserstions. - return - - -def IncrementalOTA_VerifyEnd(info): - OTA_VerifyEnd(info, info.target_version, info.target_zip, info.source_zip) - return - - -# This function handles only non-HLOS whole partition images -def InstallRawImage(script, f, dest, tf, sf): - if f.endswith('.p'): - script.ApplyPatch("EMMC:%s:%d:%s:%d:%s" % - (dest, sf.size, sf.sha1, tf.size, tf.sha1), - "-", tf.size, tf.sha1, sf.sha1, f) - elif f.endswith('.enc'): - # Get the filename without the path - fn = f.split("/")[-1] - script.AppendExtra('package_extract_file("%s", "/tmp/%s");' % (f, fn)) - script.AppendExtra('msm.decrypt("/tmp/%s", "%s");' % (fn, dest)) - else: - script.AppendExtra('package_extract_file("%s", "%s");' % (f, dest)) - return - - -# This function handles only non-HLOS boot images - files list must contain -# only such images (aboot, tz, etc) -def InstallBootImages(script, files): - bakExists = False - # update main partitions - script.AppendExtra('ifelse(msm.boot_update("main"), (') - for f in files: - dest, destBak, tf, sf = files[f] - if destBak is not None: - bakExists = True - InstallRawImage(script, f, dest, tf, sf) - script.AppendExtra('), "");') - - # update backup partitions - if bakExists: - script.AppendExtra('ifelse(msm.boot_update("backup"), (') - for f in files: - dest, destBak, tf, sf = files[f] - if destBak is not None: - InstallRawImage(script, f, destBak, tf, sf) - script.AppendExtra('), "");') - # just finalize primary update stage - else: - script.AppendExtra('msm.boot_update("backup");') - - # finalize partitions update - script.AppendExtra('msm.boot_update("finalize");') - return - - -# This function handles only non-HLOS bin images -def InstallBinImages(script, files): - for f in files: - dest, _, tf, sf = files[f] - InstallRawImage(script, f, dest, tf, sf) - return - - -# This function handles only non-HLOS firmware files that are not whole -# partition images (modem, dsp, etc) -def InstallFwImages(script, files): - last_mounted = "" - - for f in files: - dest, _, tf, sf = files[f] - # Get the filename without the path - fn = f.split("/")[-1] - # Parse filesmap destination paths for "/dev/" pattern in the beginng. - # This would mean that the file must be written to block device - - # fs mount needed - if dest.startswith("/dev/"): - if last_mounted != dest: - script.AppendExtra('unmount("/firmware");') - script.AppendExtra('mount("vfat", "EMMC", "%s", "/firmware");' % - (dest)) - last_mounted = dest - dest = "/firmware/image/" + fn - else: - dest = dest + "/" + fn - - if f.endswith('.p'): - script.ApplyPatch(dest[:-2], "-", tf.size, tf.sha1, sf.sha1, f) - elif f.endswith('.enc'): - script.AppendExtra('package_extract_file("%s", "/tmp/%s");' % (f, fn)) - script.AppendExtra('msm.decrypt("/tmp/%s", "%s");' % (fn, dest[:-4])) - else: - script.AppendExtra('package_extract_file("%s", "%s");' % (f, dest)) - - if last_mounted != "": - script.AppendExtra('unmount("/firmware");') - return - - -def OTA_InstallEnd(info): - print "Applying radio-update script modifications..." - info.script.Comment("---- radio update tasks ----") - info.script.Print("Patching firmware images...") - - if bootImages != {}: - InstallBootImages(info.script, bootImages) - if binImages != {}: - InstallBinImages(info.script, binImages) - if fwImages != {}: - InstallFwImages(info.script, fwImages) - return - - -def FullOTA_InstallEnd_MMC(info): - if OTA_VerifyEnd(info, info.input_version, info.input_zip): - OTA_InstallEnd(info) - return - - -def FullOTA_InstallEnd_MTD(info): - print "warning radio-update: radio update for NAND devices not supported" - return - - -def FullOTA_InstallEnd(info): - FullOTA_InstallEnd_MMC(info) - return - -def IncrementalOTA_InstallEnd_MMC(info): - OTA_InstallEnd(info) - return - - -def IncrementalOTA_InstallEnd_MTD(info): - print "warning radio-update: radio update for NAND devices not supported" - return - -def IncrementalOTA_InstallEnd(info): - IncrementalOTA_InstallEnd_MMC(info) - return |
