Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 1 | #include <gtest/gtest.h> |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | #include <string.h> |
| 5 | |
| 6 | #include <string> |
| 7 | |
| 8 | #define CPUINFO_HARDWARE_VALUE_MAX 64 |
| 9 | #define CPUINFO_ARM_CHIPSET_NAME_MAX 48 |
| 10 | |
| 11 | extern "C" void cpuinfo_arm_android_parse_proc_cpuinfo_hardware( |
| 12 | const char hardware[CPUINFO_HARDWARE_VALUE_MAX], |
| 13 | uint32_t cores, |
| 14 | uint32_t max_cpu_freq_max, |
| 15 | bool is_tegra, |
| 16 | char chipset_name[CPUINFO_ARM_CHIPSET_NAME_MAX]); |
| 17 | |
| 18 | inline std::string parse_proc_cpuinfo_hardware( |
| 19 | std::string hardware, |
| 20 | uint32_t cores=1, |
| 21 | uint32_t max_cpu_freq_max=0) |
| 22 | { |
| 23 | char hardware_buffer[CPUINFO_HARDWARE_VALUE_MAX]; |
| 24 | strncpy(hardware_buffer, hardware.c_str(), CPUINFO_HARDWARE_VALUE_MAX); |
| 25 | char chipset_name[CPUINFO_ARM_CHIPSET_NAME_MAX]; |
| 26 | cpuinfo_arm_android_parse_proc_cpuinfo_hardware( |
| 27 | hardware_buffer, cores, max_cpu_freq_max, false, chipset_name); |
| 28 | return std::string(chipset_name, strnlen(chipset_name, CPUINFO_ARM_CHIPSET_NAME_MAX)); |
| 29 | } |
| 30 | |
| 31 | inline std::string parse_proc_cpuinfo_hardware_tegra( |
| 32 | std::string hardware, |
| 33 | uint32_t cores=1, |
| 34 | uint32_t max_cpu_freq_max=0) |
| 35 | { |
| 36 | char hardware_buffer[CPUINFO_HARDWARE_VALUE_MAX]; |
| 37 | strncpy(hardware_buffer, hardware.c_str(), CPUINFO_HARDWARE_VALUE_MAX); |
| 38 | char chipset_name[CPUINFO_ARM_CHIPSET_NAME_MAX]; |
| 39 | cpuinfo_arm_android_parse_proc_cpuinfo_hardware( |
| 40 | hardware_buffer, cores, max_cpu_freq_max, true, chipset_name); |
| 41 | return std::string(chipset_name, strnlen(chipset_name, CPUINFO_ARM_CHIPSET_NAME_MAX)); |
| 42 | } |
| 43 | |
| 44 | TEST(PROC_CPUINFO_HARDWARE, qualcomm_msm) { |
| 45 | EXPECT_EQ("Qualcomm MSM7225AB", |
| 46 | parse_proc_cpuinfo_hardware("LG MSM7225AB")); |
| 47 | EXPECT_EQ("Qualcomm MSM7225AB", |
| 48 | parse_proc_cpuinfo_hardware("LG MSM7225AB V1")); |
| 49 | EXPECT_EQ("Qualcomm MSM7625A", |
| 50 | parse_proc_cpuinfo_hardware("QCT MSM7625a FFA")); |
| 51 | EXPECT_EQ("Qualcomm MSM8208", |
| 52 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8208")); |
| 53 | EXPECT_EQ("Qualcomm MSM8209", |
| 54 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8209")); |
| 55 | EXPECT_EQ("Qualcomm MSM8210", |
| 56 | parse_proc_cpuinfo_hardware("Qualcomm MSM8210")); |
| 57 | EXPECT_EQ("Qualcomm MSM8212", |
| 58 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8212 (Flattened Device Tree)")); |
| 59 | EXPECT_EQ("Qualcomm MSM8212", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 60 | parse_proc_cpuinfo_hardware("Qualcomm MSM8212")); |
| 61 | EXPECT_EQ("Qualcomm MSM8225", |
| 62 | parse_proc_cpuinfo_hardware("QCT MSM8225 SURF")); |
| 63 | EXPECT_EQ("Qualcomm MSM8226", |
| 64 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8226 (Flattened Device Tree)")); |
| 65 | EXPECT_EQ("Qualcomm MSM8226", |
| 66 | parse_proc_cpuinfo_hardware("Qualcomm MSM8226")); |
| 67 | EXPECT_EQ("Qualcomm MSM8228", |
| 68 | parse_proc_cpuinfo_hardware("Qualcomm MSM8228")); |
| 69 | EXPECT_EQ("Qualcomm MSM8230", |
| 70 | parse_proc_cpuinfo_hardware("LGE MSM8230 L9II")); |
| 71 | EXPECT_EQ("Qualcomm MSM8239", |
| 72 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8239")); |
| 73 | EXPECT_EQ("Qualcomm MSM8609", |
| 74 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8609")); |
| 75 | EXPECT_EQ("Qualcomm MSM8610", |
| 76 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8610 (Flattened Device Tree)", 2)); |
| 77 | EXPECT_EQ("Qualcomm MSM8610", |
| 78 | parse_proc_cpuinfo_hardware("Qualcomm MSM8610", 2)); |
| 79 | EXPECT_EQ("Qualcomm MSM8612", |
Marat Dukhan | d72e891 | 2018-03-08 10:09:59 -0800 | [diff] [blame] | 80 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8610 (Flattened Device Tree)", 4)); |
| 81 | EXPECT_EQ("Qualcomm MSM8612", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 82 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8612 (Flattened Device Tree)")); |
| 83 | EXPECT_EQ("Qualcomm MSM8625", |
| 84 | parse_proc_cpuinfo_hardware("LG MSM8625 V7")); |
| 85 | EXPECT_EQ("Qualcomm MSM8625", |
| 86 | parse_proc_cpuinfo_hardware("QCT MSM8625 FFA")); |
| 87 | EXPECT_EQ("Qualcomm MSM8625", |
| 88 | parse_proc_cpuinfo_hardware("QCT MSM8625 SURF")); |
| 89 | EXPECT_EQ("Qualcomm MSM8625Q", |
| 90 | parse_proc_cpuinfo_hardware("QRD MSM8625Q SKUD")); |
| 91 | EXPECT_EQ("Qualcomm MSM8626", |
| 92 | parse_proc_cpuinfo_hardware("Qualcomm MSM8626")); |
| 93 | EXPECT_EQ("Qualcomm MSM8627", |
| 94 | parse_proc_cpuinfo_hardware("QCT MSM8627 MTP")); |
| 95 | EXPECT_EQ("Qualcomm MSM8628", |
| 96 | parse_proc_cpuinfo_hardware("Qualcomm MSM8628")); |
| 97 | EXPECT_EQ("Qualcomm MSM8909", |
| 98 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8909")); |
| 99 | EXPECT_EQ("Qualcomm MSM8916", |
| 100 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8216")); |
| 101 | EXPECT_EQ("Qualcomm MSM8916", |
| 102 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8916", 4)); |
| 103 | EXPECT_EQ("Qualcomm MSM8916", |
| 104 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8916MSM8916", 4)); |
| 105 | EXPECT_EQ("Qualcomm MSM8917", |
| 106 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8917", 4)); |
| 107 | EXPECT_EQ("Qualcomm MSM8920", |
| 108 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8920")); |
| 109 | EXPECT_EQ("Qualcomm MSM8926", |
| 110 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8926 (Flattened Device Tree)")); |
| 111 | EXPECT_EQ("Qualcomm MSM8926", |
| 112 | parse_proc_cpuinfo_hardware("Qualcomm MSM8926")); |
| 113 | EXPECT_EQ("Qualcomm MSM8928", |
| 114 | parse_proc_cpuinfo_hardware("Qualcomm MSM8928")); |
| 115 | EXPECT_EQ("Qualcomm MSM8928", |
| 116 | parse_proc_cpuinfo_hardware("Qualcomm msm 8928")); |
| 117 | EXPECT_EQ("Qualcomm MSM8929", |
| 118 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8929")); |
| 119 | EXPECT_EQ("Qualcomm MSM8930", |
| 120 | parse_proc_cpuinfo_hardware("LGE MSM8930 FX3")); |
| 121 | EXPECT_EQ("Qualcomm MSM8930", |
| 122 | parse_proc_cpuinfo_hardware("QCT MSM8930 CDP")); |
| 123 | EXPECT_EQ("Qualcomm MSM8930", |
| 124 | parse_proc_cpuinfo_hardware("QCT MSM8930 MTP")); |
| 125 | EXPECT_EQ("Qualcomm MSM8937", |
| 126 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8937", 8)); |
| 127 | EXPECT_EQ("Qualcomm MSM8939", |
| 128 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI ALE_L04")); |
| 129 | EXPECT_EQ("Qualcomm MSM8939", |
| 130 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI ATH-UL01")); |
| 131 | EXPECT_EQ("Qualcomm MSM8939", |
| 132 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KII-L05")); |
| 133 | EXPECT_EQ("Qualcomm MSM8939", |
| 134 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L21")); |
| 135 | EXPECT_EQ("Qualcomm MSM8939", |
| 136 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L22")); |
| 137 | EXPECT_EQ("Qualcomm MSM8939", |
| 138 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L23")); |
| 139 | EXPECT_EQ("Qualcomm MSM8939", |
| 140 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L24")); |
| 141 | EXPECT_EQ("Qualcomm MSM8939", |
| 142 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI KIW-L33")); |
| 143 | EXPECT_EQ("Qualcomm MSM8939", |
| 144 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI RIO-L01_VB")); |
| 145 | EXPECT_EQ("Qualcomm MSM8939", |
| 146 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI RIO-L02")); |
| 147 | EXPECT_EQ("Qualcomm MSM8939", |
| 148 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI RIO-L03")); |
| 149 | EXPECT_EQ("Qualcomm MSM8939", |
| 150 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8939 HUAWEI TEXAS-A1")); |
| 151 | EXPECT_EQ("Qualcomm MSM8939", |
| 152 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8939")); |
| 153 | EXPECT_EQ("Qualcomm MSM8939", |
| 154 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8939_BC")); |
| 155 | EXPECT_EQ("Qualcomm MSM8940", |
| 156 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8940")); |
| 157 | EXPECT_EQ("Qualcomm MSM8952", |
| 158 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8952")); |
| 159 | EXPECT_EQ("Qualcomm MSM8952", |
| 160 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8952MSM8952")); |
| 161 | EXPECT_EQ("Qualcomm MSM8952", |
| 162 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc. MSM8952 QRD SKUM")); |
| 163 | EXPECT_EQ("Qualcomm MSM8953", |
| 164 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8953")); |
| 165 | EXPECT_EQ("Qualcomm MSM8953PRO", |
| 166 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8953Pro")); |
| 167 | EXPECT_EQ("Qualcomm MSM8956", |
| 168 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8956")); |
| 169 | EXPECT_EQ("Qualcomm MSM8960", |
| 170 | parse_proc_cpuinfo_hardware("LGE MSM8960 D1L KR", 2)); |
| 171 | EXPECT_EQ("Qualcomm MSM8960", |
| 172 | parse_proc_cpuinfo_hardware("LGE MSM8960 FX1", 2)); |
| 173 | EXPECT_EQ("Qualcomm MSM8960", |
| 174 | parse_proc_cpuinfo_hardware("LGE MSM8960 Lx", 2)); |
| 175 | EXPECT_EQ("Qualcomm MSM8960", |
| 176 | parse_proc_cpuinfo_hardware("LGE MSM8960 VU2", 2)); |
| 177 | EXPECT_EQ("Qualcomm MSM8960", |
| 178 | parse_proc_cpuinfo_hardware("QCT MSM8960 CDP", 2)); |
| 179 | EXPECT_EQ("Qualcomm MSM8960", |
| 180 | parse_proc_cpuinfo_hardware("Qualcomm MSM8960", 2)); |
| 181 | EXPECT_EQ("Qualcomm MSM8960DT", |
| 182 | parse_proc_cpuinfo_hardware("msm8960dt")); |
| 183 | EXPECT_EQ("Qualcomm MSM8974", |
| 184 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8974 (Flattened Device Tree)")); |
| 185 | EXPECT_EQ("Qualcomm MSM8974", |
| 186 | parse_proc_cpuinfo_hardware("Qualcomm MSM 8974 HAMMERHEAD (Flattened Device Tree)")); |
| 187 | EXPECT_EQ("Qualcomm MSM8974", |
| 188 | parse_proc_cpuinfo_hardware("Qualcomm MSM8974")); |
| 189 | EXPECT_EQ("Qualcomm MSM8974PRO-AA", |
| 190 | parse_proc_cpuinfo_hardware("Qualcomm MSM8974PRO-AA")); |
| 191 | EXPECT_EQ("Qualcomm MSM8974PRO-AB", |
| 192 | parse_proc_cpuinfo_hardware("Qualcomm MSM8974PRO-AB")); |
| 193 | EXPECT_EQ("Qualcomm MSM8974PRO-AC", |
| 194 | parse_proc_cpuinfo_hardware("Qualcomm MSM8974PRO-AC")); |
| 195 | EXPECT_EQ("Qualcomm MSM8976", |
| 196 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8976")); |
| 197 | EXPECT_EQ("Qualcomm MSM8976PRO", |
| 198 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8976SG")); |
| 199 | EXPECT_EQ("Qualcomm MSM8992", |
| 200 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8992")); |
| 201 | EXPECT_EQ("Qualcomm MSM8994", |
| 202 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8994")); |
| 203 | EXPECT_EQ("Qualcomm MSM8994V", |
| 204 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc. MSM8994v2.1 MTP")); |
| 205 | EXPECT_EQ("Qualcomm MSM8996", |
| 206 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996", 4)); |
| 207 | EXPECT_EQ("Qualcomm MSM8996PRO-AB", |
| 208 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996pro", 4, 1593600 /* LITTLE core */)); |
| 209 | EXPECT_EQ("Qualcomm MSM8996PRO-AB", |
| 210 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996pro", 4, 2150400 /* big core */)); |
| 211 | EXPECT_EQ("Qualcomm MSM8996PRO-AC", |
| 212 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996pro", 4, 2188800 /* LITTLE core */)); |
| 213 | EXPECT_EQ("Qualcomm MSM8996PRO-AC", |
| 214 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8996pro", 4, 2342400 /* big core */)); |
| 215 | EXPECT_EQ("Qualcomm MSM8998", |
| 216 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc MSM8998")); |
| 217 | } |
| 218 | |
| 219 | TEST(PROC_CPUINFO_HARDWARE, qualcomm_apq) { |
| 220 | EXPECT_EQ("Qualcomm APQ8009", |
| 221 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8009")); |
| 222 | EXPECT_EQ("Qualcomm APQ8016", |
| 223 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8016")); |
| 224 | EXPECT_EQ("Qualcomm APQ8016", |
| 225 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8016APQ8016")); |
| 226 | EXPECT_EQ("Qualcomm APQ8017", |
| 227 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8017")); |
| 228 | EXPECT_EQ("Qualcomm APQ8026", |
| 229 | parse_proc_cpuinfo_hardware("Qualcomm APQ8026")); |
| 230 | EXPECT_EQ("Qualcomm APQ8028", |
| 231 | parse_proc_cpuinfo_hardware("Qualcomm APQ8028")); |
| 232 | EXPECT_EQ("Qualcomm APQ8039", |
| 233 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8039")); |
| 234 | EXPECT_EQ("Qualcomm APQ8053", |
| 235 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8053")); |
| 236 | EXPECT_EQ("Qualcomm APQ8064", |
| 237 | parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF48S")); |
| 238 | EXPECT_EQ("Qualcomm APQ8064", |
| 239 | parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF49K")); |
| 240 | EXPECT_EQ("Qualcomm APQ8064", |
| 241 | parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF50L")); |
| 242 | EXPECT_EQ("Qualcomm APQ8064", |
| 243 | parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF51K")); |
| 244 | EXPECT_EQ("Qualcomm APQ8064", |
| 245 | parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF51L")); |
| 246 | EXPECT_EQ("Qualcomm APQ8064", |
| 247 | parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF51S")); |
| 248 | EXPECT_EQ("Qualcomm APQ8064", |
| 249 | parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF52K")); |
| 250 | EXPECT_EQ("Qualcomm APQ8064", |
| 251 | parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF52L")); |
| 252 | EXPECT_EQ("Qualcomm APQ8064", |
| 253 | parse_proc_cpuinfo_hardware("PANTECH APQ8064 EF52S")); |
| 254 | EXPECT_EQ("Qualcomm APQ8064", |
| 255 | parse_proc_cpuinfo_hardware("QCT APQ8064 AWIFI")); |
| 256 | EXPECT_EQ("Qualcomm APQ8064", |
| 257 | parse_proc_cpuinfo_hardware("QCT APQ8064 DEB")); |
| 258 | EXPECT_EQ("Qualcomm APQ8064", |
| 259 | parse_proc_cpuinfo_hardware("QCT APQ8064 DUMA")); |
| 260 | EXPECT_EQ("Qualcomm APQ8064", |
| 261 | parse_proc_cpuinfo_hardware("QCT APQ8064 FLO")); |
| 262 | EXPECT_EQ("Qualcomm APQ8064", |
| 263 | parse_proc_cpuinfo_hardware("QCT APQ8064 LEOPARDCAT")); |
| 264 | EXPECT_EQ("Qualcomm APQ8064", |
| 265 | parse_proc_cpuinfo_hardware("QCT APQ8064 MAKO")); |
| 266 | EXPECT_EQ("Qualcomm APQ8064", |
| 267 | parse_proc_cpuinfo_hardware("QCT APQ8064 MTP")); |
| 268 | EXPECT_EQ("Qualcomm APQ8074PRO-AB", |
| 269 | parse_proc_cpuinfo_hardware("Qualcomm APQ8074PRO-AB")); |
| 270 | EXPECT_EQ("Qualcomm APQ8076", |
| 271 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8076")); |
| 272 | EXPECT_EQ("Qualcomm APQ8084", |
| 273 | parse_proc_cpuinfo_hardware("Qualcomm APQ 8084 (Flattened Device Tree)")); |
| 274 | EXPECT_EQ("Qualcomm APQ8084", |
| 275 | parse_proc_cpuinfo_hardware("Qualcomm APQ8084")); |
| 276 | EXPECT_EQ("Qualcomm APQ8094", |
| 277 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8094")); |
| 278 | EXPECT_EQ("Qualcomm APQ8096", |
| 279 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc APQ8096")); |
| 280 | } |
| 281 | |
| 282 | TEST(PROC_CPUINFO_HARDWARE, qualcomm_sdm) { |
| 283 | EXPECT_EQ("Qualcomm Snapdragon 630", |
| 284 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc SDM630")); |
| 285 | EXPECT_EQ("Qualcomm Snapdragon 660", |
| 286 | parse_proc_cpuinfo_hardware("Qualcomm Technologies, Inc SDM660")); |
| 287 | } |
| 288 | |
| 289 | TEST(PROC_CPUINFO_HARDWARE, mediatek_mt) { |
| 290 | EXPECT_EQ("MediaTek MT5507", |
| 291 | parse_proc_cpuinfo_hardware("MT5507")); |
| 292 | EXPECT_EQ("MediaTek MT5508", |
| 293 | parse_proc_cpuinfo_hardware("MT5508")); |
| 294 | EXPECT_EQ("MediaTek MT6517", |
| 295 | parse_proc_cpuinfo_hardware("MT6517")); |
| 296 | EXPECT_EQ("MediaTek MT6570", |
| 297 | parse_proc_cpuinfo_hardware("MT6570")); |
| 298 | EXPECT_EQ("MediaTek MT6571", |
| 299 | parse_proc_cpuinfo_hardware("MT6571")); |
| 300 | EXPECT_EQ("MediaTek MT6572", |
| 301 | parse_proc_cpuinfo_hardware("MT6572")); |
| 302 | EXPECT_EQ("MediaTek MT6575", |
| 303 | parse_proc_cpuinfo_hardware("MT6575")); |
| 304 | EXPECT_EQ("MediaTek MT6577", |
| 305 | parse_proc_cpuinfo_hardware("MT6577")); |
| 306 | EXPECT_EQ("MediaTek MT6580", |
| 307 | parse_proc_cpuinfo_hardware("MT6580")); |
| 308 | EXPECT_EQ("MediaTek MT6580M", |
| 309 | parse_proc_cpuinfo_hardware("MT6580M")); |
| 310 | EXPECT_EQ("MediaTek MT6581", |
| 311 | parse_proc_cpuinfo_hardware("MT6581")); |
| 312 | EXPECT_EQ("MediaTek MT6582", |
| 313 | parse_proc_cpuinfo_hardware("MT6582")); |
| 314 | EXPECT_EQ("MediaTek MT6582", |
| 315 | parse_proc_cpuinfo_hardware("Mediatek MT6582")); |
| 316 | EXPECT_EQ("MediaTek MT6588", |
| 317 | parse_proc_cpuinfo_hardware("MT6588")); |
| 318 | EXPECT_EQ("MediaTek MT6589", |
| 319 | parse_proc_cpuinfo_hardware("MT6589")); |
| 320 | EXPECT_EQ("MediaTek MT6591", |
| 321 | parse_proc_cpuinfo_hardware("MT6591")); |
| 322 | EXPECT_EQ("MediaTek MT6592", |
| 323 | parse_proc_cpuinfo_hardware("MT6592")); |
| 324 | EXPECT_EQ("MediaTek MT6592T", |
| 325 | parse_proc_cpuinfo_hardware("MT6592T")); |
| 326 | EXPECT_EQ("MediaTek MT6592T", |
| 327 | parse_proc_cpuinfo_hardware("MT6592trubo")); |
| 328 | EXPECT_EQ("MediaTek MT6592T", |
| 329 | parse_proc_cpuinfo_hardware("MT6592turbo")); |
| 330 | EXPECT_EQ("MediaTek MT6595", |
| 331 | parse_proc_cpuinfo_hardware("MT6595")); |
| 332 | EXPECT_EQ("MediaTek MT6732", |
| 333 | parse_proc_cpuinfo_hardware("MT6732")); |
| 334 | EXPECT_EQ("MediaTek MT6732", |
| 335 | parse_proc_cpuinfo_hardware("MT6752", 4)); |
| 336 | EXPECT_EQ("MediaTek MT6732M", |
| 337 | parse_proc_cpuinfo_hardware("MT6732M")); |
| 338 | EXPECT_EQ("MediaTek MT6735", |
| 339 | parse_proc_cpuinfo_hardware("MT6735")); |
| 340 | EXPECT_EQ("MediaTek MT6735M", |
| 341 | parse_proc_cpuinfo_hardware("MT6735M")); |
| 342 | EXPECT_EQ("MediaTek MT6735P", |
| 343 | parse_proc_cpuinfo_hardware("MT6735P")); |
| 344 | EXPECT_EQ("MediaTek MT6737", |
| 345 | parse_proc_cpuinfo_hardware("MT6737")); |
| 346 | EXPECT_EQ("MediaTek MT6737M", |
| 347 | parse_proc_cpuinfo_hardware("MT6737M")); |
| 348 | EXPECT_EQ("MediaTek MT6737T", |
| 349 | parse_proc_cpuinfo_hardware("MT6737T")); |
| 350 | EXPECT_EQ("MediaTek MT6737T", |
| 351 | parse_proc_cpuinfo_hardware("Samsung GrandPrimePlus LTE CIS rev04 board based on MT6737T")); |
| 352 | EXPECT_EQ("MediaTek MT6737T", |
| 353 | parse_proc_cpuinfo_hardware("Samsung GrandPrimePlus LTE LTN DTV rev04 board based on MT6737T")); |
| 354 | EXPECT_EQ("MediaTek MT6737T", |
| 355 | parse_proc_cpuinfo_hardware("Samsung GrandPrimePlus LTE LTN OPEN rev04 board based on MT6737T")); |
| 356 | EXPECT_EQ("MediaTek MT6738", |
| 357 | parse_proc_cpuinfo_hardware("MT6738")); |
| 358 | EXPECT_EQ("MediaTek MT6750", |
| 359 | parse_proc_cpuinfo_hardware("MT6750")); |
| 360 | EXPECT_EQ("MediaTek MT6750T", |
| 361 | parse_proc_cpuinfo_hardware("MT6750T")); |
| 362 | EXPECT_EQ("MediaTek MT6752", |
| 363 | parse_proc_cpuinfo_hardware("MT6752", 8)); |
| 364 | EXPECT_EQ("MediaTek MT6752M", |
| 365 | parse_proc_cpuinfo_hardware("MT6752M", 8)); |
| 366 | EXPECT_EQ("MediaTek MT6753", |
| 367 | parse_proc_cpuinfo_hardware("MT6753")); |
| 368 | EXPECT_EQ("MediaTek MT6753T", |
| 369 | parse_proc_cpuinfo_hardware("MT6753T")); |
| 370 | EXPECT_EQ("MediaTek MT6755", |
| 371 | parse_proc_cpuinfo_hardware("MT6755")); |
| 372 | EXPECT_EQ("MediaTek MT6755BM", |
| 373 | parse_proc_cpuinfo_hardware("MT6755BM")); |
| 374 | EXPECT_EQ("MediaTek MT6755M", |
| 375 | parse_proc_cpuinfo_hardware("MT6755M")); |
| 376 | EXPECT_EQ("MediaTek MT6755V/B", |
| 377 | parse_proc_cpuinfo_hardware("MT6755V/B")); |
| 378 | EXPECT_EQ("MediaTek MT6755V/BM", |
| 379 | parse_proc_cpuinfo_hardware("MT6755V/BM")); |
| 380 | EXPECT_EQ("MediaTek MT6755V/C", |
| 381 | parse_proc_cpuinfo_hardware("MT6755V/C")); |
| 382 | EXPECT_EQ("MediaTek MT6755V/CM", |
| 383 | parse_proc_cpuinfo_hardware("MT6755V/CM")); |
| 384 | EXPECT_EQ("MediaTek MT6755V/W", |
| 385 | parse_proc_cpuinfo_hardware("MT6755V/W")); |
| 386 | EXPECT_EQ("MediaTek MT6755V/WM", |
| 387 | parse_proc_cpuinfo_hardware("MT6755V/WM")); |
| 388 | EXPECT_EQ("MediaTek MT6755V/WT", |
| 389 | parse_proc_cpuinfo_hardware("MT6755V/WT")); |
| 390 | EXPECT_EQ("MediaTek MT6757", |
| 391 | parse_proc_cpuinfo_hardware("MT6757")); |
| 392 | EXPECT_EQ("MediaTek MT6757", |
| 393 | parse_proc_cpuinfo_hardware("Samsung J7 Max LTE SWA rev02a board based on MT6757")); |
| 394 | EXPECT_EQ("MediaTek MT6757CD", |
| 395 | parse_proc_cpuinfo_hardware("MT6757CD")); |
| 396 | EXPECT_EQ("MediaTek MT6757CH", |
| 397 | parse_proc_cpuinfo_hardware("MT6757CH")); |
| 398 | EXPECT_EQ("MediaTek MT6795", |
| 399 | parse_proc_cpuinfo_hardware("MT6795")); |
| 400 | EXPECT_EQ("MediaTek MT6795M", |
| 401 | parse_proc_cpuinfo_hardware("MT6795M")); |
| 402 | EXPECT_EQ("MediaTek MT6795MM", |
| 403 | parse_proc_cpuinfo_hardware("MT6795MM")); |
| 404 | EXPECT_EQ("MediaTek MT6795T", |
| 405 | parse_proc_cpuinfo_hardware("MT6795T")); |
| 406 | EXPECT_EQ("MediaTek MT6797", |
| 407 | parse_proc_cpuinfo_hardware("MT6797")); |
| 408 | EXPECT_EQ("MediaTek MT6797M", |
| 409 | parse_proc_cpuinfo_hardware("MT6797M")); |
| 410 | EXPECT_EQ("MediaTek MT6797T", |
| 411 | parse_proc_cpuinfo_hardware("MT6797T")); |
| 412 | EXPECT_EQ("MediaTek MT6797X", |
| 413 | parse_proc_cpuinfo_hardware("MT6797X")); |
| 414 | EXPECT_EQ("MediaTek MT8111", |
| 415 | parse_proc_cpuinfo_hardware("MT8111")); |
| 416 | EXPECT_EQ("MediaTek MT8121", |
| 417 | parse_proc_cpuinfo_hardware("MT8121")); |
| 418 | EXPECT_EQ("MediaTek MT8125", |
| 419 | parse_proc_cpuinfo_hardware("MT8125")); |
| 420 | EXPECT_EQ("MediaTek MT8127", |
| 421 | parse_proc_cpuinfo_hardware("MT8127")); |
| 422 | EXPECT_EQ("MediaTek MT8135", |
| 423 | parse_proc_cpuinfo_hardware("MT8135")); |
| 424 | EXPECT_EQ("MediaTek MT8151", |
| 425 | parse_proc_cpuinfo_hardware("MT8151")); |
| 426 | EXPECT_EQ("MediaTek MT8161", |
| 427 | parse_proc_cpuinfo_hardware("MT8161")); |
| 428 | EXPECT_EQ("MediaTek MT8161A", |
| 429 | parse_proc_cpuinfo_hardware("MT8161A")); |
| 430 | EXPECT_EQ("MediaTek MT8161P", |
| 431 | parse_proc_cpuinfo_hardware("MT8161P")); |
| 432 | EXPECT_EQ("MediaTek MT8163", |
| 433 | parse_proc_cpuinfo_hardware("MT8163")); |
| 434 | EXPECT_EQ("MediaTek MT8165", |
| 435 | parse_proc_cpuinfo_hardware("MT8165")); |
| 436 | EXPECT_EQ("MediaTek MT8167A", |
| 437 | parse_proc_cpuinfo_hardware("MT8167A")); |
| 438 | EXPECT_EQ("MediaTek MT8167B", |
| 439 | parse_proc_cpuinfo_hardware("MT8167B")); |
| 440 | EXPECT_EQ("MediaTek MT8173", |
| 441 | parse_proc_cpuinfo_hardware("MT8173")); |
| 442 | EXPECT_EQ("MediaTek MT8176", |
| 443 | parse_proc_cpuinfo_hardware("MT8176")); |
| 444 | EXPECT_EQ("MediaTek MT8312", |
| 445 | parse_proc_cpuinfo_hardware("MT8312")); |
| 446 | EXPECT_EQ("MediaTek MT8312C", |
| 447 | parse_proc_cpuinfo_hardware("MT8312C")); |
| 448 | EXPECT_EQ("MediaTek MT8312D", |
| 449 | parse_proc_cpuinfo_hardware("MT8312D")); |
| 450 | EXPECT_EQ("MediaTek MT8317", |
| 451 | parse_proc_cpuinfo_hardware("MT8317")); |
| 452 | EXPECT_EQ("MediaTek MT8321", |
| 453 | parse_proc_cpuinfo_hardware("MT8321")); |
| 454 | EXPECT_EQ("MediaTek MT8321M", |
| 455 | parse_proc_cpuinfo_hardware("MT8321M")); |
| 456 | EXPECT_EQ("MediaTek MT8377", |
| 457 | parse_proc_cpuinfo_hardware("MT8377")); |
| 458 | EXPECT_EQ("MediaTek MT8382", |
| 459 | parse_proc_cpuinfo_hardware("MT8382")); |
| 460 | EXPECT_EQ("MediaTek MT8389", |
| 461 | parse_proc_cpuinfo_hardware("MT8389")); |
| 462 | EXPECT_EQ("MediaTek MT8389Q", |
| 463 | parse_proc_cpuinfo_hardware("MT8389Q")); |
| 464 | EXPECT_EQ("MediaTek MT8392", |
| 465 | parse_proc_cpuinfo_hardware("MT8392")); |
| 466 | EXPECT_EQ("MediaTek MT8685", |
| 467 | parse_proc_cpuinfo_hardware("MT8685")); |
| 468 | EXPECT_EQ("MediaTek MT8732", |
| 469 | parse_proc_cpuinfo_hardware("MT8732")); |
| 470 | EXPECT_EQ("MediaTek MT8732T", |
| 471 | parse_proc_cpuinfo_hardware("MT8732T")); |
| 472 | EXPECT_EQ("MediaTek MT8735", |
| 473 | parse_proc_cpuinfo_hardware("MT8735")); |
| 474 | EXPECT_EQ("MediaTek MT8735A", |
| 475 | parse_proc_cpuinfo_hardware("MT8735A")); |
| 476 | EXPECT_EQ("MediaTek MT8735B", |
| 477 | parse_proc_cpuinfo_hardware("MT8735B")); |
| 478 | EXPECT_EQ("MediaTek MT8735D", |
| 479 | parse_proc_cpuinfo_hardware("MT8735D")); |
| 480 | EXPECT_EQ("MediaTek MT8735M", |
| 481 | parse_proc_cpuinfo_hardware("MT8735M")); |
| 482 | EXPECT_EQ("MediaTek MT8735P", |
| 483 | parse_proc_cpuinfo_hardware("MT8735P")); |
| 484 | EXPECT_EQ("MediaTek MT8735T", |
| 485 | parse_proc_cpuinfo_hardware("MT8735T")); |
| 486 | EXPECT_EQ("MediaTek MT8752", |
| 487 | parse_proc_cpuinfo_hardware("MT8752")); |
| 488 | EXPECT_EQ("MediaTek MT8783", |
| 489 | parse_proc_cpuinfo_hardware("MT8783")); |
| 490 | EXPECT_EQ("MediaTek MT8783T", |
| 491 | parse_proc_cpuinfo_hardware("MT8783T")); |
| 492 | } |
| 493 | |
| 494 | TEST(PROC_CPUINFO_HARDWARE, samsung_exynos) { |
| 495 | EXPECT_EQ("Samsung Exynos 4415", |
| 496 | parse_proc_cpuinfo_hardware("Samsung EXYNOS4415")); |
| 497 | EXPECT_EQ("Samsung Exynos 5420", |
Marat Dukhan | ab7f949 | 2018-03-08 13:06:40 -0800 | [diff] [blame^] | 498 | parse_proc_cpuinfo_hardware("Samsung EXYNOS5420", 4)); |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 499 | EXPECT_EQ("Samsung Exynos 5430", |
| 500 | parse_proc_cpuinfo_hardware("Samsung EXYNOS5430")); |
| 501 | EXPECT_EQ("Samsung Exynos 5433", |
| 502 | parse_proc_cpuinfo_hardware("Samsung EXYNOS5433")); |
| 503 | EXPECT_EQ("Samsung Exynos 7420", |
| 504 | parse_proc_cpuinfo_hardware("SAMSUNG Exynos7420")); |
| 505 | EXPECT_EQ("Samsung Exynos 7578", |
| 506 | parse_proc_cpuinfo_hardware("SAMSUNG Exynos7580", 4)); |
| 507 | EXPECT_EQ("Samsung Exynos 7580", |
| 508 | parse_proc_cpuinfo_hardware("SAMSUNG Exynos7580", 8)); |
| 509 | } |
| 510 | |
| 511 | TEST(PROC_CPUINFO_HARDWARE, samsung_universal) { |
| 512 | EXPECT_EQ("Samsung Exynos 3470", |
| 513 | parse_proc_cpuinfo_hardware("UNIVERSAL3470")); |
| 514 | EXPECT_EQ("Samsung Exynos 3475", |
| 515 | parse_proc_cpuinfo_hardware("UNIVERSAL3475")); |
| 516 | EXPECT_EQ("Samsung Exynos 5260", |
| 517 | parse_proc_cpuinfo_hardware("UNIVERSAL5260")); |
| 518 | EXPECT_EQ("Samsung Exynos 5410", |
| 519 | parse_proc_cpuinfo_hardware("UNIVERSAL5410")); |
| 520 | EXPECT_EQ("Samsung Exynos 5420", |
Marat Dukhan | ab7f949 | 2018-03-08 13:06:40 -0800 | [diff] [blame^] | 521 | parse_proc_cpuinfo_hardware("UNIVERSAL5420", 4)); |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 522 | EXPECT_EQ("Samsung Exynos 5422", |
| 523 | parse_proc_cpuinfo_hardware("universal5422")); |
| 524 | EXPECT_EQ("Samsung Exynos 5430", |
| 525 | parse_proc_cpuinfo_hardware("UNIVERSAL5430")); |
| 526 | } |
| 527 | |
| 528 | TEST(PROC_CPUINFO_HARDWARE, samsung_smdk) { |
| 529 | EXPECT_EQ("Samsung Exynos 4210", |
| 530 | parse_proc_cpuinfo_hardware("SMDK4210")); |
| 531 | EXPECT_EQ("Samsung Exynos 4212", |
| 532 | parse_proc_cpuinfo_hardware("SMDK4x12", 2)); |
| 533 | EXPECT_EQ("Samsung Exynos 4412", |
| 534 | parse_proc_cpuinfo_hardware("SMDK4x12", 4)); |
| 535 | } |
| 536 | |
| 537 | TEST(PROC_CPUINFO_HARDWARE, samsung_special) { |
| 538 | EXPECT_EQ("Samsung Exynos 5250", |
| 539 | parse_proc_cpuinfo_hardware("Manta")); |
| 540 | } |
| 541 | |
| 542 | TEST(PROC_CPUINFO_HARDWARE, hisilicon_kirin) { |
| 543 | EXPECT_EQ("HiSilicon Kirin 920", |
| 544 | parse_proc_cpuinfo_hardware("Hisilicon Kirin 920")); |
| 545 | EXPECT_EQ("HiSilicon Kirin 920", |
| 546 | parse_proc_cpuinfo_hardware("Kirin920")); |
| 547 | EXPECT_EQ("HiSilicon Kirin 925", |
| 548 | parse_proc_cpuinfo_hardware("Hisilicon Kirin 925")); |
| 549 | EXPECT_EQ("HiSilicon Kirin 925", |
| 550 | parse_proc_cpuinfo_hardware("Kirin925")); |
| 551 | EXPECT_EQ("HiSilicon Kirin 930", |
| 552 | parse_proc_cpuinfo_hardware("Hisilicon Kirin 930")); |
| 553 | EXPECT_EQ("HiSilicon Kirin 935", |
| 554 | parse_proc_cpuinfo_hardware("Hisilicon Kirin 935")); |
| 555 | EXPECT_EQ("HiSilicon Kirin 950", |
| 556 | parse_proc_cpuinfo_hardware("Hisilicon Kirin 950")); |
| 557 | EXPECT_EQ("HiSilicon Kirin 955", |
| 558 | parse_proc_cpuinfo_hardware("Hisilicon Kirin 955")); |
| 559 | } |
| 560 | |
| 561 | TEST(PROC_CPUINFO_HARDWARE, hisilicon_special) { |
| 562 | EXPECT_EQ("HiSilicon Hi3751", |
| 563 | parse_proc_cpuinfo_hardware("hi3751")); |
| 564 | EXPECT_EQ("HiSilicon K3V2", |
| 565 | parse_proc_cpuinfo_hardware("k3v2oem1")); |
| 566 | EXPECT_EQ("HiSilicon Kirin 620", |
| 567 | parse_proc_cpuinfo_hardware("hi6210sft")); |
| 568 | EXPECT_EQ("HiSilicon Kirin 650", |
| 569 | parse_proc_cpuinfo_hardware("hi6250")); |
| 570 | EXPECT_EQ("HiSilicon Kirin 910T", |
| 571 | parse_proc_cpuinfo_hardware("hi6620oem")); |
| 572 | } |
| 573 | |
| 574 | TEST(PROC_CPUINFO_HARDWARE, actions) { |
| 575 | EXPECT_EQ("Actions ATM7029", |
| 576 | parse_proc_cpuinfo_hardware("gs702a")); |
| 577 | EXPECT_EQ("Actions ATM7029B", |
| 578 | parse_proc_cpuinfo_hardware("gs702c")); |
| 579 | EXPECT_EQ("Actions ATM7059A", |
| 580 | parse_proc_cpuinfo_hardware("gs705a")); |
| 581 | } |
| 582 | |
| 583 | TEST(PROC_CPUINFO_HARDWARE, allwinner_sunxi) { |
| 584 | EXPECT_EQ("Allwinner A10", |
| 585 | parse_proc_cpuinfo_hardware("sun4i", 1)); |
| 586 | EXPECT_EQ("Allwinner A13", |
| 587 | parse_proc_cpuinfo_hardware("sun5i", 1)); |
| 588 | EXPECT_EQ("Allwinner A20", |
| 589 | parse_proc_cpuinfo_hardware("sun7i", 2)); |
| 590 | EXPECT_EQ("Allwinner A23", |
| 591 | parse_proc_cpuinfo_hardware("sun8i", 2)); |
| 592 | EXPECT_EQ("Allwinner A31", |
| 593 | parse_proc_cpuinfo_hardware("sun6i", 4)); |
| 594 | EXPECT_EQ("Allwinner A33", |
| 595 | parse_proc_cpuinfo_hardware("sun8i", 4)); |
| 596 | EXPECT_EQ("Allwinner A64", |
| 597 | parse_proc_cpuinfo_hardware("sun50iw1", 4)); |
| 598 | EXPECT_EQ("Allwinner A64", |
| 599 | parse_proc_cpuinfo_hardware("sun50iw1p1", 4)); |
| 600 | EXPECT_EQ("Allwinner A64", |
| 601 | parse_proc_cpuinfo_hardware("sun50iw2", 4)); |
| 602 | EXPECT_EQ("Allwinner A80", |
| 603 | parse_proc_cpuinfo_hardware("sun9i", 8)); |
| 604 | EXPECT_EQ("Allwinner A83T", |
| 605 | parse_proc_cpuinfo_hardware("sun8i", 8)); |
| 606 | } |
| 607 | |
| 608 | TEST(PROC_CPUINFO_HARDWARE, amlogic) { |
| 609 | EXPECT_EQ("Amlogic S805", |
| 610 | parse_proc_cpuinfo_hardware("Amlogic Meson8B")); |
| 611 | EXPECT_EQ("Amlogic S812", |
| 612 | parse_proc_cpuinfo_hardware("Amlogic Meson8")); |
| 613 | } |
| 614 | |
| 615 | TEST(PROC_CPUINFO_HARDWARE, lg) { |
| 616 | EXPECT_EQ("LG Nuclun 7111", |
| 617 | parse_proc_cpuinfo_hardware("Odin")); |
| 618 | } |
| 619 | |
| 620 | TEST(PROC_CPUINFO_HARDWARE, marvell_pxa) { |
| 621 | EXPECT_EQ("Marvell PXA1088", |
| 622 | parse_proc_cpuinfo_hardware("PXA1088")); |
| 623 | EXPECT_EQ("Marvell PXA1088", |
| 624 | parse_proc_cpuinfo_hardware("PXA1L88")); |
| 625 | EXPECT_EQ("Marvell PXA1908", |
| 626 | parse_proc_cpuinfo_hardware("PXA1908")); |
| 627 | EXPECT_EQ("Marvell PXA1928", |
| 628 | parse_proc_cpuinfo_hardware("PXA1928")); |
| 629 | EXPECT_EQ("Marvell PXA988", |
| 630 | parse_proc_cpuinfo_hardware("PXA988")); |
| 631 | } |
| 632 | |
| 633 | TEST(PROC_CPUINFO_HARDWARE, mstar) { |
| 634 | EXPECT_EQ("MStar 6A338", |
| 635 | parse_proc_cpuinfo_hardware("Madison")); |
| 636 | } |
| 637 | |
| 638 | TEST(PROC_CPUINFO_HARDWARE, nvidia) { |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 639 | EXPECT_EQ("Nvidia Tegra AP20H", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 640 | parse_proc_cpuinfo_hardware_tegra("picasso")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 641 | EXPECT_EQ("Nvidia Tegra AP20H", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 642 | parse_proc_cpuinfo_hardware_tegra("picasso_e")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 643 | EXPECT_EQ("Nvidia Tegra AP20H", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 644 | parse_proc_cpuinfo_hardware_tegra("stingray")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 645 | EXPECT_EQ("Nvidia Tegra AP33", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 646 | parse_proc_cpuinfo_hardware_tegra("endeavoru")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 647 | EXPECT_EQ("Nvidia Tegra AP33", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 648 | parse_proc_cpuinfo_hardware_tegra("x3")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 649 | EXPECT_EQ("Nvidia Tegra SL460N", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 650 | parse_proc_cpuinfo_hardware_tegra("Ceres")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 651 | EXPECT_EQ("Nvidia Tegra T114", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 652 | parse_proc_cpuinfo_hardware_tegra("macallan")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 653 | EXPECT_EQ("Nvidia Tegra T114", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 654 | parse_proc_cpuinfo_hardware_tegra("mozart")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 655 | EXPECT_EQ("Nvidia Tegra T114", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 656 | parse_proc_cpuinfo_hardware_tegra("tostab12BA")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 657 | EXPECT_EQ("Nvidia Tegra T124", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 658 | parse_proc_cpuinfo_hardware_tegra("mocha")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 659 | EXPECT_EQ("Nvidia Tegra T124", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 660 | parse_proc_cpuinfo_hardware_tegra("tn8")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 661 | EXPECT_EQ("Nvidia Tegra T20", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 662 | parse_proc_cpuinfo_hardware_tegra("nbx03")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 663 | EXPECT_EQ("Nvidia Tegra T20", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 664 | parse_proc_cpuinfo_hardware_tegra("p3")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 665 | EXPECT_EQ("Nvidia Tegra T20", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 666 | parse_proc_cpuinfo_hardware_tegra("ventana")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 667 | EXPECT_EQ("Nvidia Tegra T30", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 668 | parse_proc_cpuinfo_hardware_tegra("cardhu")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 669 | EXPECT_EQ("Nvidia Tegra T30", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 670 | parse_proc_cpuinfo_hardware_tegra("chagall")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 671 | EXPECT_EQ("Nvidia Tegra T30", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 672 | parse_proc_cpuinfo_hardware_tegra("picasso_m")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 673 | EXPECT_EQ("Nvidia Tegra T30", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 674 | parse_proc_cpuinfo_hardware_tegra("picasso_mf")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 675 | EXPECT_EQ("Nvidia Tegra T30L", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 676 | parse_proc_cpuinfo_hardware_tegra("BIRCH")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 677 | EXPECT_EQ("Nvidia Tegra T30L", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 678 | parse_proc_cpuinfo_hardware_tegra("NS_14T004")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 679 | EXPECT_EQ("Nvidia Tegra T30L", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 680 | parse_proc_cpuinfo_hardware_tegra("avalon")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 681 | EXPECT_EQ("Nvidia Tegra T30L", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 682 | parse_proc_cpuinfo_hardware_tegra("picasso_e2")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 683 | EXPECT_EQ("Nvidia Tegra T30L", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 684 | parse_proc_cpuinfo_hardware_tegra("tostab12BL")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 685 | EXPECT_EQ("Nvidia Tegra T30L", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 686 | parse_proc_cpuinfo_hardware_tegra("txs03")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 687 | EXPECT_EQ("Nvidia Tegra T33", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 688 | parse_proc_cpuinfo_hardware_tegra("bobsleigh")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 689 | EXPECT_EQ("Nvidia Tegra T33", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 690 | parse_proc_cpuinfo_hardware_tegra("enrc2b")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 691 | EXPECT_EQ("Nvidia Tegra T33", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 692 | parse_proc_cpuinfo_hardware_tegra("evitareul")); |
Marat Dukhan | 93982f2 | 2017-10-20 13:10:23 -0700 | [diff] [blame] | 693 | EXPECT_EQ("Nvidia Tegra T33", |
Marat Dukhan | 006461a | 2017-08-24 16:10:46 -0700 | [diff] [blame] | 694 | parse_proc_cpuinfo_hardware_tegra("tegra_fjdev103")); |
| 695 | } |
| 696 | |
| 697 | TEST(PROC_CPUINFO_HARDWARE, rockchip_rk) { |
| 698 | EXPECT_EQ("Rockchip RK3126", |
| 699 | parse_proc_cpuinfo_hardware("Rockchip RK3126")); |
| 700 | EXPECT_EQ("Rockchip RK3128", |
| 701 | parse_proc_cpuinfo_hardware("Rockchip RK3128")); |
| 702 | EXPECT_EQ("Rockchip RK3188", |
| 703 | parse_proc_cpuinfo_hardware("Rockchip RK3188")); |
| 704 | EXPECT_EQ("Rockchip RK3228H", |
| 705 | parse_proc_cpuinfo_hardware("rockchip,rk3228h")); |
| 706 | EXPECT_EQ("Rockchip RK3229", |
| 707 | parse_proc_cpuinfo_hardware("Rockchip RK3229")); |
| 708 | EXPECT_EQ("Rockchip RK3328", |
| 709 | parse_proc_cpuinfo_hardware("rockchip,rk3328")); |
| 710 | EXPECT_EQ("Rockchip RK3368", |
| 711 | parse_proc_cpuinfo_hardware("rockchip,rk3368")); |
| 712 | } |
| 713 | |
| 714 | TEST(PROC_CPUINFO_HARDWARE, spreadtrum_sc) { |
| 715 | EXPECT_EQ("Spreadtrum SC5735", |
| 716 | parse_proc_cpuinfo_hardware("sc5735")); |
| 717 | EXPECT_EQ("Spreadtrum SC6820I", |
| 718 | parse_proc_cpuinfo_hardware("sc6820i")); |
| 719 | EXPECT_EQ("Spreadtrum SC7715", |
| 720 | parse_proc_cpuinfo_hardware("scx15")); |
| 721 | EXPECT_EQ("Spreadtrum SC7730", |
| 722 | parse_proc_cpuinfo_hardware("sc7730")); |
| 723 | EXPECT_EQ("Spreadtrum SC7731", |
| 724 | parse_proc_cpuinfo_hardware("sc7731")); |
| 725 | EXPECT_EQ("Spreadtrum SC7731C", |
| 726 | parse_proc_cpuinfo_hardware("sc7731c")); |
| 727 | EXPECT_EQ("Spreadtrum SC7731G", |
| 728 | parse_proc_cpuinfo_hardware("sc7731g")); |
| 729 | EXPECT_EQ("Spreadtrum SC8825", |
| 730 | parse_proc_cpuinfo_hardware("sc8825")); |
| 731 | EXPECT_EQ("Spreadtrum SC8830", |
| 732 | parse_proc_cpuinfo_hardware("sc8830")); |
| 733 | EXPECT_EQ("Spreadtrum SC9830", |
| 734 | parse_proc_cpuinfo_hardware("sc9830")); |
| 735 | EXPECT_EQ("Spreadtrum SC9832", |
| 736 | parse_proc_cpuinfo_hardware("sc9832")); |
| 737 | EXPECT_EQ("Spreadtrum SC9832A", |
| 738 | parse_proc_cpuinfo_hardware("sc9832a")); |
| 739 | } |
| 740 | |
| 741 | TEST(PROC_CPUINFO_HARDWARE, telechips) { |
| 742 | EXPECT_EQ("Telechips TCC892X", |
| 743 | parse_proc_cpuinfo_hardware("tcc892x")); |
| 744 | EXPECT_EQ("Telechips TCC893X", |
| 745 | parse_proc_cpuinfo_hardware("tcc893x")); |
| 746 | } |
| 747 | |
| 748 | TEST(PROC_CPUINFO_HARDWARE, texas_instruments_omap) { |
| 749 | EXPECT_EQ("Texas Instruments OMAP4430", |
| 750 | parse_proc_cpuinfo_hardware("OMAP4430")); |
| 751 | EXPECT_EQ("Texas Instruments OMAP4460", |
| 752 | parse_proc_cpuinfo_hardware("OMAP4460")); |
| 753 | } |
| 754 | |
| 755 | TEST(PROC_CPUINFO_HARDWARE, texas_instruments_special) { |
| 756 | EXPECT_EQ("Texas Instruments OMAP4430", |
| 757 | parse_proc_cpuinfo_hardware("mapphone_CDMA")); |
| 758 | EXPECT_EQ("Texas Instruments OMAP4460", |
| 759 | parse_proc_cpuinfo_hardware("Tuna")); |
| 760 | } |
| 761 | |
| 762 | TEST(PROC_CPUINFO_HARDWARE, wondermedia) { |
| 763 | EXPECT_EQ("WonderMedia WM8850", |
| 764 | parse_proc_cpuinfo_hardware("WMT", 1, 1200000)); |
| 765 | EXPECT_EQ("WonderMedia WM8880", |
| 766 | parse_proc_cpuinfo_hardware("WMT", 2, 1500000)); |
| 767 | EXPECT_EQ("WonderMedia WM8950", |
| 768 | parse_proc_cpuinfo_hardware("WMT", 1, 1008000)); |
| 769 | } |