From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 00EAB941E93 for ; Fri, 10 Nov 2023 23:59:36 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=6XN4FMrNHytIdvbUDyOc53MKF3+Qp9KFjc0/EwOKiN8=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1699660775; v=1; b=PWr4ahNOUjmTKgQ9A11Q+iaQBWUqSTi/WwUP3U5DKHJXnIZtGtaa8tM55FBMIQIW0mF13sZ+ XOBiEuvhui4HfWeUDOeel/edF0eTo1fn+qxN9r9kFy81kp7Q9W3/sPFs1KoLgYMBuGioOPKuMQM dQOXGbballEMfLrbQwx5kxIo= X-Received: by 127.0.0.2 with SMTP id aJRPYY7687511xGURnkgew3G; Fri, 10 Nov 2023 15:59:35 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.42843.1699660774803137059 for ; Fri, 10 Nov 2023 15:59:35 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-479-oGHwhZYWO0-hvIgZlv8olw-1; Fri, 10 Nov 2023 18:59:30 -0500 X-MC-Unique: oGHwhZYWO0-hvIgZlv8olw-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7BC5C80B633; Fri, 10 Nov 2023 23:59:30 +0000 (UTC) X-Received: from lacos-laptop-9.usersys.redhat.com (unknown [10.39.192.173]) by smtp.corp.redhat.com (Postfix) with ESMTP id A0ED1C15983; Fri, 10 Nov 2023 23:59:29 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao Subject: [edk2-devel] [PATCH 22/37] OvmfPkg: remove CsmSupportLib Date: Sat, 11 Nov 2023 00:58:05 +0100 Message-Id: <20231110235820.644381-23-lersek@redhat.com> In-Reply-To: <20231110235820.644381-1-lersek@redhat.com> References: <20231110235820.644381-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 0E9DlYFyRjhHeKWELFZLT8H2x7686176AA= Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=PWr4ahNO; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Q3NtU3VwcG9ydExpYiBpcyBub3QgdXNlZCBieSBhbnkgcGxhdGZvcm0gYXQgdGhpcyBwb2ludCwg cmVtb3ZlIGl0LgoKVGhpcyBwYXRjaCByZW1vdmVzIG1lbnRpb25zIG9mIHRoZSBmb2xsb3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gICAgICAgICAgICAgICAqRnVuY3Rpb24N Ci0gICk7DQotDQotLyoqDQotICBSZWFkIHRoZSBnaXZlbiBQSVJRIHJlZ2lzdGVyDQotDQotICBA cGFyYW1baW5dICBUaGlzICAgICAgICBQcm90b2NvbCBpbnN0YW5jZSBwb2ludGVyDQotICBAcGFy YW1baW5dICBQaXJxTnVtYmVyICBUaGUgUGlycSByZWdpc3RlciAwID0gQSwgMSA9IEIgZXRjDQot ICBAcGFyYW1bb3V0XSBQaXJxRGF0YSAgICBWYWx1ZSByZWFkDQotDQotICBAcmV0dmFsIEVGSV9T VUNDRVNTICAgRGVjb2RpbmcgY2hhbmdlIGFmZmVjdGVkLg0KLSAgQHJldHZhbCBFRklfSU5WQUxJ RF9QQVJBTUVURVIgICBJbnZhbGlkIFBJUlEgbnVtYmVyDQotDQotKiovDQotRUZJX1NUQVRVUw0K LUVGSUFQSQ0KLVJlYWRQaXJxICgNCi0gIElOICBFRklfTEVHQUNZX0lOVEVSUlVQVF9QUk9UT0NP TCAgKlRoaXMsDQotICBJTiAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgIFBpcnFOdW1i ZXIsDQotICBPVVQgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICpQaXJxRGF0YQ0KLSAg KTsNCi0NCi0vKioNCi0gIFdyaXRlIHRoZSBnaXZlbiBQSVJRIHJlZ2lzdGVyDQotDQotICBAcGFy YW1baW5dICBUaGlzICAgICAgICBQcm90b2NvbCBpbnN0YW5jZSBwb2ludGVyDQotICBAcGFyYW1b aW5dICBQaXJxTnVtYmVyICBUaGUgUGlycSByZWdpc3RlciAwID0gQSwgMSA9IEIgZXRjDQotICBA cGFyYW1bb3V0XSBQaXJxRGF0YSAgICBWYWx1ZSB0byB3cml0ZQ0KLQ0KLSAgQHJldHZhbCBFRklf U1VDQ0VTUyAgIERlY29kaW5nIGNoYW5nZSBhZmZlY3RlZC4NCi0gIEByZXR2YWwgRUZJX0lOVkFM SURfUEFSQU1FVEV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JldHVybmVkDQotDQotKiovDQotRUZJX1NUQVRV Uw0KLUVGSUFQSQ0KLUdldE51bWJlclBpcnFzICgNCi0gIElOICBFRklfTEVHQUNZX0lOVEVSUlVQ VF9QUk9UT0NPTCAgKlRoaXMsDQotICBPVVQgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAg ICpOdW1iZXJQaXJxcw0KLSAgKQ0KLXsNCi0gICpOdW1iZXJQaXJxcyA9IE1BWF9QSVJRX05VTUJF UjsNCi0NCi0gIHJldHVybiBFRklfU1VDQ0VTUzsNCi19DQotDQotLyoqDQotICBSZXR1cm4gUENJ IGxvY2F0aW9uIG9mIHRoaXMgZGV2aWNlLg0KLSAgJFBJUiB0YWJsZSByZXF1aXJlcyB0aGlzIGlu Zm8uDQotDQotICBAcGFyYW1baW5dICAgVGhpcyAgICAgICAgICAgICAgICAtIFByb3RvY29sIGlu c3RhbmNlIHBvaW50ZXIuDQotICBAcGFyYW1bb3V0XSAgQnVzICAgICAgICAgICAgICAgICAtIFBD SSBCdXMNCi0gIEBwYXJhbVtvdXRdICBEZXZpY2UgICAgICAgICAgICAgIC0gUENJIERldmljZQ0K LSAgQHBhcmFtW291dF0gIEZ1bmN0aW9uICAgICAgICAgICAgLSBQQ0kgRnVuY3Rpb24NCi0NCi0g IEByZXR2YWwgIEVGSV9TVUNDRVNTICAgQnVzL0RldmljZS9GdW5jdGlvbiByZXR1cm5lZA0KLQ0K LSoqLw0KLUVGSV9TVEFUVVMNCi1FRklBUEkNCi1HZXRMb2NhdGlvbiAoDQotICBJTiAgRUZJX0xF R0FDWV9JTlRFUlJVUFRfUFJPVE9DT0wgICpUaGlzLA0KLSAgT1VUIFVJTlQ4ICAgICAgICAgICAg ICAgICAgICAgICAgICAqQnVzLA0KLSAgT1VUIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAg ICAqRGV2aWNlLA0KLSAgT1VUIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAqRnVuY3Rp b24NCi0gICk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BVSU5UOCAgIERldkZ1bg0KLSAgICAweDAwMDAsICAgICAgICAgICAgICAgICAg ICAgICAgICAvLyBVSU5UMTYgIFBjaU9ubHlJcnENCi0gICAgMHg4MDg2LCAgICAgICAgICAgICAg ICAgICAgICAgICAgLy8gVUlOVDE2ICBDb21wYXRpYmxlVmlkDQotICAgIDB4MTIyZSwgICAgICAg ICAgICAgICAgICAgICAgICAgIC8vIFVJTlQxNiAgQ29tcGF0aWJsZURpZA0KLSAgICAweDAwMDAw MDAwLCAgICAgICAgICAgICAgICAgICAgICAvLyBVSU5UMzIgIE1pbmlwb3J0DQotICAgIHsgICAg ICAgICAgICAgICAgIC8vIFVJTlQ4ICAgUmVzZXJ2ZWRbMTFdDQotICAgICAgMHgwMCwgMHgwMCwg MHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwNCi0gICAgICAweDAwLCAweDAwLCAw eDAwDQotICAgIH0sDQotICAgIDB4MDAsICAgICAgICAgICAgIC8vIFVJTlQ4ICAgQ2hlY2tzdW0N Ci0gIH0sDQotICB7DQotICAgIC8vICAgICAgICAgICAtLSBQaW4gMSAtLSAgIC0tIFBpbiAyIC0t ICAgLS0gUGluIDMgLS0gICAtLSBQaW4gNCAtLQ0KLSAgICAvLyBCdXMgIERldiAgIFJlZyAgIE1h cCAgICAgUmVnICAgTWFwICAgICBSZWcgICBNYXAgICAgIFJlZyAgIE1hcA0KLSAgICAvLw0KLSAg ICB7IDB4MDAsIDB4MDgsIHsNCi0gICAgICAgICAgICB7IDB4NjAsIDB4REVCOCB9LCB7IDB4NjEs IDB4REVCOCB9LCB7IDB4NjIsIDB4REVCOCB9LCB7IDB4NjMsIDB4REVCOCB9DQotICAgICAgICAg IH0sIDB4MDAsIDB4MDAgfSwNCi0gICAgeyAweDAwLCAweDEwLCB7DQotICAgICAgICAgICAgeyAw eDYxLCAweERFQjggfSwgeyAweDYyLCAweERFQjggfSwgeyAweDYzLCAweERFQjggfSwgeyAweDYw LCAweERFQjggfQ0KLSAgICAgICAgICB9LCAweDAxLCAweDAwIH0sDQotICAgIHsgMHgwMCwgMHgx OCwgew0KLSAgICAgICAgICAgIHsgMHg2MiwgMHhERUI4IH0sIHsgMHg2MywgMHhERUI4IH0sIHsg MHg2MCwgMHhERUI4IH0sIHsgMHg2MSwgMHhERUI4IH0NCi0gICAgICAgICAgfSwgMHgwMiwgMHgw MCB9LA0KLSAgICB7IDB4MDAsIDB4MjAsIHsNCi0gICAgICAgICAgICB7IDB4NjMsIDB4REVCOCB9 LCB7IDB4NjAsIDB4REVCOCB9LCB7IDB4NjEsIDB4REVCOCB9LCB7IDB4NjIsIDB4REVCOCB9DQot ICAgICAgICAgIH0sIDB4MDMsIDB4MDAgfSwNCi0gICAgeyAweDAwLCAweDI4LCB7DQotICAgICAg ICAgICAgeyAweDYwLCAweERFQjggfSwgeyAweDYxLCAweERFQjggfSwgeyAweDYyLCAweERFQjgg fSwgeyAweDYzLCAweERFQjggfQ0KLSAgICAgICAgICB9LCAweDA0LCAweDAwIH0sDQotICAgIHsg MHgwMCwgMHgzMCwgew0KLSAgICAgICAgICAgIHsgMHg2MSwgMHhERUI4IH0sIHsgMHg2MiwgMHhE RUI4IH0sIHsgMHg2MywgMHhERUI4IH0sIHsgMHg2MCwgMHhERUI4IH0NCi0gICAgICAgICAgfSwg MHgwNSwgMHgwMCB9LA0KLSAgfQ0KLX07DQotDQotTEVHQUNZX0JJT1NfUExBVEZPUk1fSU5TVEFO Q0UgIG1Qcml2YXRlRGF0YTsNCi1FRklfSEFORExFICAgICAgICAgICAgICAgICAgICAgbUltYWdl SGFuZGxlID0gTlVMTDsNCi0NCi0vKioNCi0gIFJldHVybiB0aGUgaGFuZGxlcyBhbmQgYXNzb3J0 ZWQgaW5mb3JtYXRpb24gZm9yIHRoZSBzcGVjaWZpZWQgUENJIENsYXNzIGNvZGUNCi0NCi0gIEBw YXJhbVtpbl0gICAgIFBjaUNsYXNzZXMgICAgQXJyYXkgb2YgUENJX0NMQVNTX1JFQ09SRCB0byBm aW5kIHRlcm1pbmF0ZWQgd2l0aCBDbGFzc0NvZGUgMHhmZg0KLSAgQHBhcmFtW2luLG91dF0gRGV2 aWNlVGFibGUgICBUYWJsZSB0byBwbGFjZSBoYW5kbGVzIGV0YyBpbi4NCi0gIEBwYXJhbVtpbixv dXRdIERldmljZUluZGV4ICAgTnVtYmVyIG9mIGRldmljZXMgZm91bmQNCi0gIEBwYXJhbVtpbl0g ICAgIERldmljZUZsYWdzICAgRkFMU0UgaWYgYSB2YWxpZCBsZWdhY3kgUk9NIGlzIHJlcXVpcmVk LCBUUlVFIG90aGVyd2lzZS4NCi0NCi0gIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgIE9uZSBvciBt b3JlIGRldmljZXMgZm91bmQNCi0gIEByZXR2YWwgRUZJX05PVF9GT1VORCAgIE5vIGRldmljZSBm b3VuZA0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1GaW5kQWxsRGV2aWNlVHlwZXMgKA0KLSAgSU4g ICAgICAgUENJX0NMQVNTX1JFQ09SRCAgKlBjaUNsYXNzZXMsDQotICBJTiBPVVQgICBERVZJQ0Vf U1RSVUNUVVJFICAqRGV2aWNlVGFibGUsDQotICBJTiBPVVQgICBVSU5UMTYgICAgICAgICAgICAq RGV2aWNlSW5kZXgsDQotICBJTiAgICAgICBCT09MRUFOICAgICAgICAgICBEZXZpY2VGbGFncw0K LSAgKQ0KLXsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgICAgSGFuZGxlQ291bnQ7DQotICBF RklfSEFORExFICAgICAgICAgICAgICAgICpIYW5kbGVCdWZmZXI7DQotICBVSU5UTiAgICAgICAg ICAgICAgICAgICAgIEluZGV4Ow0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICBTdGFydElu ZGV4Ow0KLSAgUENJX1RZUEUwMCAgICAgICAgICAgICAgICBQY2lDb25maWdIZWFkZXI7DQotICBF RklfUENJX0lPX1BST1RPQ09MICAgICAgICpQY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NCi0gICAgZ0JTLT5IYW5kbGVQcm90b2NvbCAoDQotICAgICAgICAgICBIYW5kbGVCdWZmZXJb SW5kZXhdLA0KLSAgICAgICAgICAgJmdFZmlQY2lJb1Byb3RvY29sR3VpZCwNCi0gICAgICAgICAg IChWT0lEICoqKSZQY2lJbw0KLSAgICAgICAgICAgKTsNCi0gICAgUGNpSW8tPlBjaS5SZWFkICgN Ci0gICAgICAgICAgICAgICAgIFBjaUlvLA0KLSAgICAgICAgICAgICAgICAgRWZpUGNpSW9XaWR0 aFVpbnQzMiwNCi0gICAgICAgICAgICAgICAgIDAsDQotICAgICAgICAgICAgICAgICBzaXplb2Yg KFBjaUNvbmZpZ0hlYWRlcikgLyBzaXplb2YgKFVJTlQzMiksDQotICAgICAgICAgICAgICAgICAm UGNpQ29uZmlnSGVhZGVyDQotICAgICAgICAgICAgICAgICApOw0KLSAgICBmb3IgKEluZGV4MiA9 IDA7IFBjaUNsYXNzZXNbSW5kZXgyXS5DbGFzcyAhPSAweGZmOyBJbmRleDIrKykgew0KLSAgICAg IGlmICgoUGNpQ29uZmlnSGVhZGVyLkhkci5DbGFzc0NvZGVbMl0gPT0gUGNpQ2xhc3Nlc1tJbmRl eDJdLkNsYXNzKSAmJg0KLSAgICAgICAgICAoUGNpQ29uZmlnSGVhZGVyLkhkci5DbGFzc0NvZGVb MV0gPT0gUGNpQ2xhc3Nlc1tJbmRleDJdLlN1YkNsYXNzKSkNCi0gICAgICB7DQotICAgICAgICBM ZWdhY3lCaW9zLT5DaGVja1BjaVJvbSAoDQotICAgICAgICAgICAgICAgICAgICAgIExlZ2FjeUJp b3MsDQotICAgICAgICAgICAgICAgICAgICAgIEhhbmRsZUJ1ZmZlcltJbmRleF0sDQotICAgICAg ICAgICAgICAgICAgICAgIE5VTEwsDQotICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQotICAg ICAgICAgICAgICAgICAgICAgICZGbGFncw0KLSAgICAgICAgICAgICAgICAgICAgICApOw0KLQ0K LSAgICA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b2wgKEhh bmRsZUJ1ZmZlcltJbmRleF0sICZnRWZpUGNpSW9Qcm90b2NvbEd1aWQsIChWT0lEICoqKSZQY2lJ byk7DQotICAgIGlmICghRUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAgICAgLy8NCi0gICAgICAv LyBEZXRlcm1pbmUgaWYgdGhpcyBpcyBpbiB0aGUgY29ycmVjdCBidXMgcmFuZ2UuDQotICAgICAg Ly8NCi0gICAgICBTdGF0dXMgPSBQY2lJby0+R2V0TG9jYXRpb24gKFBjaUlvLCAmU2VnbWVudCwg JkJ1cywgJkRldmljZSwgJkZ1bmN0aW9uKTsNCi0gICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMp IHx8ICgoQnVzIDwgTWluQnVzKSB8fCAoQnVzID4gTWF4QnVzKSkpIHsNCi0gICAgICAgIGNvbnRp bnVlOw0KLSAgICAgIH0NCi0NCi0gICAgICAvLw0KLSAgICAgIC8vIFJlYWQgZGV2aWNlIGluZm9y bWF0aW9uLg0KLSAgICAgIC8vDQotICAgICAgU3RhdHVzID0gUGNpSW8tPlBjaS5SZWFkICgNCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgUGNpSW8sDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgIEVmaVBjaUlvV2lkdGhVaW50MzIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAg IDAsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoUGNpKSAvIHNpemVvZiAo VUlOVDMyKSwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgJlBjaQ0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICApOw0KLSAgICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0g ICAgICAgIGNvbnRpbnVlOw0KLSAgICAgIH0NCi0NCi0gICAgICAvLw0KLSAgICAgIC8vIE1ha2Ug c3VyZSB0aGUgZGV2aWNlIGlzIGEgVkdBIGRldmljZS4NCi0gICAgICAvLw0KLS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SV9IQU5ETEUgICAgICAgICAgICAgICAgICAgICAgICAg KipIYW5kbGVCdWZmZXIsDQotICBPVVQgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAqSGFuZGxlQ291bnQsDQotICBPVVQgVk9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAqKkFkZGl0aW9uYWxEYXRhIE9QVElPTkFMDQotICApDQotew0KLSAgREVWSUNFX1NUUlVDVFVS RSAgICAgICAgICBMb2NhbERldmljZVsweDQwXTsNCi0gIFVJTlQzMiAgICAgICAgICAgICAgICAg ICAgTG9jYWxJbmRleDsNCi0gIFVJTlQzMiAgICAgICAgICAgICAgICAgICAgSW5kZXg7DQotICBE RVZJQ0VfU1RSVUNUVVJFICAgICAgICAgIFRlbXBEZXZpY2U7DQotICBFRklfU1RBVFVTICAgICAg ICAgICAgICAgIFN0YXR1czsNCi0gIEVGSV9QQ0lfSU9fUFJPVE9DT0wgICAgICAgKlBjaUlvOw0K LSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICBTZWdtZW50Ow0KLSAgVUlOVE4gICAgICAgICAg ICAgICAgICAgICBCdXM7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgIERldmljZTsNCi0g IFVJTlROICAgICAgICAgICAgICAgICAgICAgRnVuY3Rpb247DQotICBIRERfSU5GTyAgICAgICAg ICAgICAgICAgICpIZGRJbmZvOw0KLSAgUENJX1RZUEUwMCAgICAgICAgICAgICAgICBQY2lDb25m aWdIZWFkZXI7DQotICBVSU5UMzIgICAgICAgICAgICAgICAgICAgIEhkZEluZGV4Ow0KLSAgRUZJ X0hBTkRMRSAgICAgICAgICAgICAgICBJZGVIYW5kbGU7DQotICBFRklfTEVHQUNZX0JJT1NfUFJP VE9DT0wgICpMZWdhY3lCaW9zOw0KLSAgUENJX0NMQVNTX1JFQ09SRCAgICAgICAgICBDbGFzc0xp c3RzWzEwXTsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgICAgUHJpb3JpdHl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BUaGlzIGlzIG5lY2Vzc2Fy eQ0KLSAgICAgIC8vIGluIE5PX0NPTkZJR19DSEFOR0UgYm9vdCBwYXRoIHRvIGVuc3VyZSBJREUg Y29udHJvbGxlciBpcyBjb3JyZWN0bHkNCi0gICAgICAvLyBpbml0aWFsaXplZCBhbmQgYWxsIElE RSBkcml2ZXMgYXJlIGVudW1lcmF0ZWQNCi0gICAgICAvLw0KLSAgICAgIGlmICghYkNvbm5lY3Rl ZCkgew0KLSAgICAgICAgZm9yIChJbmRleCA9IDA7IEluZGV4IDwgTG9jYWxJbmRleDsgSW5kZXgr Kykgew0KLSAgICAgICAgICBnQlMtPkNvbm5lY3RDb250cm9sbGVyIChMb2NhbERldmljZVtJbmRl eF0uSGFuZGxlLCBOVUxMLCBOVUxMLCBUUlVFKTsNCi0gICAgICAgIH0NCi0gICAgICB9DQotDQot ICAgICAgLy8NCi0gICAgICAvLyBMb2NhdGUgb25ib2FyZCBjb250cm9sbGVycy4NCi0gICAgICAv Lw0KLSAgICAgIGZvciAoSW5kZXggPSAwOyBJbmRleCA8IExvY2FsSW5kZXg7IEluZGV4KyspIHsN Ci0gICAgICAgIGlmIChMb2NhbERldmljZVtJbmRleF0uVmlkID09IFZfSU5URUxfVkVORE9SX0lE KSB7DQotICAgICAgICAgIGlmIChMb2NhbERldmljZVtJbmRleF0uRGlkID09IFZfUElJWDRfSURF X0RFVklDRV9JRCkgew0KLSAgICAgICAgICAgIElkZUhhbmRsZSA9IExvY2FsRGV2aWNlW0luZGV4 XS5IYW5kbGU7DQotICAgICAgICAgIH0NCi0gICAgICAgIH0NCi0gICAgICB9DQotDQotICAgICAg Ly8NCi0gICAgICAvLyBTZXQgdGhlIElERSBjb250b3JsbGVyIGFzIHByaW1hcnkgZGV2aWNlcy4N Ci0gICAgICAvLw0KLSAgICAgIFByaW9yaXR5SW5kZXggPSAwOw0KLSAgICAgIGZvciAoSW5kZXgg PSAwOyBJbmRleCA8IExvY2FsSW5kZXg7IEluZGV4KyspIHsNCi0gICAgICAgIGlmICgoTG9jYWxE ZXZpY2VbSW5kZXhdLkhhbmRsZSA9PSBJZGVIYW5kbGUpICYmIChQcmlvcml0eUluZGV4ID09IDAp KSB7DQotICAgICAgICAgIFRlbXBEZXZpY2UgICAgICAgICAgICAgICAgID0gTG9jYWxEZXZpY2Vb UHJpb3JpdHlJbmRleF07DQotICAgICAgICAgIExvY2FsRGV2aWNlW1ByaW9yaXR5SW5kZXhdID0g TG9jYWxEZXZpY2VbSW5kZXhdOw0KLSAgICAgICAgICBMb2NhbERldmljZVtJbmRleF0gICAgICAg ICA9IFRlbXBEZXZpY2U7DQotICAgICAgICAgIFByaW9yaXR5SW5kZXgrKzsNCi0gICAgICAgICAg YnJlYWs7DQotICAgICAgICB9DQotICAgICAgfQ0KLQ0KLSAgICAgIC8vDQotICAgICAgLy8gQ29w eSBvdmVyIGhhbmRsZXMgYW5kIHVwZGF0ZSByZXR1cm4gdmFsdWVzLg0KLSAgICAgIC8vDQotICAg ICAgZm9yIChJbmRleCA9IDA7IEluZGV4IDwgTG9jYWxJbmRleDsgSW5kZXgrKykgew0KLSAgICAg ICAgbURpc2tIYW5kbGVzW0luZGV4XSA9IExvY2FsRGV2aWNlW0luZGV4XS5IYW5kbGU7DQotICAg ICAgfQ0KLQ0KLSAgICAgICpIYW5kbGVCdWZmZXIgPSAmbURpc2tIYW5kbGVzWzBdOw0KLSAgICAg ICpIYW5kbGVDb3VudCAgPSBMb2NhbEluZGV4Ow0KLQ0KLSAgICAgIC8vDQotICAgICAgLy8gV2Ug aGF2ZSBjb25uZWN0ZWQgYWxsIElERSBjb250cm9sbGVycyBvbmNlLiBObyBtb3JlIG5lZWRlZA0K LSAgICAgIC8vDQotICAgICAgYkNvbm5lY3RlZCA9IFRSVUU7DQotDQotICAgICAgLy8NCi0gICAg ICAvLyBMb2cgYWxsIG9uYm9hcmQgY29udHJvbGxlcnMuDQotICAgICAgLy8NCi0gICAgICBmb3Ig KEluZGV4ID0gMDsgKEluZGV4IDwgTG9jYWxJbmRleCkgJiYgKEFkZGl0aW9uYWxEYXRhICE9IE5V TEwpOyBJbmRleCsrKSB7DQotICAgICAgICBpZiAoKExvY2FsRGV2aWNlW0luZGV4XS5IYW5kbGUg IT0gTlVMTCkgJiYNCi0gICAgICAgICAgICAoTG9jYWxEZXZpY2VbSW5kZXhdLkhhbmRsZSA9PSBJ ZGVIYW5kbGUpKQ0KLSAgICAgICAgew0KLSAgICAgICAgICBTdGF0dXMgPSBnQlMtPkhhbmRsZVBy b3RvY29sICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgIExvY2FsRGV2aWNlW0luZGV4XS5I YW5kbGUsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAmZ0VmaVBjaUlvUHJvdG9jb2xHdWlk LA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgKFZPSUQgKiopJlBjaUlvDQotICAgICAgICAg ICAgICAgICAgICAgICAgICApOw0KLSAgICAgICAgICBQY2lJby0+UGNpLlJlYWQgKA0KLSAgICAg ICAgICAgICAgICAgICAgICAgUGNpSW8sDQotICAgICAgICAgICAgICAgICAgICAgICBFZmlQY2lJ b1dpZHRoVWludDMyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgMCwNCi0gICAgICAgICAgICAg ICAgICAgICAgIHNpemVvZiAoUGNpQ29uZmlnSGVhZGVyKSAvIHNpemVvZiAoVUlOVDMyKSwNCi0g ICAgICAgICAgICAgICAgICAgICAgICZQY2lDb25maWdIZWFkZXINCi0gICAgICAgICAgICAgICAg ICAgICAgICk7DQotICAgICAgICAgIGlmICghRUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAgICAg ICAgICAgUGNpSW8tPkdldExvY2F0aW9uICgNCi0gICAgICAgICAgICAgICAgICAgICBQY2lJbywN Ci0gICAgICAgICAgICAgICAgICAgICAmU2VnbWVudCwNCi0gICAgICAgICAgICAgICAgICAgICAm QnVzLA0KLSAgICAgICAgICAgICAgICAgICAgICZEZXZpY2UsDQotICAgICAgICAgICAgICAgICAg ICAgJkZ1bmN0aW9uDQotICAgICAgICAgICAgICAgICAgICAgKTsNCi0NCi0gICAgICAgICAgICAv Lw0KLSAgICAgICAgICAgIC8vIEJlIHN1cmUgdG8gb25seSBmaWxsIG91dCBjb3JyZWN0IGluZm9y bWF0aW9uIGJhc2VkIG9uIHBsYXRmb3JtDQotICAgICAgICAgICAgLy8gY29uZmlndXJhdGlvbi4N Ci0gICAgICAgICAgICAvLw0KLSAgICAgICAgICAgIEhkZEluZm9bSGRkSW5kZXhdLlN0YXR1cyAg ICAgIHw9IEhERF9QUklNQVJZOw0KLSAgICAgICAgICAgIEhkZEluZm9bSGRkSW5kZXhdLkJ1cyAg ICAgICAgICA9IChVSU5UMzIpQnVzOw0KLSAgICAgICAgICAgIEhkZEluZm9bSGRkSW5kZXhdLkRl dmljZSAgICAgICA9IChVSU5UMzIpRGV2aWNlOw0KLSAgICAgICAgICAgIEhkZEluZm9bSGRkSW5k ZXhdLkZ1bmN0aW9uICAgICA9IChVSU5UMzIpRnVuY3Rpb247DQotICAgICAgICAgICAgSGRkSW5m b1tIZGRJbmRleCArIDFdLlN0YXR1cyAgfD0gSEREX1NFQ09OREFSWTsNCi0gICAgICAgICAgICBI ZGRJbmZvW0hkZEluZGV4ICsgMV0uQnVzICAgICAgPSAoVUlOVDMyKUJ1czsNCi0gICAgICAgICAg ICBIZGRJbmZvW0hkZEluZGV4ICsgMV0uRGV2aWNlICAgPSAoVUlOVDMyKURldmljZTsNCi0gICAg ICAgICAgICBIZGRJbmZvW0hkZEluZGV4ICsgMV0uRnVuY3Rpb24gPSAoVUlOVDMyKUZ1bmN0aW9u Ow0KLQ0KLSAgICAgICAgICAgIC8vDQotICAgICAgICAgICAgLy8gUHJpbWFyeSBjb250cm9sbGVy IGRhdGENCi0gICAgICAgICAgICAvLw0KLSAgICAgICAgICAgIGlmICgoUGNpQ29uZmlnSGVhZGVy Lkhkci5DbGFzc0NvZGVbMF0gJiAweDAxKSAhPSAwKSB7DQotICAgICAgICAgICAgICBIZGRJbmZv W0hkZEluZGV4XS5Db21tYW5kQmFzZUFkZHJlc3MgPQ0KLSAgICAgICAgICAgICAgICAoVUlOVDE2 KShQY2lDb25maWdIZWFkZXIuRGV2aWNlLkJhclswXSAmIDB4ZmZmYyk7DQotICAgICAgICAgICAg ICBIZGRJbmZvW0hkZEluZGV4XS5Db250cm9sQmFzZUFkZHJlc3MgPQ0KLSAgICAgICAgICAgICAg ICAoVUlOVDE2KSgoUGNpQ29uZmlnSGVhZGVyLkRldmljZS5CYXJbMV0gJiAweGZmZmMpKzIpOw0K LSAgICAgICAgICAgICAgSGRkSW5mb1tIZGRJbmRleF0uQnVzTWFzdGVyQWRkcmVzcyA9DQotICAg ICAgICAgICAgICAgIChVSU5UMTYpKFBjaUNvbmZpZ0hlYWRlci5EZXZpY2UuQmFyWzRdICYgMHhm ZmZjKTsNCi0gICAgICAgICAgICAgIEhkZEluZm9bSGRkSW5kZXhdLkhkZElycSA9IFBjaUNvbmZp Z0hlYWRlci5EZXZpY2UuSW50ZXJydXB0TGluZTsNCi0gICAgICAgICAgICB9IGVsc2Ugew0KLSAg ICAgICAgICAgICAgSGRkSW5mb1tIZGRJbmRleF0uSGRkSXJxICAgICAgICAgICAgID0gMTQ7DQot ICAgICAgICAgICAgICBIZGRJbmZvW0hkZEluZGV4XS5Db21tYW5kQmFzZUFkZHJlc3MgPSAweDFm MDsNCi0gICAgICAgICAgICAgIEhkZEluZm9bSGRkSW5kZXhdLkNvbnRyb2xCYXNlQWRkcmVzcyA9 IDB4M2Y2Ow0KLSAgICAgICAgICAgICAgSGRkSW5mb1tIZGRJbmRleF0uQnVzTWFzdGVyQWRkcmVz cyAgID0gMDsNCi0gICAgICAgICAgICB9DQotDQotICAgICAgICAgICAgSGRkSW5kZXgrKzsNCi0N Ci0gICAgICAgICAgICAvLw0KLSAgICAgICAgICAgIC8vIFNlY29uZGFyeSBjb250cm9sbGVyIGRh dGENCi0gICAgICAgICAgICAvLw0KLSAgICAgICAgICAgIGlmICgoUGNpQ29uZmlnSGVhZGVyLkhk ci5DbGFzc0NvZGVbMF0gJiAweDA0KSAhPSAwKSB7DQotICAgICAgICAgICAgICBIZGRJbmZvW0hk ZEluZGV4XS5Db21tYW5kQmFzZUFkZHJlc3MgPQ0KLSAgICAgICAgICAgICAgICAoVUlOVDE2KShQ Y2lDb25maWdIZWFkZXIuRGV2aWNlLkJhclsyXSAmIDB4ZmZmYyk7DQotICAgICAgICAgICAgICBI ZGRJbmZvW0hkZEluZGV4XS5Db250cm9sQmFzZUFkZHJlc3MgPQ0KLSAgICAgICAgICAgICAgICAo VUlOVDE2KSgoUGNpQ29uZmlnSGVhZGVyLkRldmljZS5CYXJbM10gJiAweGZmZmMpKzIpOw0KLSAg ICAgICAgICAgICAgSGRkSW5mb1tIZGRJbmRleF0uQnVzTWFzdGVyQWRkcmVzcyA9DQotICAgICAg ICAgICAgICAgIChVSU5UMTYpKEhkZEluZm9bSGRkSW5kZXhdLkJ1c01hc3RlckFkZHJlc3MgKyA4 KTsNCi0gICAgICAgICAgICAgIEhkZEluZm9bSGRkSW5kZXhdLkhkZElycSA9IFBjaUNvbmZpZ0hl YWRlci5EZXZpY2UuSW50ZXJydXB0TGluZTsNCi0gICAgICAgICAgICB9IGVsc2Ugew0KLSAgICAg ICAgICAgICAgSGRkSW5mb1tIZGRJbmRleF0uSGRkSXJxICAgICAgICAgICAgID0gMTU7DQotICAg ICAgICAgICAgICBIZGRJbmZvW0hkZEluZGV4XS5Db21tYW5kQmFzZUFkZHJlc3MgPSAweDE3MDsN Ci0gICAgICAgICAgICAgIEhkZEluZm9bSGRkSW5kZXhdLkNvbnRyb2xCYXNlQWRkcmVzcyA9IDB4 Mzc2Ow0KLSAgICAgICAgICAgICAgSGRkSW5mb1tIZGRJbmRleF0uQnVzTWFzdGVyQWRkcmVzcyAg ID0gMDsNCi0gICAgICAgICAgICB9DQotDQotICAgICAgICAgICAgSGRkSW5kZXgrKzsNCi0gICAg ICAgIC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ICAgIFR5cGUsDQotICBPVVQgICBFRklfSEFORExFICAg ICAgICAgICAgICAgICAgICAgICAgICAgIERldmljZUhhbmRsZSAgT1BUSU9OQUwsDQotICBJTiBP VVQgICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpTaGFkb3dhZGRyZXNzICBP UFRJT05BTCwNCi0gIElOICAgICAgIEVGSV9DT01QQVRJQklMSVRZMTZfVEFCTEUgICAgICAgICAg KkNvbXBhdGliaWxpdHkxNlRhYmxlICBPUFRJT05BTCwNCi0gIE9VVCAgIFZPSUQgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKipBZGRpdGlvbmFsRGF0YSBPUFRJT05BTA0KLSAgKQ0K LXsNCi0gIEVGSV9JQTMyX1JFR0lTVEVSX1NFVCAgICAgUmVnczsNCi0gIEVGSV9MRUdBQ1lfQklP U19QUk9UT0NPTCAgKkxlZ2FjeUJpb3M7DQotICBFRklfU1RBVFVTICAgICAgICAgICAgICAgIFN0 YXR1czsNCi0NCi0gIHN3aXRjaCAoTW9kZSkgew0KLSAgICBjYXNlIEVmaVBsYXRmb3JtSG9va1By ZXBhcmVUb1NjYW5Sb206DQotICAgICAgU3RhdHVzID0gZ0JTLT5Mb2NhdGVQcm90b2NvbCAoDQot ICAgICAgICAgICAgICAgICAgICAgICZnRWZpTGVnYWN5Qmlvc1Byb3RvY29sR3VpZCwNCi0gICAg ICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAgICAgICAgICAgICAgICAgICAgKFZPSUQgKiop JkxlZ2FjeUJpb3MNCi0gICAgICAgICAgICAgICAgICAgICAgKTsNCi0NCi0gICAgICAvLw0KLSAg ICAgIC8vIFNldCB0aGUgODB4MjUgVGV4dCBWR0EgTW9kZQ0KLSAgICAgIC8vDQotICAgICAgUmVn cy5ILkFIID0gMHgwMDsNCi0gICAgICBSZWdzLkguQUwgPSAweDAzOw0KLSAgICAgIFN0YXR1cyAg ICA9IExlZ2FjeUJpb3MtPkludDg2IChM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mIGVudHJpZXMgaW4gdGFi bGUuDQotICBAcGFyYW0gIExvY2FsUGlycVRhYmxlICAgICAgICAgICRQSVIgdGFibGUuDQotICBA cGFyYW0gIFBpcnFUYWJsZVNpemUgICAgICAgICAgICRQSVIgdGFibGUgc2l6ZS4NCi0gIEBwYXJh bSAgTG9jYWxJcnFQcmlvcml0eVRhYmxlICAgQSBsaXN0IG9mIGludGVycnVwdHMgaW4gcHJpb3Jp dHkgb3JkZXIgdG8gYXNzaWduLg0KLSAgQHBhcmFtICBJcnFQcmlvcml0eVRhYmxlRW50cmllcyBU aGUgbnVtYmVyIG9mIGVudHJpZXMgaW4gdGhlIHByaW9yaXR5IHRhYmxlLg0KLQ0KLSAgQHJldHZh bCBFRklfU1VDQ0VTUyAgICAgICAgICAgRGF0YSB3YXMgc3VjY2Vzc2Z1bGx5IHJldHVybmVkLg0K LQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1FRklBUEkNCi1HZXRSb3V0aW5nVGFibGUgKA0KLSAgSU4g IEVGSV9MRUdBQ1lfQklPU19QTEFURk9STV9QUk9UT0NPTCAgKlRoaXMsDQotICBPVVQgVk9JRCAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKlJvdXRpbmdUYWJsZSwNCi0gIE9VVCBVSU5U TiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpSb3V0aW5nVGFibGVFbnRyaWVzLA0KLSAg T1VUIFZPSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKipMb2NhbFBpcnFUYWJsZSAg T1BUSU9OQUwsDQotICBPVVQgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqUGly cVRhYmxlU2l6ZSAgT1BUSU9OQUwsDQotICBPVVQgVk9JRCAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAqKkxvY2FsSXJxUHJpb3JpdHlUYWJsZSAgT1BUSU9OQUwsDQotICBPVVQgVUlOVE4g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqSXJxUHJpb3JpdHlUYWJsZUVudHJpZXMgT1BU SU9OQUwNCi0gICkNCi17DQotICBVSU5UMTYgICAgICAgICAgICAgICAgICAgICAgICAgUFRhYmxl U2l6ZTsNCi0gIFVJTlQzMiAgICAgICAgICAgICAgICAgICAgICAgICBJbmRleDsNCi0gIFVJTlQ4 ICAgICAgICAgICAgICAgICAgICAgICAgICBCdXM7DQotICBVSU5UOCAgICAgICAgICAgICAgICAg ICAgICAgICAgRGV2aWNlOw0KLSAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgIEZ1bmN0 aW9uOw0KLSAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgIENoZWNrc3VtOw0KLSAgVUlO VDggICAgICAgICAgICAgICAgICAgICAgICAgICpQdHI7DQotICBFRklfU1RBVFVTICAgICAgICAg ICAgICAgICAgICAgU3RhdHVzOw0KLSAgRUZJX0xFR0FDWV9JTlRFUlJVUFRfUFJPVE9DT0wgICpM ZWdhY3lJbnRlcnJ1cHQ7DQotDQotICBDaGVja3N1bSA9IDA7DQotDQotICBpZiAoTG9jYWxQaXJx VGFibGUgIT0gTlVMTCkgew0KLSAgICBQVGFibGVTaXplID0gc2l6ZW9mIChFRklfTEVHQUNZX1BJ UlFfVEFCTEVfSEVBREVSKSArDQotICAgICAgICAgICAgICAgICBzaXplb2YgKEVGSV9MRUdBQ1lf SVJRX1JPVVRJTkdfRU5UUlkpICogTUFYX0lSUV9ST1VUSU5HX0VOVFJJRVM7DQotDQotICAgIFN0 YXR1cyA9IGdCUy0+TG9jYXRlUHJvdG9jb2wgKA0KLSAgICAgICAgICAgICAgICAgICAgJmdFZmlM ZWdhY3lJbnRlcnJ1cHRQcm90b2NvbEd1aWQsDQotICAgICAgICAgICAgICAgICAgICBOVUxMLA0K LSAgICAgICAgICAgICAgICAgICAgKFZPSUQgKiopJkxlZ2FjeUludGVycnVwdA0KLSAgICAgICAg ICAgICAgICAgICAgKTsNCi0gICAgQVNTRVJUX0VGSV9FUlJPUiAoU3RhdHVzKTsNCi0gICAgTGVn YWN5SW50ZXJydXB0LT5HZXRMb2NhdGlvbiAoDQotICAgICAgICAgICAgICAgICAgICAgICBMZWdh Y3lJbnRlcnJ1cHQsDQotICAgICAgICAgICAgICAgICAgICAgICAmQnVzLA0KLSAgICAgICAgICAg ICAgICAgICAgICAgJkRldmljZSwNCi0gICAgICAgICAgICAgICAgICAgICAgICZGdW5jdGlvbg0K LSAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0NCi0gICAgLy8NCi0gICAgLy8gVXBkYXRlIGZp ZWxkcyBpbiAkUElSIHRhYmxlIGhlYWRlcg0KLSAgICAvLw0KLSAgICBQaXJxVGFibGVIZWFkLlBp cnFUYWJsZS5UYWJsZVNpemUgPSBQVGFibGVTaXplOw0KLSAgICBQaXJxVGFibGVIZWFkLlBpcnFU YWJsZS5CdXMgICAgICAgPSBCdXM7DQotICAgIFBpcnFUYWJsZUhlYWQuUGlycVRhYmxlLkRldkZ1 biAgICA9IChVSU5UOCkoKERldmljZSA8PCAzKSArIEZ1bmN0aW9uKTsNCi0gICAgUHRyICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID0gKFVJTlQ4ICopKCZQaXJxVGFibGVIZWFkKTsNCi0N Ci0gICAgLy8NCi0gICAgLy8gQ2FsY3VsYXRlIGNoZWNrc3VtLg0KLSAgICAvLw0KLSAgICBmb3Ig KEluZGV4ID0gMDsgSW5kZXggPCBQVGFibGVTaXplOyBJbmRleCsrKSB7DQotICAgICAgQ2hlY2tz dW0gPSAoVUlOVDgpKENoZWNrc3VtICsgKFVJTlQ4KSpQdHIpOw0KLSAgICAgIFB0ciAgICAgKz0g MTsNCi0gICAgfQ0KLQ0KLSAgICBDaGVja3N1bSAgICAgICAgICAgICAgICAgICAgICAgICA9IChV SU5UOCkoMHgwMCAtIENoZWNrc3VtKTsNCi0gICAgUGlycVRhYmxlSGVhZC5QaXJxVGFibGUuQ2hl Y2tzdW0gPSBDaGVja3N1bTsNCi0NCi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gICAg ICAgICAgICAgICAgICoqVGFibGUsDQotICBPVVQgVUlOVE4gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAqVGFibGVTaXplLA0KLSAgT1VUIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKkxvY2F0aW9uLA0KLSAgT1VUIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKkFsaWdubWVudCwNCi0gIElOICBVSU5UMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAg IExlZ2FjeVNlZ21lbnQsDQotICBJTiAgVUlOVDE2ICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBMZWdhY3lPZmZzZXQNCi0gICkNCi17DQotICBFRklfU1RBVFVTICBTdGF0dXM7DQotICBVSU5U TiAgICAgICBJbmRleDsNCi0NCi0gIHN3aXRjaCAoTW9kZSkgew0KLSAgICBjYXNlIEVmaUdldFBs YXRmb3JtQmluYXJ5U3lzdGVtUm9tOg0KLSAgICAgIC8vDQotICAgICAgLy8gTG9vcCB0aHJvdWdo IHRhYmxlIG9mIFN5c3RlbSByb20gZGVzY3JpcHRpb25zDQotICAgICAgLy8NCi0gICAgICBmb3Ig KEluZGV4ID0gMDsgbVN5c3RlbVJvbVRhYmxlW0luZGV4XS5WYWxpZCAhPSAwOyBJbmRleCsrKSB7 DQotICAgICAgICBTdGF0dXMgPSBHZXRTZWN0aW9uRnJvbUZ2ICgNCi0gICAgICAgICAgICAgICAg ICAgJm1TeXN0ZW1Sb21UYWJsZVtJbmRleF0uRmlsZU5hbWUsDQotICAgICAgICAgICAgICAgICAg IEVGSV9TRUNUSU9OX1JBVywNCi0gICAgICAgICAgICAgICAgICAgMCwNCi0gICAgICAgICAgICAg ICAgICAgVGFibGUsDQotICAgICAgICAgICAgICAgICAgIChVSU5UTiAqKVRhYmxlU2l6ZQ0KLSAg ICAgICAgICAgICAgICAgICApOw0KLSAgICAgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0K LSAgICAgICAgIC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pY2UuDQotICBAcGFyYW0gIFBjaUZ1bmN0aW9uICAgICAgICAgICBU aGUgUENJIGZ1bmN0aW9uIG51bWJlciBmb3IgdGhpcyBkZXZpY2UuDQotICBAcGFyYW0gIFBpcnEg ICAgICAgICAgICAgICAgICBJbnB1dCBpcyBQSVJRIHJlcG9ydGVkIGJ5IGRldmljZSwgYW5kIG91 dHB1dCBpcyB0cnVlIFBJUlEuDQotICBAcGFyYW0gIFBjaUlycSAgICAgICAgICAgICAgICBUaGUg SVJRIGFscmVhZHkgYXNzaWduZWQgdG8gdGhlIFBJUlEsIG9yIHRoZSBJUlEgdG8gYmUNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzc2lnbmVkIHRvIHRoZSBQSVJRLg0KLQ0KLSAg QHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgICAgVGhlIFBJUlEgd2FzIHRyYW5zbGF0ZWQuDQot DQotKiovDQotRUZJX1NUQVRVUw0KLUVGSUFQSQ0KLVRyYW5zbGF0ZVBpcnEgKA0KLSAgSU4gICAg ICAgIEVGSV9MRUdBQ1lfQklPU19QTEFURk9STV9QUk9UT0NPTCAgKlRoaXMsDQotICBJTiAgICAg ICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQY2lCdXMsDQotICBJTiAgICAg ICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQY2lEZXZpY2UsDQotICBJTiAg ICAgICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQY2lGdW5jdGlvbiwNCi0g IElOICBPVVQgICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpQaXJxLA0KLSAg T1VUICAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlBjaUlycQ0KLSAg KQ0KLXsNCi0gIEVGSV9MRUdBQ1lfSU5URVJSVVBUX1BST1RPQ09MICAqTGVnYWN5SW50ZXJydXB0 Ow0KLSAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgIFN0YXR1czsNCi0gIFVJTlROICAg ICAgICAgICAgICAgICAgICAgICAgICBJbmRleDsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAg ICAgICAgICBJbmRleDE7DQotICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgTG9jYWxQ aXJxOw0KLSAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgIFBpcnFEYXRhOw0KLSAgVUlO VDggICAgICAgICAgICAgICAgICAgICAgICAgIE1hdGNoRGF0YTsNCi0NCi0gIFN0YXR1cyA9IGdC Uy0+TG9jYXRlUHJvdG9jb2wgKA0KLSAgICAgICAgICAgICAgICAgICZnRWZpTGVnYWN5SW50ZXJy dXB0UHJvdG9jb2xHdWlkLA0KLSAgICAgICAgICAgICAgICAgIE5VTEwsDQotICAgICAgICAgICAg ICAgICAgKFZPSUQgKiopJkxlZ2FjeUludGVycnVwdA0KLSAgICAgICAgICAgICAgICAgICk7DQot ICBBU1NFUlRfRUZJX0VSUk9SIChTdGF0dXMpOw0KLSAgTG9jYWxQaXJxID0gKFVJTlQ4KSgqUGly cSk7DQotDQotICBmb3IgKEluZGV4ID0gMDsgSW5kZXggPCBNQVhfSVJRX1JPVVRJTkdfRU5UUklF UzsgSW5kZXgrKykgew0KLSAgICBpZiAoKFBpcnFUYWJsZUhlYWQuSXJxUm91dGluZ0VudHJ5W0lu ZGV4XS5CdXMgPT0gUGNpQnVzKSAmJg0KLSAgICAgICAgKFBpcnFUYWJsZUhlYWQuSXJxUm91dGlu Z0VudHJ5W0luZGV4XS5EZXZpY2UgPT0gUGNpRGV2aWNlKSkNCi0gICAgew0KLSAgICAgIExvY2Fs UGlycSA9IChVSU5UOCkoUGlycVRhYmxlSGVhZC5JcnFSb3V0aW5nRW50cnlbSW5kZXhdLlBpcnFF bnRyeVtMb2NhbFBpcnFdLlBpcnEgJiAweDBmKTsNCi0gICAgICBpZiAoTG9jYWxQaXJxID4gNCkg ew0KLSAgICAgICAgTG9jYWxQaXJxIC09IDQ7DQotICAgICAgfQ0KLQ0KLSAgICAgIExlZ2FjeUlu dGVycnVwdC0+UmVhZFBpcnEgKExlZ2FjeUludGVycnVwdCwgTG9jYWxQaXJxLCAmUGlycURhdGEp Ow0KLSAgICAgIE1hdGNoRGF0YSA9IFBDSV9VTlVTRUQ7DQotICAgICAgd2hpbGUgKFBpcnFEYXRh ID09IDApIHsNCi0gICAgICAgIGZvciAoSW5kZXgxID0gMDsgSW5kZXgxIDwgTUFYX0lSUV9QUklP UklUWV9FTlRSSUVTOyBJbmRleDErKykgew0KLSAgICAgICAgICBpZiAoKElycVByaW9yaXR5VGFi bGVbSW5kZXgxXS5Vc2VkID09IE1hdGNoRGF0YSkgJiYNCi0gICAgICAgICAgICAgIChJcnFQcmlv cml0eVRhYmxlW0luZGV4MV0uSXJxICE9IDApKQ0KLSAgICAgICAgICB7DQotICAgICAgICAgICAg UGlycURhdGEgICAgICAgICAgICAgICAgICAgICAgPSBJcnFQcmlvcml0eVRhYmxlW0luZGV4MV0u SXJxOw0KLSAgICAgICAgICAgIElycVByaW9yaXR5VGFibGVbSW5kZXgxXS5Vc2VkID0gMHhmZjsN Ci0gICAgICAgICAgICBMZWdhY3lJbnRlcnJ1cHQtPldyaXRlUGlycSAoDQotICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIExlZ2FjeUludGVycnVwdCwNCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgTG9jYWxQaXJxLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQ aXJxRGF0YQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICAgICAgICAg IGJyZWFrOw0KLSAgICAgICAgICB9DQotICAgICAgICB9DQotDQotICAgICAgICBpZiAoUGlycURh dGEgPT0gMCkgew0KLSAgICAgICAgICAvLw0KLSAgICAgICAgICAvLyBObyB1bnVzZWQgaW50ZXJy dXB0cywgc28gc3RhcnQgcmV1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VwYXJlVG9C b290ICgNCi0gIElOICBFRklfTEVHQUNZX0JJT1NfUExBVEZPUk1fUFJPVE9DT0wgICpUaGlzLA0K LSAgSU4gIEJCU19CQlNfREVWSUNFX1BBVEggICAgICAgICAgICAgICAgKkJic0RldmljZVBhdGgs DQotICBJTiAgVk9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqQmJzVGFibGUsDQot ICBJTiAgVUlOVDMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMb2FkT3B0aW9uc1NpemUs DQotICBJTiAgVk9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqTG9hZE9wdGlvbnMs DQotICBJTiAgVk9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqRWZpVG9MZWdhY3kx NkJvb3RUYWJsZQ0KLSAgKQ0KLXsNCi0gIEJCU19UQUJMRSAgICAgICAgICAgICAgICAgICAgICAg ICAgKkxvY2FsQmJzVGFibGU7DQotICBFRklfVE9fQ09NUEFUSUJJTElUWTE2X0JPT1RfVEFCTEUg ICpMZWdhY3kxNkJvb3RUYWJsZTsNCi0gIERFVklDRV9QUk9EVUNFUl9EQVRBX0hFQURFUiAgICAg ICAgKlNpb1B0cjsNCi0gIFVJTlQxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGV2aWNl UGF0aFR5cGU7DQotICBVSU5UMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEluZGV4Ow0K LSAgVUlOVDE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQcmlvcml0eTsNCi0NCi0gIC8v DQotICAvLyBJbml0aWFsaXplIHZhbHVlcw0KLSAgLy8NCi0gIFByaW9yaXR5ICAgICAgICAgID0g MDsNCi0gIExlZ2FjeTE2Qm9vdFRhYmxlID0gKEVGSV9UT19DT01QQVRJQklMSVRZMTZfQk9PVF9U QUJMRSAqKUVmaVRvTGVnYWN5MTZCb290VGFibGU7DQotDQotICAvLw0KLSAgLy8gU2V0IGhvdyBH YXR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WNlUGF0aFR5cGUpKQ0KLSAgICAgICAgew0KLSAgICAg ICAgICBMb2NhbEJic1RhYmxlW0luZGV4XS5Cb290UHJpb3JpdHkgPSBQcmlvcml0eTsNCi0gICAg ICAgICAgKytQcmlvcml0eTsNCi0gICAgICAgIH0NCi0gICAgICB9DQotDQotICAgICAgYnJlYWs7 DQotICAgIGNhc2UgQkJTX0JFVl9ERVZJQ0U6DQotICAgICAgZm9yIChJbmRleCA9IDA7IEluZGV4 IDwgTGVnYWN5MTZCb290VGFibGUtPk51bWJlckJic0VudHJpZXM7IEluZGV4KyspIHsNCi0gICAg ICAgIGlmICgoTG9jYWxCYnNUYWJsZVtJbmRleF0uQm9vdFByaW9yaXR5ID09IEJCU19VTlBSSU9S SVRJWkVEX0VOVFJZKSAmJg0KLSAgICAgICAgICAgIChMb2NhbEJic1RhYmxlW0luZGV4XS5DbGFz cyA9PSAwMSkgJiYNCi0gICAgICAgICAgICAoTG9jYWxCYnNUYWJsZVtJbmRleF0uU3ViQ2xhc3Mg PT0gMDEpKQ0KLSAgICAgICAgew0KLSAgICAgICAgICBMb2NhbEJic1RhYmxlW0luZGV4XS5Cb290 UHJpb3JpdHkgPSBQcmlvcml0eTsNCi0gICAgICAgICAgKytQcmlvcml0eTsNCi0gICAgICAgIH0N Ci0gICAgICB9DQotDQotICAgICAgYnJlYWs7DQotICAgIGNhc2UgQkJTX1VTQjoNCi0gICAgY2Fz ZSBCQlNfUENNQ0lBOg0KLSAgICBjYXNlIEJCU19VTktOT1dOOg0KLSAgICBkZWZhdWx0Og0KLSAg ICAgIGJyZWFrOw0KLSAgfQ0KLQ0KLSAgLy8NCi0gIC8vIFNldCBwcmlvcml0eSBmb3IgcmVzdCBv ZiBkZXZpY2VzDQotICAvLw0KLSAgZm9yIChJbmRleCA9IDA7IEluZGV4IDwgTGVnYWN5MTZCb290 VGFibGUtPk51bWJlckJic0VudHJpZXM7IEluZGV4KyspIHsNCi0gICAgaWYgKExvY2FsQmJzVGFi bGVbS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