From owner-freebsd-arm@FreeBSD.ORG Fri Dec 25 17:48:38 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 321C81065670 for ; Fri, 25 Dec 2009 17:48:38 +0000 (UTC) (envelope-from yohanes@gmail.com) Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mx1.freebsd.org (Postfix) with ESMTP id E7DD68FC15 for ; Fri, 25 Dec 2009 17:48:37 +0000 (UTC) Received: by pwi15 with SMTP id 15so5920175pwi.3 for ; Fri, 25 Dec 2009 09:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=3stUmjiEnr0x/f3xZsapA+VSJAoo30cTeepX426ChQ4=; b=ThYlNKuJAsFWdaZuM86V2d5+jnSVCuR/D43IYwgrHd5l25VcBSxRuuT2OYclix9mYU UYV1NkLTK24Ym1Dl92I+N/jmCVP/SRmPq11qVdpbLwCQLIiJWJqlSMXmvntG20xzBALO VRrHp0OnA4u8czzG7qGrJjZRr12uVgBOVpj68= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=gcfGQQ4Yg68MCKN/XxIIZfpPQizwQn1vVySe5d7kezABXBmSiAV29aA5KqlJHLPV6u j01h2Zl9BiuxexNpMMXyHZjN/aG7N5vLv65gHRHnhUeg0AftC0F6XaIGxFe3AMg0QMXe WCoB/tsmuOdsOL6jFa1D0kAazqIxB10c2fQlk= MIME-Version: 1.0 Received: by 10.114.18.23 with SMTP id 23mr8647225war.171.1261763317144; Fri, 25 Dec 2009 09:48:37 -0800 (PST) In-Reply-To: <260bb65e0912110627o6b67b399vabaae57477b91023@mail.gmail.com> References: <260bb65e0912110627o6b67b399vabaae57477b91023@mail.gmail.com> From: Yohanes Nugroho Date: Sat, 26 Dec 2009 00:48:17 +0700 Message-ID: <260bb65e0912250948w6f714367w672a1ebf037fb7f7@mail.gmail.com> To: freebsd-arm@freebsd.org Content-Type: multipart/mixed; boundary=001636b2adb14f1efd047b912a10 Subject: Re: CNS11XX FreeBSD port completed X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2009 17:48:38 -0000 --001636b2adb14f1efd047b912a10 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, To make it easy for others to read the changes I have made, attached is the diff version against SVN head. There is one change that may be should not be commited. In vfs_mount.c, I added pause("WAIT", hz * 10); That line can be removed if the patch from this: http://lists.freebsd.org/pipermail/freebsd-current/2009-October/012361.html is applied --=20 Regards Yohanes http://yohan.es/ On Fri, Dec 11, 2009 at 9:27 PM, Yohanes Nugroho wrote: > Hi, > > Today I have "completed" the CNS11XX (Cavium Econa ARM formerly known > as StarSemi STR9104) FreeBSD ARM Port. By "complete" I mean I have > written all the drivers (usb, network, and flash). I haven't checked > the correctness of the implementation. The device is a network > attached storage, Emprex NSD-100, sent to me by Bruce Simpson. > > This is my first FreeBSD port, so I think there will be mistakes on my > code. So I am requesting anyone who have time to have a look at the > code, or if you have the same device, may be you can try it. You will > need to solder a serial port to the device to try it. > > From the usability point of view, the port is usable. I can put the > FreeBSD kernel to the flash, and boot it from there with the root > filesystem on a USB disk (the boot loader also supports booting from > tftp, and during the development I boot using tftp). The device can > enter multi user mode, and I can ssh/ftp to the device, and compile > some things on the device itself. > > The only problem left (at least what is visible from user space) is > the slow network speed (2 megabyte per second, while the linux version > is around 3.8 megabyte per second). Pyun YongHyeon have helped me a > lot with the network driver (I am currently asking him to have a final > look at the driver). I have tried following all of his suggestions to > make a better (more correct driver), and I suspect the problem is not > on the network driver itself. > > I am suspecting that the problem is in pmap. There has been several > pmap related problems lately (see > http://lists.freebsd.org/pipermail/freebsd-arm/2009-October/002030.html). > It is also possible that the pmap code is now fine, and I have made > errors when porting the NetBSD CPU code for FA526 to FreeBSD. > > If I compile my current code with the latest code from HEAD, and > activated WITNESS and DIAGNOSTIC i will get the error at err-1.txt, > and =C2=A0If I activated WITNESS, DIAGNOSTIC and INVARIANT i got this the > message in err-2.txt. With the same options I didn't get this error > several months ago . > > My code is available at > > http://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=3D//depot/projects/str9= 1xx/src/sys/arm/econa&HIDEDEL=3DNO > > plus additional code from to support FA526 CPU adapted from NetBSD: > > http://p4db.freebsd.org/fileLogView.cgi?FSPC=3D//depot/projects/str91xx/s= rc/sys/arm/arm/cpufunc_asm_fa526.S > http://p4db.freebsd.org/fileViewer.cgi?FSPC=3D//depot/projects/str91xx/sr= c/sys/arm/arm/cpufunc.c > > Instruction to compile, and write to flash using dd to cfi0 is available = at: > > http://tinyhack.com/2009/09/28/cnx11xxstr91xx-freebsd-progress/ > http://tinyhack.com/2009/12/11/cns11xx-freebsd-port-completed/ > > -- > Regards > Yohanes > http://yohan.es/ > --001636b2adb14f1efd047b912a10 Content-Type: text/x-patch; charset=US-ASCII; name="cns11xx.diff" Content-Disposition: attachment; filename="cns11xx.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g3n98p8t2 SW5kZXg6IHN5cy9hcm0vYXJtL2VsZl90cmFtcG9saW5lLmMKPT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Fy bS9hcm0vZWxmX3RyYW1wb2xpbmUuYwkocmV2aXNpb24gMjAwOTg4KQorKysgc3lzL2FybS9hcm0v ZWxmX3RyYW1wb2xpbmUuYwkod29ya2luZyBjb3B5KQpAQCAtNTcsNiArNTcsOCBAQAogI2RlZmlu ZSBjcHVfaWR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290 c3RyYXAoZnJlZW1lbXBvcywKKwkgICAgS0VSTlZJUlRBRERSICsgMyAqIG1lbXNpemUsCisJICAg ICZrZXJuZWxfbDFwdCk7CisKKwltc2didWZwID0gKHZvaWQqKW1zZ2J1ZnB2LnB2X3ZhOworCW1z Z2J1ZmluaXQobXNnYnVmcCwgTVNHQlVGX1NJWkUpOworCisJbXV0ZXhfaW5pdCgpOworCisJaSA9 IDA7CisjaWYgUEhZU0FERFIgIT0gS0VSTlBIWVNBRERSCisJcGh5c19hdmFpbFtpKytdID0gUEhZ U0FERFI7CisJcGh5c19hdmFpbFtpKytdID0gS0VSTlBIWVNBRERSOworI2VuZGlmCisJcGh5c19h dmFpbFtpKytdID0gdmlydHVhbF9hdmFpbCAtIEtFUk5WSVJUQUREUiArIEtFUk5QSFlTQUREUjsK KworCXBoeXNfYXZhaWxbaSsrXSA9IFBIWVNBRERSICsgbWVtc2l6ZTsKKwlwaHlzX2F2YWlsW2kr K10gPSAwOworCXBoeXNfYXZhaWxbaSsrXSA9IDA7CisJLyogRG8gYmFzaWMgdHVuaW5nLCBoeiBl dGMgKi8KKwlpbml0X3BhcmFtMSgpOworCWluaXRfcGFyYW0yKHBoeXNtZW0pOworCWtkYl9pbml0 KCk7CisKKwlyZXR1cm4gKCh2b2lkICopKGtlcm5lbHN0YWNrLnB2X3ZhICsgVVNQQUNFX1NWQ19T VEFDS19UT1AgLQorCSAgICBzaXplb2Yoc3RydWN0IHBjYikpKTsKK30KSW5kZXg6IHN5cy9hcm0v ZWNvbmEvaWZfZWNlLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2FybS9lY29uYS9pZl9lY2UuYwkocmV2 aXNpb24gMCkKKysrIHN5cy9hcm0vZWNvbmEvaWZfZWNlLmMJKHJldmlzaW9uIDApCkBAIC0wLDAg KzEsMjA2MCBAQAorLyotCisgKiBDb3B5cmlnaHQgKGMpIDIw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DAwOyBpaSsrKSB7CisJCXN0YXR1cyA9IFJENChzYywgUEhZX0NPTlRST0wpOworCQlpZiAo c3RhdHVzICYgKDB4MSA8PCAxNSkpIHsKKwkJCS8qIGNsZWFyIHRoZSByd19vayBzdGF0dXMsIGFu ZCBjbGVhciBvdGhlciBiaXRzIHZhbHVlICovCisJCQlXUjQoc2MsIFBIWV9DT05UUk9MLCAoMHgx IDw8IDE1KSk7CisJCQl2YWwgPSAgKChzdGF0dXMgPj4gMTYpICYgMHhGRkZGKTsKKwkJCXJldHVy biB2YWw7CisJCX0KKwl9CisJcmV0dXJuIDA7Cit9CisKKworc3RhdGljIGlubGluZSB2b2lkCitw aHlfd3JpdGUoc3RydWN0IGVjZV9zb2Z0YyAqc2MsIGludCBwaHksIGludCByZWcsIGludCBkYXRh KQoreworCWludCBpaTsKKworCVdSNChzYywgUEhZX0NPTlRST0wsIDEgPDwgMTUpOworCVdSNChz YywgUEhZX0NPTlRST0wsCisJICAgICgocGh5ICYgMHgxKSB8ICAoKHJlZyAmIDB4MUYpIDw8IDgp IHwKKwkgICAgICgweDEgPDwgMTMpIHwgKChkYXRhICYgMHhGRkZGKSA8PCAxNikpKTsKKwlmb3Ig KGlpID0gMDsgaWkgPCAweDEwMDA7IGlpKyspIHsKKwkJaWYgKFJENChzYywgUEhZX0NPTlRST0wp ICYgKDB4MSA8PCAxNSkpIHsKKwkJCS8qIGNsZWFyIHRoZSByd19vayBzdGF0dXMsIGFuZCBjbGVh ciBvdGhlciBiaXRzIHZhbHVlICovCisJCQlXUjQoc2MsIFBIWV9DT05UUk9MLCAoMHgxIDw8IDE1 KSk7CisJCQlyZXR1cm47CisJCX0KKwl9Cit9CisKKworLypjdXJyZW50bHkgb25seSBpY19wbHVz IHBoeSBpcyBzdXBwb3J0ZWQqLworc3RhdGljIGludCBnZXRfcGh5X3R5cGUoc3RydWN0IGVjZV9z b2Z0YyAqc2MpCit7CisJdWludDE2X3QgcGh5MF9pZCA9IDAsIHBoeTFfaWQg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VCB8IElOVFJf TVBTQUZFLAorCQkJICAgICBOVUxMLCBlY2VfaW50cl9zdGF0dXMsIHNjLCAmc2MtPmludHJoYW5k X3N0YXR1cyk7CisJaWYgKGVycikgeworCQlldGhlcl9pZmRldGFjaChpZnApOworCQlFQ0VfTE9D S19ERVNUUk9ZKHNjKTsKKwkJZ290byBvdXQ7CisJfQorCisJZXJyID0gYnVzX3NldHVwX2ludHIo ZGV2LCBzYy0+aXJxX3Jlc19xZiwgSU5UUl9UWVBFX05FVCB8IElOVFJfTVBTQUZFLAorCSAgICBO VUxMLGVjZV9pbnRyX3FmLCAgc2MsICZzYy0+aW50cmhhbmRfcWYpOworCisJaWYgKGVycikgewor CQlldGhlcl9pZmRldGFjaChpZnApOworCQlFQ0VfTE9DS19ERVNUUk9ZKHNjKTsKKwkJZ290byBv dXQ7CisJfQorCisJZXJyID0gYnVzX3NldHVwX2ludHIoZGV2LCBzYy0+aXJxX3Jlc190eCwgSU5U Ul9UWVBFX05FVCB8IElOVFJfTVBTQUZFLAorCSAgICBOVUxMLGVjZV9pbnRyX3R4LCAgc2MsICZz Yy0+aW50cmhhbmRfdHgpOworCisJaWYgKGVycikgeworCQlldGhlcl9pZmRldGFjaChpZnApOwor CQlFQ0VfTE9DS19ERVNUUk9ZKHNjKTsKKwkJZ290byBvdXQ7CisJfQorCisKKwlFQ0VfVFhMT0NL X0lOSVQoc2MpOworCUVDRV9SWExPQ0tfSU5JVChzYyk7CisJRUNFX0NMRUFOVVBMT0NLX0lOSVQo c2MpOworCisJLyplbmFibGUgYWxsIGludGVycnVwdCBzb3VyY2VzKi8KKwlXUjQoc2MsIElOVEVS UlVQVF9NQVNLLCAweDAwMDAwMDAwKTsKKworCS8qZW5hYmxlIHBvcnQgMCovCisJV1I0KHNjLCBQ T1JUXzBfQ09ORklHLCBSRDQoc2MsIFBPUlRfMF9DT05GSUcpICYgfigoMHgxIDw8IDE4KSkpOwor CisJdGFza3F1ZXVlX3N0YXJ0X3RocmVhZHMoJn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gTlVMTDsKK30KKworLyoKKyAqIE1JSSBidXMgc3VwcG9ydCByb3V0aW5l cy4KKyAqLworc3RhdGljIGludAorZWNlX21paWJ1c19yZWFkcmVnKGRldmljZV90IGRldiwgaW50 IHBoeSwgaW50IHJlZykKK3sKKwlzdHJ1Y3QgZWNlX3NvZnRjICpzYzsKKwkvKm9ubHkgb25lIHBo eSovCisJaWYgKHBoeT4wKSByZXR1cm4gMDsKKwlzYyA9IGRldmljZV9nZXRfc29mdGMoZGV2KTsK KwlyZXR1cm4gcGh5X3JlYWQoc2MsIHBoeSwgcmVnKTsKK30KKworc3RhdGljIGludAorZWNlX21p aWJ1c193cml0ZXJlZyhkZXZpY2VfdCBkZXYsIGludCBwaHksIGludCByZWcsIGludCBkYXRhKQor eworCXN0cnVjdCBlY2Vfc29mdGMgKnNjOworCXNjID0gZGV2aWNlX2dldF9zb2Z0YyhkZXYpOwor CXBoeV93cml0ZShzYywgcGh5LCByZWcsIGRhdGEpOworCXJldHVybiAwOworfQorCitzdGF0aWMg ZGV2aWNlX21ldGhvZF90IGVjZV9tZXRob2RzW10gPSB7CisJLyogRGV2aWNlIGludGVyZmFjZSAq LworCURFVk1FVEhPRChkZXZpY2VfcHJvYmUsCQllY2VfcHJvYmUpLAorCURFVk1FVEhPRChkZXZp Y2VfYXR0YWNoLAllY2VfYXR0YWNoKSwKKwlERVZNRVRIT0QoZGV2aWNlX2RldGFjaCwJZWNlX2Rl dGFjaCksCisKKwkvKiBCdXMgaW50ZXJmYWNlICovCisJREVWTUVUSE9EKGJ1c19jaGlsZF9kZXRh Y2hlZCwJZWNlX2NoaWxkX2RldGFjaGVkKSwKKworCS8qIE1JSSBpbnRlcmZhY2UgKi8KKwlERVZN RVRIT0QobWlpYnVzX3JlYWRyZWcsCWVjZV9taWlidXNfcmVhZHJlZyksCisJREVWTUVUSE9EKG1p aWJ1c193cml0ZXJlZywJZWNlX21paWJ1c193cml0ZXJlZyksCisKKwl7IDAsIDAgfQorfTsKKwor c3Rh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Ao MSA8PCAyKSAgICAvKiBiaXQgbWFwIDogYml0IDIgKi8KKworCisjZGVmaW5lIFZMQU4wX0dST1VQ X0lEICAgICAgKDApCisjZGVmaW5lIFZMQU4xX0dST1VQX0lEICAgICAgKDEpCisjZGVmaW5lIFZM QU4yX0dST1VQX0lEICAgICAgKDIpCisjZGVmaW5lIFZMQU4zX0dST1VQX0lEICAgICAgKDMpCisj ZGVmaW5lIFZMQU40X0dST1VQX0lEICAgICAgKDQpCisjZGVmaW5lIFZMQU41X0dST1VQX0lEICAg ICAgKDUpCisjZGVmaW5lIFZMQU42X0dST1VQX0lEICAgICAgKDYpCisjZGVmaW5lIFZMQU43X0dS T1VQX0lEICAgICAgKDcpCisKKyNkZWZpbmUgUE9SVDBfUFZJRCAgICAgICAgICAoVkxBTjFfR1JP VVBfSUQpCisjZGVmaW5lIFBPUlQxX1BWSUQgICAgICAgICAgKFZMQU4yX0dST1VQX0lEKQorI2Rl ZmluZSBDUFVfUE9SVF9QVklEICAgICAgIChWTEFOMF9HUk9VUF9JRCkKKworI2RlZmluZSBWTEFO MF9WSUQgICAgICAgICAgICgweDExMSkKKyNkZWZpbmUgVkxBTjFfVklEICAgICAgICAgICAoMHgy MjIpCisjZGVmaW5lIFZMQU4yX1ZJRCAgICAgICAgICAgKDB4MzMzKQorI2RlZmluZSBWTEFOM19W SUQgICAgICAgICAgICgweDQ0NCkKKyNkZWZpbmUgVkxBTjRfVklEICAgICAgICAgICAoMHg1NTUp CisjZGVmaW5lIFZMQU41X1ZJRCAgICAgICAgICAgKDB4NjY2KQorI2RlZmluZSBWTEFONl9WSUQg ICAgICAgICAgICgweDc3NykKKyNkZWZpbmUgVkxBTjdfVklEICAgICAgICAgICAoMHg4ODgpCisK KyNkZWZpbmUgVkxBTjBfR1JPVVAgICAgICAgICAoUE9SVDAgfCBQT1JUMSB8IENQVV9QT1JUKQor I2RlZmluZSBWTEFOMV9HUk9VUCAgICAgICAgIChQT1JUMCB8IENQVV9QT1JUKQorI2RlZmluZSBW TEFOMl9HUk9VUCAgICAgICAgIChQT1JUMSB8IENQVV9QT1JUKQorI2RlZmluZSBWTEFOM19HUk9V UCAgICAgICAgICgwKQorI2RlZmluZSBWTEFONF9HUk9VUCAgICAgICAgICgwKQorI2RlZmluZSBW TEFONV9HUk9VUCAgICAgICAgICgwKQorI2RlZmluZSBWTEFONl9HUk9VUCAgICAgICAgICgwKQor I2RlZmluZSBWTEFON19HUk9VUCAgICAgICAgICgwKQorCisKKworI2RlZmluZSBWTEFOMF9WTEFO X1RBRyAgICAgICgwKQorI2RlZmluZSBWTEFOMV9WTEFOX1RBRyAgICAgICgwKQorI2RlZmluZSBW TEFOMl9WTEFOX1RBRyAgICAgICgwKQorI2RlZmluZSBWTEFOM19WTEFOX1RBRyAgICAgICgwKQor I2RlZmluZSBWTEFONF9WTEFOX1RBRyAgICAgICgwKQorI2RlZmluZSBWTEFONV9WTEFOX1RBRyAg ICAgICgwKQorI2RlZmluZSBWTEFONl9WTEFOX1RBRyAgICAgICgwKQorI2RlZmluZSBWTEFON19W TEFOX1RBRyAgICAgICgwKQorCisjZGVmaW5lIFNXSVRDSF9DT05GSUcgMHgwMDQKKyNkZWZpbmUg TUFDX1BPUlRfMF9DT05GSUcgMHgwMDgKKyNkZWZpbmUgTUFDX1BPUlRfMV9DT05GSUcgMHgwMEMK KyNkZWZpbmUgQ1BVX1BPUlRfQ09ORklHIDB4MDEwCisjZGVmaW5lIEJJU1RfUkVTVUxUX1RFU1Rf MCAweDA5NAorCisjZGVmaW5lIEZTX0RNQV9DT05UUk9MICAgICAgICAgICAgICAgIDB4MTA0Cisj ZGVmaW5lIFRTX0RNQV9DT05UUk9MICAgICAgICAgICAgICAgIDB4MTAwCisKKyNkZWZpbmUgSU5U RVJSVVBUX01BU0sgMHgwOEMKKyNkZWZpbmUgSU5URVJSVVBUX1NUQVRVUyAweDA4OAorCisjZGVm aW5lIFRTX0RFU0NSSVBUT1JfUE9JTlRFUiAgICAgMHgxMDgKKyNkZ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mluZSBUSUNLUzJVU0VDUyh4KSAg KCh4KSAqIHVTRUNTX1BFUl9USUNLKQorCisKK3N0YXRpYyB1bnNpZ25lZAorcmVhZF90aW1lcl9j b3VudGVyX25vaW50KHZvaWQpCit7CisJYXJtX21hc2tfaXJxKDApOworCXVuc2lnbmVkIGludCB2 ID0gUkQ0KFRJTUVSX1RNMV9DT1VOVEVSX1JFR19PRkZTRVQpOworCWFybV91bm1hc2tfaXJxKDAp OworCXJldHVybiB2OworfQorCit2b2lkCitERUxBWShpbnQgdXNlYykKK3sKKwl1aW50MzJfdCB2 YWwsIHZhbF90ZW1wOworCWludCBudGlja3M7CisKKwlpZiAoIXRpbWVyc19pbml0aWFsaXplZCkg eworCQlmb3IgKDsgdXNlYyA+IDA7IHVzZWMtLSkKKwkJCWZvciAodmFsID0gMTAwOyB2YWwgPiAw OyB2YWwtLSkKKwkJCQk7CisJCXJldHVybjsKKwl9CisKKwl2YWwgPSByZWFkX3RpbWVyX2NvdW50 ZXJfbm9pbnQoKTsKKwludGlja3MgPSAoKChBUEJfY2xvY2svMTAwMCkgKiB1c2VjKSAvIDEwMDAp KzEwMDsKKworCXdoaWxlIChudGlja3MgPiAwKSB7CisJCXZhbF90ZW1wID0gcmVhZF90aW1lcl9j b3VudGVyX25vaW50KCk7CisJCWlmICh2YWwgPiB2YWxfdGVtcCkKKwkJCW50aWNrcyAtPSAodmFs IC0gdmFsX3RlbXApOworCQllbHNlCisJCQludGlja3MgLT0gKHZhbCArICh0aW1lcl9jb3VudGVy IC0gdmFsX3RlbXApKTsKKworCisJCXZhbCA9IHZhbF90ZW1wOworCX0KKworfQorCisvKgorICog U2V0dXAgdGltZXIKKyAqLworc3RhdGljIGlubGluZSB2b2lkCitzZXR1cF90aW1lcih1bnNpZ25l ZCBpbnQgY291bnRlcl92YWx1ZSkKK3sKKwl1bnNpZ25lZCBpbnQgY29udHJvbF92YWx1ZTsKKwl1 bnNpZ25lZCBpbnQgbWFza192YWx1ZTsKKworCWNvbnR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19ic19m cmVlLAorCisJLyogYmFycmllciAqLworCWdlbmVyaWNfYnNfYmFycmllciwKKworCS8qIHJlYWQg KHNpbmdsZSkgKi8KKwlnZW5lcmljX2JzX3JfMSwKKwlnZW5lcmljX2FybXY0X2JzX3JfMiwKKwln ZW5lcmljX2JzX3JfNCwKKwlOVUxMLAorCisJLyogcmVhZCBtdWx0aXBsZSAqLworCWdlbmVyaWNf YnNfcm1fMSwKKwlnZW5lcmljX2FybXY0X2JzX3JtXzIsCisJZ2VuZXJpY19ic19ybV80LAorCU5V TEwsCisKKwkvKiByZWFkIHJlZ2lvbiAqLworCWdlbmVyaWNfYnNfcnJfMSwKKwlnZW5lcmljX2Fy bXY0X2JzX3JyXzIsCisJZ2VuZXJpY19ic19ycl80LAorCU5VTEwsCisKKwkvKiB3cml0ZSAoc2lu Z2xlKSAqLworCWdlbmVyaWNfYnNfd18xLAorCWdlbmVyaWNfYXJtdjRfYnNfd18yLAorCWdlbmVy aWNfYnNfd180LAorCU5VTEwsCisKKwkvKiB3cml0ZSBtdWx0aXBsZSAqLworCWdlbmVyaWNfYnNf d21fMSwKKwlnZW5lcmljX2FybXY0X2JzX3dtXzIsCisJZ2VuZXJpY19ic193bV80LAorCU5VTEws CisKKwkvKiB3cml0ZSByZWdpb24gKi8KKwlOVUxMLAorCU5VTEwsCisJTlVMTCwKKwlOVUxMLAor CisJLyogc2V0IG11bHRpcGxlICovCisJTlVMTCwKKwlOVUxMLAorCU5VTEwsCisJTlVMTCwKKwor CS8qIHNldCByZWdpb24gKi8KKwlOVUxMLAorCU5VTEwsCisJTlVMTCwKKwlOVUxMLAorCisJLyog Y29weSAqLworCU5VTEwsCisJTlVMTCwKKwlOVUxMLAorCU5VTEwsCisKKwkvKiByZWFkIChzaW5n bGUpIHN0cmVhbSAqLworCU5VTEwsCisJTlVMTCwKKwlOVUxMLAorCU5VTEwsCisKKwkvKiByZWFk IG11bHRpcGxlIHN0cmVhbSAqLworCU5VTEwsCisJZ2VuZXJpY19h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NChzYywgIElOVENfSU5URVJSVVBUX1RSSUdHRVJfTU9ERV9SRUdfT0ZGU0VULCAgdmFsKTsK KwkJfQorCX0gZWxzZSB7CisJCWlmICghKHZhbCAmICgxVUwgPDwgaXJxKSkpIHsKKwkJCXZhbCB8 PSAoMVVMIDw8IGlycSk7CisJCQlXUjQoc2MsIElOVENfSU5URVJSVVBUX1RSSUdHRVJfTU9ERV9S RUdfT0ZGU0VULCAgdmFsKTsKKwkJfQorCX0KK30KKworCisvKgorICogQ29uZmlndXJlIGludGVy cnVwdCB0cmlnZ2VyIGxldmVsIHRvIGJlIEFjdGl2ZSBIaWdoL0xvdworICogb3IgUmlzaW5nL0Zh bGxpbmcgRWRnZQorICovCitzdGF0aWMgaW5saW5lIHZvaWQgCitlY29uYV9zZXRfaXJxX2xldmVs KHN0cnVjdCBlY29uYV9zb2Z0YyAqIHNjLAorCQkgICAgdW5zaWduZWQgaW50IGlycSwgdW5zaWdu ZWQgaW50IGxldmVsKQoreworCXVuc2lnbmVkIGludCB2YWw7CisKKworCWlmICgobGV2ZWwgIT0g SU5UQ19BQ1RJVkVfSElHSCkgJiYKKwkgICAgKGxldmVsICE9IElOVENfQUNUSVZFX0xPVykgJiYK KwkgICAgKGxldmVsICE9IElOVENfUklTSU5HX0VER0UpICYmCisJICAgIChsZXZlbCAhPSBJTlRD X0ZBTExJTkdfRURHRSkpIHsKKwkJcmV0dXJuOworCX0KKworCXZhbCA9IFJENChzYywgSU5UQ19J TlRFUlJVUFRfVFJJR0dFUl9MRVZFTF9SRUdfT0ZGU0VUKTsKKworCWlmICgobGV2ZWwgPT0gSU5U Q19BQ1RJVkVfSElHSCkgfHwgKGxldmVsID09IElOVENfUklTSU5HX0VER0UpKSB7CisJCWlmICh2 YWwgJiAoMVVMIDw8IGlycSkpIHsKKwkJCXZhbCAmPSB+KDFVTCA8PCBpcnEpOworCQkJV1I0KHNj LCBJTlRDX0lOVEVSUlVQVF9UUklHR0VSX0xFVkVMX1JFR19PRkZTRV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dXJu ICgmKGl2YXItPnJlc291cmNlcykpOworfQorCitzdGF0aWMgaW50CitlY29uYV9yZWxlYXNlX3Jl c291cmNlKGRldmljZV90IGRldiwgZGV2aWNlX3QgY2hpbGQsIGludCB0eXBlLAorICAgIGludCBy aWQsIHN0cnVjdCByZXNvdXJjZSAqcikKK3sKKwlzdHJ1Y3QgcmVzb3VyY2VfbGlzdCAqcmw7CisJ c3RydWN0IHJlc291cmNlX2xpc3RfZW50cnkgKnJsZTsKKworCXJsID0gZWNvbmFfZ2V0X3Jlc291 cmNlX2xpc3QoZGV2LCBjaGlsZCk7CisJaWYgKHJsID09IE5VTEwpCisJCXJldHVybiAoRUlOVkFM KTsKKwlybGUgPSByZXNvdXJjZV9saXN0X2ZpbmQocmwsIHR5cGUsIHJpZCk7CisJaWYgKHJsZSA9 PSBOVUxMKQorCQlyZXR1cm4gKEVJTlZBTCk7CisJcm1hbl9yZWxlYXNlX3Jlc291cmNlKHIpOwor CXJsZS0+cmVzID0gTlVMTDsKKwlyZXR1cm4gKDApOworfQorCitzdGF0aWMgaW50CitlY29uYV9z ZXR1cF9pbnRyKGRldmljZV90IGRldiwgZGV2aWNlX3QgY2hpbGQsCisgICAgc3RydWN0IHJlc291 cmNlICppcmVzLCBpbnQgZmxhZ3MsIGRyaXZlcl9maWx0ZXJfdCAqZmlsdCwKKyAgICBkcml2ZXJf aW50cl90ICppbnRyLCB2b2lkICphcmcsIHZvaWQgKipjb29raWVwKQoreworCWlmIChybWFuX2dl dF9zdGFydChpcmVzKSA9PSBFQ09OQV9JUlFfU1lTVEVNICYmIGZpbHQgPT0gTlVMTCkKKwkJcGFu aWMoIkFsbCBzeXN0ZW0gaW50ZXJydXB0IElTUnMgbXVzdCBiZSBGSUxURVIiKTsKKworCUJVU19T RVRVUF9JTlRSKGRldmljZV9nZXRfcGFyZW50KGRldiksIGNoaWxkLCBpcmVzLCBmbGFncywgZmls dCwKKwkgICAgaW50ciwgYXJnLCBjb29raWVwKTsKKworCWFybV91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XMuYmRldikgeworCQlkZXZpY2VfcHJpbnRmKHNlbGYsICJDb3VsZCBu b3QgYWRkIFVTQiBkZXZpY2VcbiIpOworCQlnb3RvIGVycm9yOworCX0KKwlkZXZpY2Vfc2V0X2l2 YXJzKHNjLT5zY19idXMuYmRldiwgJnNjLT5zY19idXMpOworCWRldmljZV9zZXRfZGVzYyhzYy0+ c2NfYnVzLmJkZXYsIEVIQ0lfSENfREVWU1RSKTsKKworIAlzcHJpbnRmKHNjLT5zY192ZW5kb3Is ICJDYXZpdW0iKTsKKworCisJZXJyID0gYnVzX3NldHVwX2ludHIoc2VsZixzYy0+c2NfaXJxX3Jl cywgIElOVFJfVFlQRV9CSU8gfCBJTlRSX01QU0FGRSwKKwkgICAgTlVMTCwgKGRyaXZlcl9pbnRy X3QgKillaGNpX2ludGVycnVwdCwgc2MsICZzYy0+c2NfaW50cl9oZGwpOworCWlmIChlcnIpIHsK KwkJZGV2aWNlX3ByaW50ZihzZWxmLCAiQ291bGQgbm90IHNldHVwIGVycm9yIGlycSwgJWRcbiIs IGVycik7CisJCWloX2VyciA9IE5VTEw7CisJCWdvdG8gZXJyb3I7CisJfQorCisKKwllcnIgPSBl aGNpX2luaXQoc2MpOworCWlmICghZXJyKSB7CisJCWVyciA9IGRldmljZV9wcm9iZV9hbmRfYXR0 YWNoKHNjLT5zY19idXMuYmRldik7CisJfQorCWlmIChlcnIpIHsKKwkJZGV2aWNlX3ByaW50Zihz ZWxmLCAiVVNCIGluaXQgZmFpbGVkIGVycj0lZFxuIiwgZXJyKTsKKwkJZ290byBlcnJvcjsKKwl9 CisJcmV0dXJuICgwKTsKKworZXJyb3I6CisJZWhjaV9lYnVzX2RldGFjaChzZWxmKTsKKwlyZXR1 cm4gKEVOWElPKTsKK30KKworc3RhdGljIGludAorZWhjaV9lYnVzX2RldGFjaChkZXZpY2VfdCBz ZWxmKQoreworCWVoY2lfc29mdGNfdCAqc2MgPSBkZXZpY2VfZ2V0X3NvZnRjKHNlbGYpOworCW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ICAgICAxCisKKyNkZWZpbmUgSU5UQ19JTlRFUlJVUFRfU09VUkNFX1JFR19PRkZT RVQgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBJTlRDX0lOVEVSUlVQVF9NQVNLX1JFR19PRkZT RVQgICAgICAgICAgICAgICAweDA0CisjZGVmaW5lIElOVENfSU5URVJSVVBUX0NMRUFSX0VER0Vf VFJJR0dFUl9SRUdfT0ZGU0VUIDB4MDgKKyNkZWZpbmUgSU5UQ19JTlRFUlJVUFRfVFJJR0dFUl9N T0RFX1JFR19PRkZTRVQgICAgICAgMHgwQworI2RlZmluZSBJTlRDX0lOVEVSUlVQVF9UUklHR0VS X0xFVkVMX1JFR19PRkZTRVQgICAgICAweDEwCisjZGVmaW5lIElOVENfSU5URVJSVVBUX1NUQVRV U19SRUdfT0ZGU0VUICAgICAgICAgICAgIDB4MTQKKyNkZWZpbmUgSU5UQ19GSVFfTU9ERV9TRUxF Q1RfUkVHX09GRlNFVCAgICAgICAgICAgICAgMHgxOAorI2RlZmluZSBJTlRDX1NPRlRXQVJFX0lO VEVSUlVQVF9SRUdfT0ZGU0VUICAgICAgICAgICAweDFDCisKKworLyoKKyAqIGRlZmluZSByaXNp bmcvZmFsbGluZyBlZGdlIGZvciBlZGdlIHRyaWdnZXIgbW9kZQorICovCisjZGVmaW5lIElOVENf UklTSU5HX0VER0UgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UQ19GQUxMSU5HX0VE R0UgICAgICAgICAgICAgICAgICAgMQorCisKKyNkZWZpbmUgVElNRVJfVE0xX0NPVU5URVJfUkVH X09GRlNFVCAgICAweDAwCisjZGVmaW5lIFRJTUVSX1RNMV9MT0FEX1JFR19PRkZTRVQgICAgICAg MHgwNAorI2RlZmluZSBUSU1FUl9UTTFfTUFUQ0gxX1JFR19PRkZTRVQgICAgIDB4MDgKKyNkZWZp bmUgVElNRVJfVE0xX01BVENIMl9SRUdfT0ZGU0VUICAgICAweDBDCisKKyNkZWZpbmUgV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0tfU09VUkNFX0VYVF9DTEsgICAgICAgICAgMQorCisv KgorICogZGVmaW5lIGludGVycnVwdCB0cmlnZ2VyIG1vZGUKKyAqLworI2RlZmluZSBJTlRDX0xF VkVMX1RSSUdHRVIgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVENfRURHRV9UUklHR0VS ICAgICAgICAgICAgICAgICAgIDEKKworCisjZGVmaW5lIElOVENfVFJJR0dFUl9VTktOT1dOIC0x CisKKyNkZWZpbmUJVElNRVIxX09WRVJGTE9XX0lOVEVSUlVQVAkoMTw8MikKKyNkZWZpbmUJVElN RVIyX09WRVJGTE9XX0lOVEVSUlVQVAkoMTw8NSkKKyNkZWZpbmUJVElNRVJfSU5URVJSVVBUX1NU QVRVU19SRUcJCTB4MzQKKworCisjZGVmaW5lIFRJTUVSMV9FTkFCTEUgICAoMTw8MCkKKyNkZWZp bmUgVElNRVIxX0NMT0NLX1NPVVJDRSAgICAgICAoMTw8MSkKKyNkZWZpbmUgVElNRVIxX09WRVJG TE9XX0VOQUJMRSAgICAoMTw8MikKKworCisjZGVmaW5lIFRJTUVSMl9FTkFCTEUgICAgICAgICAg ICAgKDE8PDMpCisjZGVmaW5lIFRJTUVSMl9DTE9DS19TT1VSQ0UgICAgICAgKDE8PDQpCisjZGVm aW5lIFRJTUVSMl9PVkVSRkxPV19FTkFCTEUgICAgKDE8PDUpCisKKworI2RlZmluZSBUSU1FUl8x ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgRUNfVUFSVF9DTE9DSyAx NDc2OTIwMAorI2RlZmluZSBFQ19VQVJUX1JFR1NISUZUIDIKKworI2RlZmluZSBTWVNURU1fQ0xP Q0tfSU5GTyAoMHg3NzAwMDAxNCkKKyNkZWZpbmUgQ1BVX1JFU0VUX1JFR0lTVEVSICgweDc3MDAw MDE0KQorCisKKyNlbmRpZgpJbmRleDogc3lzL2FybS9lY29uYS9pZl9lY2V2YXIuaAo9PT09PT09 PT09PT09PT09PT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cDsK KworCS8qZG1hIHRhZyBmb3IgcmluZyovCisJYnVzX2RtYV90YWdfdAlkbWF0YWdfcmluZ190eDsK KwlidXNfZG1hX3RhZ190CWRtYXRhZ19yaW5nX3J4OworCisJLypkbWEgdGFnIGZvciBkYXRhKi8K KwlidXNfZG1hX3RhZ190CWRtYXRhZ19kYXRhX3R4OworCWJ1c19kbWFfdGFnX3QJZG1hdGFnX2Rh dGFfcng7CisKKwkvKnRoZSByaW5nKi8KKwlldGhfdHhfZGVzY190KglkZXNjX3R4OworCWV0aF9y eF9kZXNjX3QqCWRlc2Nfcng7CisKKwkvKnJpbmcgcGh5c2ljYWwgYWRkcmVzcyovCisJYnVzX2Fk ZHJfdAlyaW5nX3BhZGRyX3R4OworCWJ1c19hZGRyX3QJcmluZ19wYWRkcl9yeDsKKworCS8qaW5k ZXggb2YgbGFzdCByZWNlaXZlZCBkZXNjcml0b3IqLworCXVpbnQzMl90IGxhc3Rfcng7CisJc3Ry dWN0IHJ4X2Rlc2NfaW5mbyByeF9kZXNjW0VDRV9NQVhfUlhfQlVGRkVSU107CisKKworCS8qIHR4 IHByb2R1Y2VyIGluZGV4ICovCisJdWludDMyX3QgdHhfcHJvZDsKKwkvKiB0eCBjb25zdW1lciBp bmRleCAqLworCXVpbnQzMl90IHR4X2NvbnM7CisJLyogdHggcmluZyBpbmRleCovCisJdWludDMy X3QgZGVzY19jdXJyX3R4OworCisJc3RydWN0IHR4X2Rlc2NfaW5mbyB0eF9kZXNjW0VDRV9NQVhf VFhfQlVGRkVSU107CisKK307CisKKworc3RydWN0IGFybF90YWJsZV9lbnRyeV90IHsKKwl1aW50 MzJfdCBjbWRfY29tcGxldGU6IDE7CisJdWludDMyX3QgdGFibGVfZW5kOiAxOworCXVpbnQzMl90 IHNlYXJjaF9tYXRjaDogMTsKKwl1aW50MzJfdCBmaWx0ZXI6MTsgLyppZiBzZXQsIHBhY2tldCB3 aWxsIGJlIGRyb3BwZWQgKi8KKwl1aW50MzJfdCB2bGFu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9NUFNBRkUsCisJICAgIE5VTEwsIChkcml2ZXJfaW50cl90ICopb2hjaV9p bnRlcnJ1cHQsIHNjLCAmc2MtPnNjX29oY2kuc2NfaW50cl9oZGwpOworI2Vsc2UKKwllcnIgPSBi dXNfc2V0dXBfaW50cihkZXYsIHNjLT5zY19vaGNpLnNjX2lycV9yZXMsIElOVFJfVFlQRV9CSU8g fCBJTlRSX01QU0FGRSwKKwkgICAgKGRyaXZlcl9pbnRyX3QgKilvaGNpX2ludGVycnVwdCwgc2Ms ICZzYy0+c2Nfb2hjaS5zY19pbnRyX2hkbCk7CisjZW5kaWYKKwlpZiAoZXJyKSB7CisJCXNjLT5z Y19vaGNpLnNjX2ludHJfaGRsID0gTlVMTDsKKwkJZ290byBlcnJvcjsKKwl9CisKKwlidXNfc3Bh Y2Vfd3JpdGVfNChzYy0+c2Nfb2hjaS5zY19pb190YWcsIHNjLT5zY19vaGNpLnNjX2lvX2hkbCwK KwkgICAgT0hDSV9DT05UUk9MLCAwKTsKKworCWVyciA9IG9oY2lfaW5pdCgmc2MtPnNjX29oY2kp OworCWlmICghZXJyKSB7CisJCWVyciA9IGRldmljZV9wcm9iZV9hbmRfYXR0YWNoKHNjLT5zY19v aGNpLnNjX2J1cy5iZGV2KTsKKwl9CisJaWYgKGVycikgeworCQlnb3RvIGVycm9yOworCX0KKwly ZXR1cm4gKDApOworCitlcnJvcjoKKwlvaGNpX2VjX2RldGFjaChkZXYpOworCXJldHVybiAoRU5Y SU8pOworfQorCitzdGF0aWMgaW50CitvaGNpX2VjX2RldGFjaChkZXZpY2VfdCBkZXYpCit7CisJ c3RydWN0IGVjX29oY2lfc29mdGMgKnNjID0gZGV2aWNlX2dldF9zb2Z0YyhkZXYpOworCWRldmlj ZV90IGJkZXY7CisJaW50IGVycjsKKworCWlmIChzYy0+c2Nfb2hjaS5zY19idXMuYmRldikgewor CQliZGV2ID0gc2MtPnNjX29oY2kuc2NfYnVzLmJkZXY7CisJCWRldmljZV9kZXRhY2goYm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3lzL2FybS9lY29uYS9zdGQuZWNvbmEKPT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PQotLS0gc3lzL2FybS9lY29uYS9zdGQuZWNvbmEJKHJldmlzaW9uIDApCisrKyBzeXMvYXJtL2Vj b25hL3N0ZC5lY29uYQkocmV2aXNpb24gMCkKQEAgLTAsMCArMSwxNCBAQAorIyAkRnJlZUJTRCQK KworZmlsZXMJIi4uL2Vjb25hL2ZpbGVzLmVjb25hIgorY3B1CQlDUFVfRkE1MjYKK21ha2VvcHRp b25zCUNPTkZfQ0ZMQUdTPS1tYXJjaD1hcm12NAorb3B0aW9ucyAJUEhZU0FERFI9MHgwMDAwMDAw MAorbWFrZW9wdGlvbnMJS0VSTlBIWVNBRERSPTB4MDEwMDAwMDAKK21ha2VvcHRpb25zCUtFUk5W SVJUQUREUj0weGMxMDAwMDAwCisKK29wdGlvbnMgCUtFUk5QSFlTQUREUj0weDAxMDAwMDAwCitv cHRpb25zIAlLRVJOVklSVEFERFI9MHhjMTAwMDAwMAkJIyBVc2VkIGluIGxkc2NyaXB0LmFybQor b3B0aW9ucyAJRkxBU0hBRERSPTB4RDAwMDAwMDAKK29wdGlvbnMgCUxPQURFUlJBTUFERFI9MHgw MDAwMDAwMAorb3B0aW9ucyAJU1RBUlRVUF9QQUdFVEFCTEVfQUREUj0weDAwMTAwMDAwCkluZGV4 OiBzeXMvY29uZi9NYWtlZmlsZS5hcm0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2NvbmYvTWFrZWZpbGUu YXJtCShyZXZpc2lvbiAyMDA5ODgpCisrKyBzeXMvY29uZi9NYWtlZmlsZS5hcm0JKHdvcmtpbmcg Y29weSkKQEAgLTczLDcgKzczLDcgQEAKIAkkUy8kTS8kTS9jcHVmdW5jX2FzbV9zYTEuUyAkUy8k TS8kTS9j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