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 0C6EAAC1AAD for ; Fri, 10 Nov 2023 23:59:15 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=61XytFp/PB2d17r/N294dQJGg+NBxPi9zzPohZh7Fd0=; 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-Type:Content-Transfer-Encoding; s=20140610; t=1699660754; v=1; b=ZGk4n4k31mATjpw7kl71lyDzKzskVuCgZwQKWJiXjgMX89eQT91EEnClSonGkm12tQn0+AJN f1jt4tFYdh7RigBz/LCY/eIU2j4J7vfvTDnq+wQkeMz6cp0/AIs8aOaxl4h2S6X+7qea1mlTeI5 EAigMN3fDUXp8tQorWGuKPzE= X-Received: by 127.0.0.2 with SMTP id r30kYY7687511xNubvY1UB5c; Fri, 10 Nov 2023 15:59:14 -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.42820.1699660753884308947 for ; Fri, 10 Nov 2023 15:59:14 -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-569-Lf2MMS_pNdiAq-t1zEwz7w-1; Fri, 10 Nov 2023 18:59:09 -0500 X-MC-Unique: Lf2MMS_pNdiAq-t1zEwz7w-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 5457485A58B; Fri, 10 Nov 2023 23:59:09 +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 59BB7C15881; Fri, 10 Nov 2023 23:59:08 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao Subject: [edk2-devel] [PATCH 06/37] OvmfPkg: remove LegacyBootMaintUiLib Date: Sat, 11 Nov 2023 00:57:49 +0100 Message-Id: <20231110235820.644381-7-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: nAvo3u4stL2ARsc6PcHadfHFx7686176AA= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ZGk4n4k3; 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 TGVnYWN5Qm9vdE1haW50VWlMaWIgaXMgbm90IHVzZWQgYnkgYW55IHBsYXRmb3JtIGF0IHRoaXMg cG9pbnQsIHJlbW92ZSBpdC4KClRoaXMgcGF0Y2ggcmVtb3ZlcyBtZW50aW9ucyBvZiB0aGUgZm9s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KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICNsYW5ndWFnZSBmci1GUiAgIlNldCBMZWdhY3kgQ0RS T00gRHJpdmVyIE9yZGVyLiINCi0jc3RyaW5nIFNUUl9GT1JNX05FVF9CT09UX1RJVExFICAgICAg ICAjbGFuZ3VhZ2UgZW4tVVMgICJTZXQgTGVnYWN5IE5FVCBEcml2ZXIgT3JkZXIiDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAiU2V0IExl Z2FjeSBORVQgRHJpdmVyIE9yZGVyIg0KLSNzdHJpbmcgU1RSX0ZPUk1fTkVUX0JPT1RfSEVMUCAg ICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIlNldCBMZWdhY3kgTkVUIERyaXZlciBPcmRlci4iDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZyLUZSICAi U2V0IExlZ2FjeSBORVQgRHJpdmVyIE9yZGVyLiINCi0jc3RyaW5nIFNUUl9GT1JNX0JFVl9CT09U X1RJVExFICAgICAgICAjbGFuZ3VhZ2UgZW4tVVMgICJTZXQgTGVnYWN5IEJFViBEcml2ZXIgT3Jk ZXIiDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1YWdlIGZy LUZSICAiU2V0IExlZ2FjeSBCRVYgRHJpdmVyIE9yZGVyIg0KLSNzdHJpbmcgU1RSX0ZPUk1fQkVW X0JPT1RfSEVMUCAgICAgICAgICNsYW5ndWFnZSBlbi1VUyAgIlNldCBMZWdhY3kgQkVWIERyaXZl ciBPcmRlci4iDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2xhbmd1 YWdlIGZyLUZSICAiU2V0IExlZ2FjeSBCRVYgRHJpdmVyIE9yZGVyLiINCi0jc3RyaW5nIFNUUl9P UkRFUl9DSEFOR0VfUFJPTVBUICAgICAgICA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AgICAgICAgID0gMHgwMDAx MDAwNQ0KLSAgQkFTRV9OQU1FICAgICAgICAgICAgICAgICAgICAgID0gTGVnYWN5Qm9vdE1haW50 VWlMaWINCi0gIE1PRFVMRV9VTklfRklMRSAgICAgICAgICAgICAgICA9IExlZ2FjeUJvb3RNYWlu dFVpTGliLnVuaQ0KLSAgRklMRV9HVUlEICAgICAgICAgICAgICAgICAgICAgID0gMjU5QTkwQjEt QzE1MS00M0U1LThBNzEtODJCNEUzMjAxRjRFDQotICBNT0RVTEVfVFlQRSAgICAgICAgICAgICAg ICAgICAgPSBEWEVfRFJJVkVSDQotICBWRVJTSU9OX1NUUklORyAgICAgICAgICAgICAgICAgPSAx LjANCi0gIExJQlJBUllfQ0xBU1MgICAgICAgICAgICAgICAgICA9IE5VTEx8RFhFX0RSSVZFUiBV RUZJX0FQUExJQ0FUSU9ODQotICBDT05TVFJVQ1RPUiAgICAgICAgICAgICAgICAgICAgPSBMZWdh Y3lCb290TWFpbnRVaUxpYkNvbnN0cnVjdG9yDQotICBERVNUUlVDVE9SICAgICAgICAgICAgICAg ICAgICAgPSBMZWdhY3lCb290TWFpbnRVaUxpYkRlc3RydWN0b3INCi0jDQotIyBUaGUgZm9sbG93 aW5nIGluZm9ybWF0aW9uIGlzIGZvciByZWZlcmVuY2Ugb25seSBhbmQgbm90IHJlcXVpcmVkIGJ5 IHRoZSBidWlsZCB0b29scy4NCi0jDQotIyAgVkFMSURfQVJDSElURUNUVVJFUyAgICAgICAgICAg PSBJQTMyIFg2NCBFQkMNCi0jDQotDQotW1NvdXJjZXNdDQotICBMZWdhY3lCb290TWFpbnRVaVZm ci5oDQotICBMZWdhY3lCb290TWFpbnRVaS5oDQotICBMZWdhY3lCb290TWFpbnRVaVZmci5WZnIN Ci0gIExlZ2FjeUJvb3RNYWludFVpU3RyaW5ncy51bmkNCi0gIExlZ2FjeUJvb3RNYWludFVpLmMN Ci0NCi1bUGFja2FnZXNdDQotICBNZGVQa2cvTWRlUGtnLmRlY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hY3lEZXZPcmRlclZhcmlhYmxlR3VpZCBFRkkgVmFyaWFibGUg Y2FuIG5vdCBiZSBmb3VuZC4NCi0gIEByZXR2YWwgRUZJX09VVF9PRl9SRVNPVVJDRVMgIEZhaWwg dG8gYWxsb2NhdGUgbWVtb3J5IHJlc291cmNlDQotICBAcmV0dmFsIG90aGVyICAgICAgICAgICAg ICAgICBDb250YWluIHNvbWUgZXJyb3IsIGRldGFpbHMgc2VlICB0aGUgc3RhdHVzIHJldHVybiBi eSBnUlQtPlNldFZhcmlhYmxlLg0KLSoqLw0KLUVGSV9TVEFUVVMNCi1VcGRhdGVCQlNPcHRpb24g KA0KLSAgSU4gTEVHQUNZX0JPT1RfTlZfREFUQSAgKk5WTWFwRGF0YQ0KLSAgKQ0KLXsNCi0gIFVJ TlROICAgICAgICAgICAgICAgICAgIEluZGV4Ow0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAg SW5kZXgyOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgQ3VycmVudFR5cGU7DQotICBWT0lE ICAgICAgICAgICAgICAgICAgICAqQm9vdE9wdGlvblZhcjsNCi0gIENIQVIxNiAgICAgICAgICAg ICAgICAgIFZhck5hbWVbMTAwXTsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgIE9wdGlvblNp emU7DQotICBFRklfU1RBVFVTICAgICAgICAgICAgICBTdGF0dXM7DQotICBVSU5UMzIgICAgICAg ICAgICAgICAgICAqQXR0cmlidXRlOw0KLSAgTEVHQUNZX01FTlVfT1BUSU9OICAgICAgKk9wdGlv bk1lbnU7DQotICBVSU5UMTYgICAgICAgICAgICAgICAgICAqTGVnYWN5RGV2Ow0KLSAgVUlOVDE2 ICAgICAgICAgICAgICAgICAgKkluaXRpYWxMZWdhY3lEZXY7DQotICBVSU5UOCAgICAgICAgICAg ICAgICAgICAqVmFyRGF0YTsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgIFZhclNpemU7DQot ICBMRUdBQ1lfREVWX09SREVSX0VOVFJZICAqRGV2T3JkZXI7DQotICBVSU5UOCAgICAgICAgICAg ICAgICAgICAqT3JpZ2luYWxQdHI7DQotICBVSU5UOCAgICAgICAgICAgICAgICAgICAqRGlzTWFw Ow0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgUG9zOw0KLSAgVUlOVE4gICAgICAgICAgICAg ICAgICAgQml0Ow0KLSAgVUlOVDE2ICAgICAgICAgICAgICAgICAgKk5ld09yZGVyOw0KLSAgVUlO VDE2ICAgICAgICAgICAgICAgICAgVG1wOw0KLSAgVUlOVDE2ICAgICAgICAgICAgICAgICAgKkVu Qm9vdE9wdGlvbjsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAgIEVuQm9vdE9wdGlvbkNvdW50 Ow0KLSAgVUlOVDE2ICAgICAgICAgICAgICAgICAgKkRpc0Jvb3RPcHRpb247DQotICBVSU5UTiAg ICAgICAgICAgICAgICAgICBEaXNCb290T3B0aW9uQ291bnQ7DQotICBVSU5UTiAgICAgICAgICAg ICAgICAgICBCdWZmZXJTaXplOw0KLQ0KLSAgRGlzTWFwICAgICAgICA9IE5VTEw7DQotICBOZXdP cmRlciAgICAgID0gTlVMTDsNCi0gIEN1cnJlbnRUeXBlICAgPSAwOw0KLSAgRW5Cb290T3B0aW9u ICA9IE5VTEw7DQotICBEaXNCb290T3B0aW9uID0gTlVMTDsNCi0NCi0gIERpc01hcCA9IG1MZWdh Y3lCb290T3B0aW9uUHJpdmF0ZS0+TWFpbnRhaW5NYXBEYXRhLT5EaXNhYmxlTWFwOw0KLSAgU3Rh dHVzID0gRUZJX1NVQ0NFU1M7DQotDQotICAvLw0KLSAgLy8gVXBkYXRlIHRoZSBWYXJpYWJsZSAi TGVnYWN5RGV2T3JkZXIiDQotICAvLw0KLSAgR2V0VmFyaWFibGUyIChWQVJfTEVHQUNZX0RFVl9P UkRFUiwgJmdFZmlMZWdhY3lEZXZPcmRlclZhcmlhYmxlR3VpZCwgKFZPSUQgKiopJlZhckRhdGEs ICZW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jvb3RPcHRpb24sDQotICAgICAgICAgICAgICAgJkRpc0Jv b3RPcHRpb25Db3VudA0KLSAgICAgICAgICAgICAgICk7DQotICAgIGlmIChFRklfRVJST1IgKFN0 YXR1cykpIHsNCi0gICAgICBnb3RvIEZhaWw7DQotICAgIH0NCi0NCi0gICAgLy8NCi0gICAgLy8g Mi4gRGVhY3RpdmF0ZSB0aGUgRGlzQm9vdE9wdGlvbiBhbmQgYWN0aXZhdGUgdGhlIEVuQm9vdE9w dGlvbg0KLSAgICAvLw0KLSAgICBmb3IgKEluZGV4ID0gMDsgSW5kZXggPCBEaXNCb290T3B0aW9u Q291bnQ7IEluZGV4KyspIHsNCi0gICAgICBVbmljb2RlU1ByaW50IChWYXJOYW1lLCBzaXplb2Yg KFZhck5hbWUpLCBMIkJvb3QlMDR4IiwgRGlzQm9vdE9wdGlvbltJbmRleF0pOw0KLSAgICAgIEdl dEVmaUdsb2JhbFZhcmlhYmxlMiAoVmFyTmFtZSwgKFZPSUQgKiopJkJvb3RPcHRpb25WYXIsICZP cHRpb25TaXplKTsNCi0gICAgICBpZiAoQm9vdE9wdGlvblZhciAhPSBOVUxMKSB7DQotICAgICAg ICBBdHRyaWJ1dGUgICA9IChVSU5UMzIgKilCb290T3B0aW9uVmFyOw0KLSAgICAgICAgKkF0dHJp YnV0ZSAmPSB+TE9BRF9PUFRJT05fQUNUSVZFOw0KLQ0KLSAgICAgICAgU3RhdHVzID0gZ1JULT5T ZXRWYXJpYWJsZSAoDQotICAgICAgICAgICAgICAgICAgICAgICAgVmFyTmFtZSwNCi0gICAgICAg ICAgICAgICAgICAgICAgICAmZ0VmaUdsb2JhbFZhcmlhYmxlR3VpZCwNCi0gICAgICAgICAgICAg ICAgICAgICAgICBWQVJfRkxBRywNCi0gICAgICAgICAgICAgICAgICAgICAgICBPcHRpb25TaXpl LA0KLSAgICAgICAgICAgICAgICAgICAgICAgIEJvb3RPcHRpb25WYXINCi0gICAgICAgICAgICAg ICAgICAgICAgICApOw0KL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KFZPSUQgKiopJkNvbmZp Z1JvdXRpbmcNCi0gICAgICAgICAgICAgICAgICApOw0KLSAgaWYgKEVGSV9FUlJPUiAoU3RhdHVz KSkgew0KLSAgICByZXR1cm4gU3RhdHVzOw0KLSAgfQ0KLQ0KLSAgLy8NCi0gIC8vIENvbnZlcnQg PENvbmZpZ1Jlc3A+IHRvIGJ1ZmZlciBkYXRhIGJ5IGhlbHBlciBmdW5jdGlvbiBDb25maWdUb0Js b2NrKCkNCi0gIC8vDQotICBDdXJyZW50TlZNYXBEYXRhID0gJm1MZWdhY3lCb290T3B0aW9uUHJp dmF0ZS0+TWFpbnRhaW5NYXBEYXRhLT5DdXJyZW50TnZEYXRhOw0KLSAgU3RhdHVzICAgICAgICAg ICA9IENvbmZpZ1JvdXRpbmctPkNvbmZpZ1RvQmxvY2sgKA0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgQ29uZmlnUm91dGluZywNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIENvbmZpZ3VyYXRpb24sDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoVUlOVDggKilDdXJyZW50TlZNYXBEYXRhLA0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJkJ1ZmZlclNpemUsDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBQcm9ncmVzcw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKTsNCi0gIEFTU0VSVF9FRklfRVJST1IgKFN0YXR1cyk7DQotDQotICBTdGF0 dXMgPSBVcGRhdGVCQlNPcHRpb24gKEN1cnJlbnROVk1hcERhdGEpOw0KLQ0KLSAgcmV0dXJuIFN0 YXR1czsNCi19DQotDQotLyoqDQotICBSZWZyZXNoIHRoZSBnbG9iYWwgVXBkYXRlRGF0YSBzdHJ1 Y3R1cmUuDQotDQotKiovDQotVk9JRA0KLVJlZnJlc2hMZWd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ICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX0lGUl9HVUlEX0xBQkVMKQ0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgbUxlZ2FjeVN0 YXJ0TGFiZWwtPkV4dGVuZE9wQ29kZSA9IEVGSV9JRlJfRVhURU5EX09QX0xBQkVMOw0KLQ0KLSAg bUxlZ2FjeVN0YXJ0TGFiZWwtPk51bWJlciA9IEZPUk1fQk9PVF9MRUdBQ1lfREVWSUNFX0lEOw0K LQ0KLSAgLy8NCi0gIC8vIENyZWF0ZSBIaWkgRXh0ZW5kIExhYmVsIE9wQ29kZSBhcyB0aGUgc3Rh cnQgb3Bjb2RlDQotICAvLw0KLSAgbUxlZ2FjeUVuZExhYmVsID0gKEVGSV9JRlJfR1VJRF9MQUJF TCAqKUhpaUNyZWF0ZUd1aWRPcENvZGUgKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbUxlZ2FjeUVuZE9wQ29kZUhhbmRsZSwNCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZnRWZpSWZyVGlhbm9HdWlkLA0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoRUZJX0lGUl9HVUlEX0xBQkVM KQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gIG1M ZWdhY3lFbmRMYWJlbC0+RXh0ZW5kT3BDb2RlID0gRUZJX0lGUl9FWFRFTkRfT1BfTEFCRUw7DQot DQotICBtTGVnYWN5RW5kTGFiZWwtPk51bWJlciA9IEZPUk1fQk9PVF9MRUdBQ1lfTEFCRUxfRU5E Ow0KLX0NCi0NCi0vKioNCi0gIEdldCB0aGUgTWVudSBFbnRyeS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FbnRyeTsN Ci19DQotDQotLyoqDQotICBDcmVhdGUgc3RyaW5nIHRva2VucyBmb3IgYSBtZW51IGZyb20gaXRz IGhlbHAgc3RyaW5ncyBhbmQgZGlzcGxheSBzdHJpbmdzDQotDQotICBAcGFyYW0gSGlpSGFuZGxl ICAgICAgICAgIEhpaSBIYW5kbGUgb2YgdGhlIHBhY2thZ2UgdG8gYmUgdXBkYXRlZC4NCi0gIEBw YXJhbSBNZW51T3B0aW9uICAgICAgICAgVGhlIE1lbnUgd2hvc2Ugc3RyaW5nIHRva2VucyBuZWVk IHRvIGJlIGNyZWF0ZWQNCi0NCi0qKi8NCi1WT0lEDQotQ3JlYXRlTGVnYWN5TWVudVN0cmluZ1Rv a2VuICgNCi0gIElOIEVGSV9ISUlfSEFORExFICAgICAgSGlpSGFuZGxlLA0KLSAgSU4gTEVHQUNZ X01FTlVfT1BUSU9OICAqTWVudU9wdGlvbg0KLSAgKQ0KLXsNCi0gIExFR0FDWV9NRU5VX0VOVFJZ ICAqTmV3TWVudUVudHJ5Ow0KLSAgVUlOVE4gICAgICAgICAgICAgIEluZGV4Ow0KLQ0KLSAgZm9y IChJbmRleCA9IDA7IEluZGV4IDwgTWVudU9wdGlvbi0+TWVudU51bWJlcjsgSW5kZXgrKykgew0K LSAgICBOZXdNZW51RW50cnkgPSBHZXRNZW51RW50cnkgKE1lbnVPcHRpb24sIEluZGV4KTsNCi0N Ci0gICAgTmV3TWVudUVudHJ5LT5EaXNwbGF5U3RyaW5nVG9rZW4gPSBIaWlTZXRTdHJpbmcgKA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSGlpSGFuZGxlLA0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5ld01lbnVFbnRyeS0+RGlzcGxheVN0cmluZywN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQotDQotICAgIGlmIChOVUxMID09 IE5ld01lbnVFbnRyeS0+SGVscFN0cmluZykgew0KLSAgICAgIE5ld01lbnVFbnRyeS0+SGVscFN0 cmluZ1Rva2VuID0gTmV3TWVudUVudHJ5LT5EaXNwbGF5U3RyaW5nVG9rZW47DQotICAgIH0gZWxz ZSB7DQotICAgICAgTmV3TWVudUVudHJ5LT5IZWxwU3RyaW5nVG9rZW4gPSBIaWlTZXRTdHJpbmcg KA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIaWlIYW5kbGUsDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsDQotICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5ld01lbnVFbnRyeS0+SGVscFN0cmluZywNCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICB9DQotICB9DQotfQ0KLQ0KLS8q Kg0KLSAgQ3JlYXRlIGEgZHluYW1pYyBwYWdlIHNvIHRoYXQgTGVnYWN5IERldmljZSBib290IG9y ZGVyDQotICBjYW4gYmUgc2V0IGZvciBzcGVjaWZpZWQgZGV2aWNlIHR5cGUuDQotDQotICBAcGFy YW0gVXBkYXRlUGFnZUlkICAgIFRoZSBmb3JtIElELiBJdCBhbHNvIHNwZWNpZmllcyB0aGUgbGVn YWN5IGRldmljZSB0eXBlLg0KLQ0KLQ0KLSoqLw0KLVZPSUQNCi1VcGRhdGVMZWdhY3lEZXZpY2VP cmRlclBhZ2UgKA0KLSAgSU4gVUlOVDE2ICBVcGRhdGVQYWdlSWQNCi0gICkNCi17DQotICBMRUdB Q1lfTUVOVV9PUFRJT04gICpPcHRpb25NZW51Ow0KLSAgTEVHQUNZX01F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i cmVhazsNCi0gICAgfQ0KLSAgfQ0KLQ0KLSAgaWYgKEluZGV4ICE9IE51bWJlcikgew0KLSAgICAv Lw0KLSAgICAvLyB0aGVyZSBpcyBjaGFuZ2UsIG5vdyBwcm9jZXNzDQotICAgIC8vDQotICAgIGlm ICgweEZGID09IE5ld1ZhbHVlKSB7DQotICAgICAgLy8NCi0gICAgICAvLyBUaGlzIGl0ZW0gd2ls bCBiZSBkaXNhYmxlDQotICAgICAgLy8gSnVzdCBtb3ZlIHRoZSBpdGVtcyBiZWhpbmQgdGhpcyBm b3J3YXJkIHRvIG92ZXJsYXAgaXQNCi0gICAgICAvLw0KLSAgICAgIFBvcyAgICAgICAgID0gT2xk VmFsdWUgLyA4Ow0KLSAgICAgIEJpdCAgICAgICAgID0gNyAtIChPbGRWYWx1ZSAlIDgpOw0KLSAg ICAgIERpc01hcFtQb3NdID0gKFVJTlQ4KShEaXNNYXBbUG9zXSB8IChVSU5UOCkoMSA8PCBCaXQp KTsNCi0gICAgICBmb3IgKEluZGV4MiA9IEluZGV4OyBJbmRleDIgPCBOdW1iZXIgLSAxOyBJbmRl eDIrKykgew0KLSAgICAgICAgQ3VycmVudFZhbFtJbmRleDJdID0gQ3VycmVudFZhbFtJbmRleDIg KyAxXTsNCi0gICAgICB9DQotDQotICAgICAgQ3VycmVudFZhbFtJbmRleDJdID0gMHhGRjsNCi0g ICAgfSBlbHNlIHsNCi0gICAgICBmb3IgKEluZGV4MiA9IDA7IEluZGV4MiA8IE51bWJlcjsgSW5k ZXgyKyspIHsNCi0gICAgICAgIGlmIChJbmRleDIgPT0gSW5kZXgpIHsNCi0gICAgICAgICAgY29u dGludWU7DQotICAgICAgICB9DQotDQotICAgICAgICBpZiAoRGVmYXVsdFtJbmRleDJdID09IE5l d1ZhbHVlKSB7DQotICAgICAgICAgIC8vDQotICAgICAgICAgIC8vIElmIE5ld1ZhbHVlIGlzIGlu IE9sZExlZ2FjeURldiBhcnJheQ0KLSAgICAgICAgICAvLyByZW1lbWJlciBpdHMgb2xkIHBvc2l0 aW9uDQotICAgICAgICAgIC8vDQotICAgICAgICAgIE5ld1ZhbHVlUG9zID0gSW5kZXgyOw0KLSAg ICAgICAgICBicmVhazsNCi0gICAgICAgIH0NCi0gICAgICB9DQotDQotICAgICAgaWYgKEluZGV4 MiAhPSBOdW1iZXIpIHsNCi0gICAgICAgIC8vDQotICAgICAgICAvLyBXZSB3aWxsIGNoYW5nZSBj dXJyZW50IGl0ZW0gdG8gYW4gZXhpc3RpbmcgaXRlbQ0KLSAgICAgICAgLy8gKEl0J3MgaGFyZCB0 byBkZXNjcmliZSBoZXJlLCBwbGVhc2UgcmVhZCBjb2RlLCBpdCdzIGxpa2UgYSBjeWNsZS1tb3Zp bmcpDQotICAgICAgICAvLw0KLSAgICAgICAgZm9yIChJbmRleDIgPSBOZXdWYWx1ZVBvczsgSW5k ZXgyICE9IEluZGV4Oykgew0KLSAgICAgICAgICBpZiAoTmV3VmFsdWVQb3MgPCBJbmRleCkgew0K LSAgICAgICAgICAgIEN1cnJlbnRWYWxbSW5kZXgyXSA9IERlZmF1bHRbSW5kZXgyICsgMV07DQot ICAgICAgICAgICAgSW5kZXgyKys7DQotICAgICAgICAgIH0gZWxzZSB7DQotICAgICAgICAgICAg Q3VycmVudFZhbFtJbmRleDJdID0gRGVmYXVsdFtJbmRleDIgLSAxXTsNCi0gICAgICAgICAgICBJ bmRleDItLTsNCi0gICAgICAgICAgfQ0KLSAgICAgICAgfQ0KLSAgICAgIH0gZWxzZSB7DQotICAg ICAgICAvLw0KLSAgICAgICAgLy8gSWYgTmV3VmFsdWUgaXMgbm90IGluIE9sZGxlZ2FjeURldiBh cnJheSwgd2UgYXJlIGNoYW5naW5nIHRvIGEgZGlzYWJsZWQgaXRlbQ0KLSAgICAgICAgLy8gc28g d2Ugc2hvdWxkIG1vZGlmeSBEaXNNYXAgdG8gcmVmbGVjdCB0aGUgY2hhbmdlDQotICAgICAgICAv Lw0KLSAgICAgICAgUG9zICAgICA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KLSAgVUlOVDggICAgICAgICAgICAgICAgICAgKlZhclRtcDsNCi0g IExFR0FDWV9ERVZfT1JERVJfRU5UUlkgICpEZXZPcmRlcjsNCi0gIFVJTlQxNiAgICAgICAgICAg ICAgICAgICpMZWdhY3lEZXY7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICBJbmRleDsNCi0g IExFR0FDWV9NRU5VX09QVElPTiAgICAgICpPcHRpb25NZW51Ow0KLSAgVUlOVDE2ICAgICAgICAg ICAgICAgICAgVmFyRGV2T3JkZXI7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICBQb3M7DQot ICBVSU5UTiAgICAgICAgICAgICAgICAgICBCaXQ7DQotICBVSU5UOCAgICAgICAgICAgICAgICAg ICAqRGlzTWFwOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgVG90YWxMZW5ndGg7DQotDQot ICBMZWdhY3lEZXYgID0gTlVMTDsNCi0gIE9wdGlvbk1lbnUgPSBOVUxMOw0KLQ0KLSAgRGlzTWFw ID0gWmVyb01lbSAobUxlZ2FjeUJvb3RPcHRpb25Qcml2YXRlLT5NYWludGFpbk1hcERhdGEtPkRp c2FibGVNYXAsIHNpemVvZiAobUxlZ2FjeUJvb3RPcHRpb25Qcml2YXRlLT5NYWludGFpbk1hcERh dGEtPkRpc2FibGVNYXApKTsNCi0NCi0gIC8vDQotICAvLyBHZXQgRGV2aWNlIE9yZGVyIGZyb20g dmFyaWFibGUNCi0gIC8vDQotICBHZXRWYXJpYWJsZTIgKFZBUl9MRUdBQ1lfREVWX09SREVSLCAm Z0VmaUxlZ2FjeURldk9yZGVyVmFyaWFibGVHdWlkLCAoVk9JRCAqKikmVmFyRGF0YSwgJlZhclNp emUpOw0KLSAgVmFyVG1wID0gVmFyRGF0YTsNCi0gIGlmIChOVUxMICE9IFZhckRhdGEpIHsNCi0g ICAgRGV2T3JkZXIgPSAoTEVHQUNZX0RFVl9PUkRFUl9FTlRSWSAqKVZhckRhdGE7DQotICAgIHdo aWxl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kVWX0RFVklDRToNCi0gICAgICAgICAgTGVnYWN5 RGV2ICA9IG1MZWdhY3lCb290T3B0aW9uUHJpdmF0ZS0+TWFpbnRhaW5NYXBEYXRhLT5Jbml0aWFs TnZEYXRhLkxlZ2FjeUJFVjsNCi0gICAgICAgICAgT3B0aW9uTWVudSA9ICZMZWdhY3lCRVZNZW51 Ow0KLSAgICAgICAgICBicmVhazsNCi0NCi0gICAgICAgIGNhc2UgQkJTX1VOS05PV046DQotICAg ICAgICBkZWZhdWx0Og0KLSAgICAgICAgICBBU1NFUlQgKEZBTFNFKTsNCi0gICAgICAgICAgREVC VUcgKChERUJVR19FUlJPUiwgIlVuc3VwcG9ydGVkIGRldmljZSB0eXBlIGZvdW5kIVxuIikpOw0K LSAgICAgICAgICBicmVhazsNCi0gICAgICB9DQotDQotICAgICAgLy8NCi0gICAgICAvLyBDcmVh dGUgb25lb2YgdGFnIGhlcmUgZm9yIEZEL0hEL0NEICMxICMyDQotICAgICAgLy8NCi0gICAgICBm b3IgKEluZGV4ID0gMDsgSW5kZXggPCBPcHRpb25NZW51LT5NZW51TnVtYmVyOyBJbmRleCsrKSB7 DQotICAgICAgICBUb3RhbExlbmd0aCA9IHNpemVvZiAoQkJTX1RZUEUpICsgc2l6ZW9mIChVSU5U MTYpICsgSW5kZXggKiBzaXplb2YgKFVJTlQxNik7DQotICAgICAgICBWYXJEZXZPcmRlciA9ICoo VUlOVDE2ICopKChVSU5UOCAqKURldk9yZGVyICsgVG90YWxMZW5ndGgpOw0KLQ0KLSAgICAgICAg aWYgKDB4RkYwMCA9PSAoVmFyRGV2T3JkZXIgJiAweEZGMDApKSB7DQotICAgICAgICAgIExlZ2Fj eURldltJbmRleF0gPSAweEZGOw0KLSAgICAgICAgICBQb3MgICAgICAgICAgICAgID0gKFZhckRl dk9yZGVyICYgMHhGRikgLyA4Ow0KLSAgICAgICAgICBCaXQgICAgICAgICAgICAgID0gNyAtICgo VmFyRGV2T3JkZXIgJiAweEZGKSAlIDgpO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gICAqTmV3TWVudUVu dHJ5Ow0KLSAgTEVHQUNZX0RFVklDRV9DT05URVhUICAgICAgICAgKk5ld0xlZ2FjeURldkNvbnRl eHQ7DQotICBFRklfQk9PVF9NQU5BR0VSX0xPQURfT1BUSU9OICAqQm9vdE9wdGlvbjsNCi0gIFVJ TlROICAgICAgICAgICAgICAgICAgICAgICAgIEJvb3RPcHRpb25Db3VudDsNCi0gIFVJTlQxNiAg ICAgICAgICAgICAgICAgICAgICAgIEluZGV4Ow0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAg ICAgICAgRkROdW07DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICBIRE51bTsNCi0g IFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgIENETnVtOw0KLSAgVUlOVE4gICAgICAgICAg ICAgICAgICAgICAgICAgTkVUTnVtOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAg QkVWTnVtOw0KLQ0KLSAgLy8NCi0gIC8vIEluaXRpYWxpemUgQmJzIFRhYmxlIENvbnRleHQgZnJv bSBCQlMgaW5mbyBkYXRhDQotICAvLw0KLSAgSW5pdGlhbGl6ZUxpc3RIZWFkICgmTGVnYWN5RkRN ZW51LkhlYWQpOw0KLSAgSW5pdGlhbGl6ZUxpc3RIZWFkICgmTGVnYWN5SERNZW51LkhlYWQpOw0K LSAgSW5pdGlhbGl6ZUxpc3RIZWFkICgmTGVnYWN5Q0RNZW51LkhlYWQpOw0KLSAgSW5pdGlhbGl6 ZUxpc3RIZWFkICgmTGVnYWN5TkVUTWVudS5IZWFkKTsNCi0gIEluaXRpYWxpemVMaXN0SGVhZCAo JkxlZ2FjeUJFVk1lbnUuSGVhZCk7DQotDQotICBGRE51bSAgPSAwOw0KLSAgSEROdW0gID0gMDsN Ci0gIENETnVtICA9IDA7DQotICBORVROdW0gPSAwOw0KLSAgQkVWTnVtID0gMDsNCi0NCi0gIEVm aUJvb3RNYW5hZ2VyQ29ubmVjdEFsbCAoKTsN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ICZnRWZpSGlpQ29uZmlnQWNjZXNzUHJvdG9jb2xHdWlkLA0KLSAgICAg ICAgICAgICAgICAgICAgJkxlZ2FjeUJvb3RPcHRpb25EYXRhLT5Db25maWdBY2Nlc3MsDQotICAg ICAgICAgICAgICAgICAgICBOVUxMDQotICAgICAgICAgICAgICAgICAgICApOw0KLSAgICBBU1NF UlRfRUZJX0VSUk9SIChTdGF0dXMpOw0KLQ0KLSAgICAvLw0KLSAgICAvLyBQdWJsaXNoIG91ciBI SUkgZGF0YQ0KLSAgICAvLw0KLSAgICBMZWdhY3lCb290T3B0aW9uRGF0YS0+SGlpSGFuZGxlID0g SGlpQWRkUGFja2FnZXMgKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmbUxlZ2FjeUJvb3RPcHRpb25HdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBMZWdhY3lCb290T3B0aW9uRGF0YS0+RHJpdmVySGFuZGxlLA0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMZWdhY3lCb290TWFpbnRVaVZmckJpbiwN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTGVnYWN5Qm9vdE1haW50 VWlMaWJTdHJpbmdzLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBO VUxMDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQotICAgIEFT U0VSVCAoTGVnYWN5Qm9vdE9wdGlvbkRhdGEtPkhpaUhhbmRsZSAhPSBOVUxMKTsNCi0NCi0gICAg bUxlZ2FjeUJvb3RPcHRpb25Qcml2YXRlID0gTGVnYWN5Qm9vdE9wdGlvbkRhdGE7DQotICB9DQot DQotICByZXR1cm4gRUZJX1NVQ0NFU1M7DQotfQ0KLQ0KLS8qKg0KLSAgRGVzdHJ1Y3RvciBvZiBD dXN0b21pemVkIERpc3BsYXkgTG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