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gICAgICBZMS0xMCAgICAwICBZMS05IFkxLTggWTEtNyBZMS02ICBGLTEgIEYtMAorCSAqIEw6ICAgICAgICAgTGVmdCBidXR0b24KKwkgKiBSIC8gTTogICAgIE5vbi1jbGlja3BhZHM6IFJpZ2h0IC8gTWlkZGxlIGJ1dHRvbgorCSAqICAgICAgICAgICAgQ2xpY2twYWRzOiBXaGVuID4gMiBmaW5nZXJzIGFyZSBkb3duLCBhbmQgc29tZSBmaW5nZXJzCisJICogICAgICAgICAgICBhcmUgaW4gdGhlIGJ1dHRvbiBhcmVhLCB0aGVuIHRoZSAyIGNvb3JkaW5hdGVzIHJlcG9ydGVkCisJICogICAgICAgICAgICBhcmUgZm9yIGZpbmdlcnMgb3V0c2lkZSB0aGUgYnV0dG9uIGFyZWEgYW5kIHRoZXNlIHJlcG9ydAorCSAqICAgICAgICAgICAgZXh0cmEgZmluZ2VycyBiZWluZyBwcmVzZW50IGluIHRoZSByaWdodCAvIGxlZnQgYnV0dG9uCisJICogICAgICAgICAgICBhcmVhLiBOb3RlIHRoZXNlIGZpbmdlcnMgYXJlIG5vdCBhZGRlZCB0byB0aGUgRiBmaWVsZCEKKwkgKiAgICAgICAgICAgIHNvIGlmIGEgVFdPIHBhY2tldCBpcyByZWNlaXZlZCBhbmQgUiA9IDEgdGhlbiB0aGVyZSBhcmUKKwkgKiAgICAgICAgICAgIDMgZmluZ2VycyBkb3duLCBldGMuCisJICogVFdPOiAgICAgICAxOiBUd28gdG91Y2hlcyBwcmVzZW50LCBieXRlIDAvNC81IGFyZSBpbiBUV08gZm10CisJICogICAgICAgICAgICAwOiBJZiBieXRlIDQgYml0IDAgaXMgMSwgdGhlbiBieXRlIDAvNC81IGFyZSBpbiBNVUxUSSBmbXQKKwkgKiAgICAgICAgICAgICAgIG90aGVyd2lzZSBieXRlIDAgYml0IDQgbXVzdCBiZSBzZXQgYW5kIGJ5dGUgMC80LzUgYXJlCisJICogICAgICAgICAgICAgICBpbiBORVcgZm10CisJICogRjogICA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9wY2lfcHJvYmUoc3RydWN0IHBjaV9kZXYgKnBkZXYsCisJCQkJICAgY29uc3Qgc3RydWN0IHBjaV9kZXZpY2VfaWQgKnVudXNlZCkKK3sKKwlzdHJ1Y3QgcHJvY190aGVybWFsX2RldmljZSAqcHJvY19wcml2OworCWludCByZXQ7CisKKwlpZiAocHJvY190aGVybWFsX2VtdW1fbW9kZSA9PSBQUk9DX1RIRVJNQUxfUExBVEZPUk1fREVWKSB7CisJCWRldl9lcnIoJnBkZXYtPmRldiwgImVycm9yOiBlbnVtZXJhdGVkIGFzIHBsYXRmb3JtIGRldlxuIik7CisJCXJldHVybiAtRU5PREVWOworCX0KKworCXJldCA9IHBjaV9lbmFibGVfZGV2aWNlKHBkZXYpOworCWlmIChyZXQgPCAwKSB7CisJCWRldl9lcnIoJnBkZXYtPmRldiwgImVycm9yOiBjb3VsZCBub3QgZW5hYmxlIGRldmljZVxuIik7CisJCXJldHVybiByZXQ7CisJfQorCisJcmV0ID0gcHJvY190aGVybWFsX2FkZCgmcGRldi0+ZGV2LCAmcHJvY19wcml2KTsKKwlpZiAocmV0KSB7CisJCXBjaV9kaXNhYmxlX2RldmljZShwZGV2KTsKKwkJcmV0dXJuIHJldDsKKwl9CisKKwlwY2lfc2V0X2RydmRhdGEocGRldiwgcHJvY19wcml2KTsKKwlwcm9jX3RoZXJtYWxfZW11bV9tb2RlID0gUFJPQ19USEVSTUFMX1BDSTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgdm9pZCAgcHJvY190aGVybWFsX3BjaV9yZW1vdmUoc3RydWN0IHBjaV9kZXYgKnBkZXYpCit7CisJcHJvY190aGVybWFsX3JlbW92ZShwY2lfZ2V0X2RydmRhdGEocGRldikpOworCXBjaV9kaXNhYmxlX2RldmljZShwZGV2KTsKK30KKworc3RhdGljIGNvbnN0IHN0cnVjdCBwY2lfZGV2aWNlX2lkIHByb2NfdGhlcm1hbF9wY2lfaWRzW10gPSB7CisJeyBQQ0lfREVWSUNFKFBDSV9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AgICAgJChhZGRwcmVmaXggJChvYmopLywgJChmaWx0ZXItb3V0IC8lLCAkKF9fY2xlYW4tZmlsZXMpKSkgXAotCQkgICAkKGZpbHRlciAvJSwgJChfX2NsZWFuLWZpbGVzKSkpCisJCSAgICQoYWRkcHJlZml4ICQob2JqKS8sICQoZmlsdGVyLW91dCAkKG9ianRyZWUpLyUsICQoX19jbGVhbi1maWxlcykpKSBcCisJCSAgICQoZmlsdGVyICQob2JqdHJlZSkvJSwgJChfX2NsZWFuLWZpbGVzKSkpCiAKLSMgYXMgY2xlYW4tZGlycyBpcyBnaXZlbiByZWxhdGl2ZSB0byB0aGUgY3VycmVudCBkaXJlY3RvcnksIHRoaXMgYWRkcwotIyBhICQob2JqKSBwcmVmaXgsIGV4Y2VwdCBmb3IgYWJzb2x1dGUgcGF0aHMKKyMgc2FtZSBhcyBjbGVhbi1maWxlcwogCiBfX2NsZWFuLWRpcnMgICAgOj0gJCh3aWxkY2FyZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICQoYWRkcHJlZml4ICQob2JqKS8sICQoZmlsdGVyLW91dCAvJSwgJChjbGVhbi1kaXJzKSkpICAgIFwKLQkJICAgJChmaWx0ZXIgLyUsICQoY2xlYW4tZGlycykpKQorCQkgICAkKGFkZHByZWZpeCAkKG9iaikvLCAkKGZpbHRlci1vdXQgJChvYmp0cmVlKS8lLCAkKGNsZWFuLWRpcnMpKSkgICAgXAorCQkgICAkKGZpbHRlciAkKG9ianRyZWUpLyUsICQoY2xlYW4tZGlycykpKQogCiAjID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAKZGlmZiAtLWdpdCBhL3NjcmlwdHMvcmVjb3JkbWNvdW50LnBsIGIvc2NyaXB0cy9yZWNvcmRtY291bnQucGwKaW5kZXggNTZlYTk5YS4uNTM3YzM4YyAxMDA3NT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gICAxMC4wMCUgICAgIHBlcmYgIHBlcmYgICAgICAgICAgIFsuXSBjbWRfcmVjb3JkCiAJICogICAyMC4wMCUgICAgIDAuMDAlICAgICBiYXNoICBsaWJjICAgICAgICAgICBbLl0gbWFsbG9jCiAJICogICAxMC4wMCUgICAgMTAuMDAlICAgICBiYXNoICBba2VybmVsXSAgICAgICBba10gcGFnZV9mYXVsdAotCSAqICAgMTAuMDAlICAgIDEwLjAwJSAgICAgcGVyZiAgW2tlcm5lbF0gICAgICAgW2tdIHNjaGVkdWxlCi0JICogICAxMC4wMCUgICAgIDAuMDAlICAgICBwZXJmICBba2VybmVsXSAgICAgICBba10gc3lzX3BlcmZfZXZlbnRfb3BlbgotCSAqICAgMTAuMDAlICAgIDEwLjAwJSAgICAgcGVyZiAgW2tlcm5lbF0gICAgICAgW2tdIHBhZ2VfZmF1bHQKLQkgKiAgIDEwLjAwJSAgICAxMC4wMCUgICAgIHBlcmYgIGxpYmMgICAgICAgICAgIFsuXSBmcmVlCi0JICogICAxMC4wMCUgICAgMTAuMDAlICAgICBwZXJmICBsaWJjICAgICAgICAgICBbLl0gbWFsbG9jCiAJICogICAxMC4wMCUgICAgMTAuMDAlICAgICBiYXNoICBiYXNoICAgICAgICAgICBbLl0geG1hbGxvYworCSAqICAgMTAuMDAlICAgIDEwLjAwJSAgICAgcGVyZiAgW2tlcm5lbF0gICAgICAgW2tdIHBhZ2VfZmF1bHQKKwkgKiAgIDEwLjAwJSAgICAxMC4wMCUgICAgIHBlcmYgIGxpYmMgICAgICAgICAgIFsuXSBtYWxsb2MKKwkgKiAgIDEwLjAwJSAgICAxMC4wMCUgICAgIHBlcmYgIFtrZXJuZWxdICAgICAgIFtrXSBzY2hlZHVsZQorCSAqICAgMTAuMDAlICAgIDEwLjAwJSAgICAgcGVyZiAgbGliYyAgICAgICAgICAgWy5dIGZyZWUKKwkgKiAgIDEwLjAwJSAgICAgMC4wMCUgICAgIHBlcmYgIFtrZXJuZWxdICAgICAgIFtrXSB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AogCSAqICAgICAgICAgICAgICAgICAgbWFsbG9jCiAJICogICAgICAgICAgICAgICAgICBtYWluCiAJICoKLQkgKiAgIDEwLjAwJSAgICAxMC4wMCUgICAgIHBlcmYgIFtrZXJuZWxdICAgICAgIFtrXSBzY2hlZHVsZQorCSAqICAgMTAuMDAlICAgIDEwLjAwJSAgICAgYmFzaCAgYmFzaCAgICAgICAgICAgWy5dIHhtYWxsb2MKIAkgKiAgICAgICAgICAgICAgfAotCSAqICAgICAgICAgICAgICAtLS0gc2NoZWR1bGUKLQkgKiAgICAgICAgICAgICAgICAgIHJ1bl9jb21tYW5kCisJICogICAgICAgICAgICAgIC0tLSB4bWFsbG9jCisJICogICAgICAgICAgICAgICAgICBtYWxsb2MKKwkgKiAgICAgICAgICAgICAgICAgIHhtYWxsb2MgICAgIDwtLS0gTk9URTogdGhlcmUncyBhIGN5Y2xlCisJICogICAgICAgICAgICAgICAgICBtYWxsb2MKKwkgKiAgICAgICAgICAgICAgICAgIHhtYWxsb2MKIAkgKiAgICAgICAgICAgICAgICAgIG1haW4KIAkgKgogCSAqICAgMTAuMDAlICAgICAwLjAwJSAgICAgcGVyZiAgW2tlcm5lbF0gICAgICAgW2tdIHN5c19wZXJmX2V2ZW50X29wZW4KQEAgLTU1Niw2ICs1NTksMTIgQEAKIAkgKiAgICAgICAgICAgICAgICAgIHJ1bl9jb21tYW5kCiAJICogICAgICAgICAgICAgICAgICBtYWluCiAJICoKKwkgKiAgIDEwLjAwJSAgICAxMC4wMCUgICAgIHBlcmYgIFtrZXJuZWxdICAgICAgIFtrXSBzY2hlZHVsZQorCSAqICAgICAgICAgICAgICB8CisJICogICAgICAgICAgICAgIC0tLSBzY2hlZHVsZQorCSAqICAgICAgICAgICAgICAgICAgcnVuX2NvbW1hbmQKKwkgKiAgICAgICAgICAgICAgICAgIG1haW4KKwkgKgogCSAqICAgMTAuMDAlICAgIDEwLjAwJSAgICAgcGVyZiAgbGliYyAgICAgICAgICAgWy5dIGZyZWUKIAkgKiAgICAgICAgICAgICAgfAogCSAqICAgICAgICAgICAgICAtLS0gZnJlZQpAQCAtNTcwLDE1ICs1NzksNiBAQAogCSAqICAgICAgICAgICAgICAgICAgcnVuX2NvbW1hbmQKIAkgKiAgICAgICAgICAgICAgICAgIG1haW4KIAkgKgotCSAqICAgMTAuMDAlICAgIDEwLjAwJSAgICAgYmFzaCAgYmFzaCAgICAgICAgICAgWy5dIHhtYWxsb2MKLQkgKiAgICAgICAgICAgICAgfAotCSAqICAgICAgICAgICAgICAtLS0geG1hbGxvYwotCSAqICAgICAgICAgICAgICAgICAgbWFsbG9jCi0JICogICAgICAgICAgICAgICAgICB4bWFsbG9jICAgICA8LS0tIE5PVEU6IHRoZXJlJ3MgYSBjeWNsZQotCSAqICAgICAgICAgICAgICAgICAgbWFsbG9jCi0JICogICAgICAgICAgICAgICAgICB4bWFsbG9jCi0JICogICAgICAgICAgICAgICAgICBtYWluCi0JICoKIAkgKi8KIAlzdHJ1Y3QgcmVzdWx0IGV4cGVjdGVkW10gPSB7CiAJCXsgNzAwMCwgMjAwMCwgInBlcmYiLCAicGVyZiIsICAgICAibWFpbiIgfSwKQEAgLTU4NywxMiArNTg3LDEyIEBACiAJCXsgMzAwMCwgMTAwMCwgInBlcmYiLCAicGVyZiIsICAgICAiY21kX3JlY29yZCIgfSwKIAkJeyAyMDAwLCAgICAwLCAiYmFzaCIsICJsaWJjIiwgICAgICJtYWxsb2MiIH0sCiAJCXsgMTAwMCwgMTAwMCwgImJhc2giLCAiW2tlcm5lbF0iLCAicGFnZV9mYXVsdCIgfSwKLQkJeyAxMDAwLCAxMDAwLCAicGVyZiIsICJba2VybmVsXSIsICJzY2hlZHVsZSIgfSwKKwkJeyAxMDAwLCAxMDAwLCAiYmFzaCIsICJiYXNoIiwgICAgICJ4bWFsbG9jIiB9LAogCQl7IDEwMDAsICAgIDAsICJwZXJmIiwgIltrZXJuZWxdIiwgInN5c19wZXJmX2V2ZW50X29wZW4iIH0sCiAJCXsgMTAw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