From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web10.2948.1622060979401390142 for ; Wed, 26 May 2021 13:29:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Sk2UgYQ3; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622060978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FJylbZifM8ujRmyevAJ6b1eXTq1JypRMb4YJimNJD68=; b=Sk2UgYQ31tILHdpROHe37oEF8ammosQ2Dz1ztUSYKbJ8SUphEKPfYhi3bl3oafYdSI0d8U gW/4mG+IomAMFA8UvdWU9M7oCXmbRGQrmPHDmUcM0Hf+Xie45/d5o1z9AWd79Vos1ynVrw Nr0zasWsBy53sFbJ2zqGQ8lit6IApaA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-557-5EvHoYS4PC6wyLd811Dobg-1; Wed, 26 May 2021 16:29:36 -0400 X-MC-Unique: 5EvHoYS4PC6wyLd811Dobg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 23E1F107ACE3; Wed, 26 May 2021 20:29:35 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-61.ams2.redhat.com [10.36.114.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C0DB60CCD; Wed, 26 May 2021 20:29:32 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: Anthony Perard , Ard Biesheuvel , Jordan Justen , Julien Grall , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 14/43] OvmfPkg/XenAcpiPlatformDxe: remove QEMU fw_cfg dependency Date: Wed, 26 May 2021 22:14:17 +0200 Message-Id: <20210526201446.12554-15-lersek@redhat.com> In-Reply-To: <20210526201446.12554-1-lersek@redhat.com> References: <20210526201446.12554-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 VGhlIFFlbXVEZXRlY3RlZCgpIGZ1bmN0aW9uIHdyYXBzIFFlbXVGd0NmZ0lzQXZhaWxhYmxlKCk7 IGl0IGFsd2F5cyBmYWlscwpvbiBYZW4uIEJlY2F1c2Ugb2YgdGhhdCwgd2UgY2FuIGVsaW1pbmF0 ZSB0aGUgUWVtdURldGVjdGVkKCkgY2FsbCBpdHNlbGYKZnJvbSB0aGUgWGVuIEFDUEkgcGxhdGZv cm0gZHJpdmVyLCBhbmQgdGhlbiB0aGUgcmVzdCBvZiAiUWVtdS5jIiBiZWNvbWVzCnVzZWxlc3Mg LS0gdGhlIHdvcmtob3JzZSBmdW5jdGlvbiBvZiB0aGF0IHNvdXJjZSBmaWxlIGlzClFlbXVJbnN0 YWxsQWNwaVRhYmxlKCksIHdoaWNoIHdlIG5vIGxvbmdlciBjYWxsLgoKUmVtb3ZlIGFueSBkZXBl bmRlbmNpZXMgdGhhdCBhcmUgbm8gbG9uZ2VyIG5lZWRlZCBieSB0aGUKWGVuQWNwaVBsYXRmb3Jt RHhlIGRyaXZlci4KCkNjOiBBbnRob255IFBlcmFyZCA8YW50aG9ueS5wZXJh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gICAgICAgICAg ICAgICAgICAgICAgVGFibGVIYW5kbGU7DQogICBVSU5UMzIgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgRnZTdGF0dXM7DQogICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgVGFibGVTaXplOw0KICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNp emU7DQotICBFRklfQUNQSV9UQUJMRV9JTlNUQUxMX0FDUElfVEFCTEUgICAgVGFibGVJbnN0YWxs RnVuY3Rpb247DQogDQogICBJbnN0YW5jZSAgICAgPSAwOw0KICAgQ3VycmVudFRhYmxlID0gTlVM TDsNCiAgIFRhYmxlSGFuZGxlICA9IDA7DQogDQotICBpZiAoUWVtdURldGVjdGVkICgpKSB7DQot ICAgIFRhYmxlSW5zdGFsbEZ1bmN0aW9uID0gUWVtdUluc3RhbGxBY3BpVGFibGU7DQotICB9IGVs c2Ugew0KLSAgICBUYWJsZUluc3RhbGxGdW5jdGlvbiA9IEluc3RhbGxBY3BpVGFibGU7DQotICB9 DQotDQogICAvLw0KICAgLy8gc2V0IEZ3Vm9sIChhbmQgdXNlIGFuIEFTU0VSVCgpIGJlbG93KSB0 byBzdXBwcmVzcyBpbmNvcnJlY3QNCiAgIC8vIGNvbXBpbGVyL2FuYWx5emVyIHdhcm5pbmdzDQog ICAvLw0KICAgRndWb2wgPSBOVUxMOw0KICAgLy8NCkBAIC0yMDQsMTMgKzE5NywxMyBAQCBJbnN0 YWxsT3ZtZkZ2VGFibGVzICgKICAgICAgIFRhYmxlU2l6ZSA9ICgoRUZJX0FDUElfREVTQ1JJUFRJ T05fSEVBREVSICopIEN1cnJlbnRUYWJsZSktPkxlbmd0aDsNCiAgICAgICBBU1NFUlQgKFNpemUg Pj0gVGFibGVTaXplKTsNCiANCiAgICAgICAvLw0KICAgICAgIC8vIEluc3RhbGwgQUNQSSB0YWJs ZQ0KICAgICAgIC8vDQotICAgICAgU3RhdHVzID0gVGFibGVJbnN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mIDB4NTU1NSk7DQotICBNYXNrID0gKChNYXNrICYgMHhDQ0NDKSA+PiAyKSArIChN YXNrICYgMHgzMzMzKTsNCi0gIE1hc2sgPSAoKE1hc2sgJiAweEYwRjApID4+IDQpICsgKE1hc2sg JiAweDBGMEYpOw0KLSAgTWFzayA9ICgoTWFzayAmIDB4RkYwMCkgPj4gOCkgKyAoTWFzayAmIDB4 MDBGRik7DQotDQotICByZXR1cm4gTWFzazsNCi19DQotDQotDQotU1RBVElDDQotRUZJX1NUQVRV Uw0KLUVGSUFQSQ0KLVFlbXVJbnN0YWxsQWNwaU1hZHRUYWJsZSAoDQotICBJTiAgIEVGSV9BQ1BJ X1RBQkxFX1BST1RPQ09MICAgICAgICpBY3BpUHJvdG9jb2wsDQotICBJTiAgIFZPSUQgICAgICAg ICAgICAgICAgICAgICAgICAgICpBY3BpVGFibGVCdWZmZXIsDQotICBJTiAgIFVJTlROICAgICAg ICAgICAgICAgICAgICAgICAgIEFjcGlUYWJsZUJ1ZmZlclNpemUsDQotICBPVVQgIFVJTlROICAg ICAgICAgICAgICAgICAgICAgICAgICpUYWJsZUtleQ0KLSAgKQ0KLXsNCi0gIFVJTlROICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDcHVDb3VudDsNCi0gIFVJ TlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQY2lMaW5r SXNvQ291bnQ7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgTmV3QnVmZmVyU2l6ZTsNCi0gIEVGSV9BQ1BJXzFfMF9NVUxUSVBMRV9BUElDX0RF U0NSSVBUSU9OX1RBQkxFX0hFQURFUiAqTWFkdDsNCi0gIEVGSV9BQ1BJXzFfMF9QUk9DRVNTT1Jf TE9DQUxfQVBJQ19TVFJVQ1RVUkUgICAgICAgICAqTG9jYWxBcGljOw0KLSAgRUZJX0FDUElfMV8w X0lPX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ml0czE2IChQY2RHZXQxNiAoUGNk ODI1OUxlZ2FjeU1vZGVFZGdlTGV2ZWwpKTsNCi0NCi0gIE5ld0J1ZmZlclNpemUgPSAxICAgICAg ICAgICAgICAgICAgICAgKiBzaXplb2YgKCpNYWR0KSArDQotICAgICAgICAgICAgICAgICAgQ3B1 Q291bnQgICAgICAgICAgICAgICogc2l6ZW9mICgqTG9jYWxBcGljKSArDQotICAgICAgICAgICAg ICAgICAgMSAgICAgICAgICAgICAgICAgICAgICogc2l6ZW9mICgqSW9BcGljKSArDQotICAgICAg ICAgICAgICAgICAgKDEgKyBQY2lMaW5rSXNvQ291bnQpICogc2l6ZW9mICgqSXNvKSArDQotICAg ICAgICAgICAgICAgICAgMSAgICAgICAgICAgICAgICAgICAgICogc2l6ZW9mICgqTG9jYWxBcGlj Tm1pKTsNCi0NCi0gIE1hZHQgPSBBbGxvY2F0ZVBvb2wgKE5ld0J1ZmZlclNpemUpOw0KLSAgaWYg KE1hZHQgPT0gTlVMTCkgew0KLSAgICByZXR1cm4gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQotICB9 DQotDQotICBDb3B5TWVtICgmKE1hZHQtPkhlYWRlciksIEFjcGlUYWJsZUJ1ZmZlciwgc2l6ZW9m IChFRklfQUNQSV9ERVNDUklQVElPTl9IRUFERVIpKTsNCi0gIE1hZHQtPkhlYWRlci5MZW5ndGgg ICAgPSAoVUlOVDMyKSBOZXdCdWZmZXJTaXplOw0KLSAgTWFkdC0+TG9jYWxBcGljQWRkcmVzcyA9 IFBjZEdldDMyIChQY2RDcHVMb2NhbEFwaWNCYXNlQWRkcmVzcyk7DQotICBNYWR0LT5GbGFncyAg ICAgICAgICAgID0gRUZJX0FDUElfMV8wX1BDQVRfQ09NUEFUOw0KLSAgUHRyID0gTWFkdCArIDE7 DQotDQotICBMb2NhbEFwaWMgPSBQdHI7DQotICBmb3IgKExvb3AgPSAwOyBMb29wIDwgQ3B1Q291 bnQ7ICsrTG9vcCkgew0KLSAgICBMb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UkNFX09WRVJSSURFOw0K LSAgSXNvLT5MZW5ndGggICAgICAgICAgICAgICAgICAgICAgPSBzaXplb2YgKCpJc28pOw0KLSAg SXNvLT5CdXMgICAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwOyAvLyBJU0ENCi0gIElzby0+ U291cmNlICAgICAgICAgICAgICAgICAgICAgID0gMHgwMDsgLy8gSVJRMA0KLSAgSXNvLT5HbG9i YWxTeXN0ZW1JbnRlcnJ1cHRWZWN0b3IgPSAweDAwMDAwMDAyOw0KLSAgSXNvLT5GbGFncyAgICAg ICAgICAgICAgICAgICAgICAgPSAweDAwMDA7IC8vIENvbmZvcm1zIHRvIHNwZWNzIG9mIHRoZSBi dXMNCi0gICsrSXNvOw0KLQ0KLSAgLy8NCi0gIC8vIFNldCBMZXZlbC10cmlnZ2VyZWQsIEFjdGl2 ZSBIaWdoIGZvciBhbGwgcG9zc2libGUgUENJIGxpbmsgdGFyZ2V0cy4NCi0gIC8vDQotICBmb3Ig KExvb3AgPSAwOyBMb29wIDwgMTY7ICsrTG9vcCkgew0KLSAgICBpZiAoKFBjZEdldDE2IChQY2Q4 MjU5TGVnYWN5TW9kZUVkZ2VMZXZlbCkgJiAoMSA8PCBMb29wKSkgPT0gMCkgew0KLSAgICAgIGNv bnRpbnVlOw0KLSAgICB9DQotICAgIElzby0+VHlwZSAgICAgICAgICAgICAgICAgICAgICAgID0g RUZJX0FDUElfMV8wX0lOVEVSUlVQVF9TT1VSQ0VfT1ZFUlJJREU7DQotICAgIElzby0+TGVuZ3Ro ICAgICAgICAgICAgICAgICAgICAgID0gc2l6ZW9mICgqSXNvKTsNCi0gICAgSXNvLT5CdXMgICAg ICAgICAgICAgICAgICAgICAgICAgPSAweDAwOyAvLyBJU0ENCi0gICAgSXNvLT5Tb3VyY2UgICAg ICAgICAgICAgICAgICAgICAgPSAoVUlOVDgpIExvb3A7DQotICAgIElzby0+R2xvYmFsU3lzdGVt SW50ZXJydXB0VmVjdG9yID0gKFVJTlQzM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dldDMyIChQY2RPdm1m RmRCYXNlQWRkcmVzcykpIHsNCi0gICAgICAgIHN3aXRjaCAoRGVzYy0+R2NkTWVtb3J5VHlwZSkg ew0KLSAgICAgICAgICBjYXNlIEVmaUdjZE1lbW9yeVR5cGVOb25FeGlzdGVudDoNCi0gICAgICAg ICAgICBicmVhazsNCi0NCi0gICAgICAgICAgY2FzZSBFZmlHY2RNZW1vcnlUeXBlUmVzZXJ2ZWQ6 DQotICAgICAgICAgIGNhc2UgRWZpR2NkTWVtb3J5VHlwZVN5c3RlbU1lbW9yeToNCi0gICAgICAg ICAgICBpZiAoTm9uTW1pbzMyTWF4RXhjbFRvcCA8IEV4Y2xUb3ApIHsNCi0gICAgICAgICAgICAg IE5vbk1taW8zMk1heEV4Y2xUb3AgPSBFeGNsVG9wOw0KLSAgICAgICAgICAgIH0NCi0gICAgICAg ICAgICBicmVhazsNCi0NCi0gICAgICAgICAgY2FzZSBFZmlHY2RNZW1vcnlUeXBlTWVtb3J5TWFw cGVkSW86DQotICAgICAgICAgICAgaWYgKE1taW8zMk1pbkJhc2UgPiBEZXNjLT5CYXNlQWRkcmVz cykgew0KLSAgICAgICAgICAgICAgTW1pbzMyTWluQmFzZSA9IERlc2MtPkJhc2VBZGRyZXNzOw0K LSAgICAgICAgICAgIH0NCi0gICAgICAgICAgICBpZiAoTW1pbzMyTWF4RXhjbFRvcCA8IEV4Y2xU b3ApIHsNCi0gICAgICAgICAgICAgIE1taW8zMk1heEV4Y2xUb3AgPSBFeGNsVG9wOw0KLSAgICAg ICAgICAgIH0NCi0gICAgICAgICAgICBicmVhazsNCi0NCi0gICAgICAgICAgZGVmYXVsdDoNCi0g ICAgICAgICAgICBBU1NFUlQoMCk7DQotICAgICAgICB9DQotICAgICAgfQ0KLSAgICB9DQotDQot ICAgIGlmIChNbWlvMzJNaW5CYXNlIDwgTm9uTW1pbzMyTWF4RXhjbFRvcCkgew0KLSAgICAgIE1t aW8zMk1pbkJhc2UgPSBOb25NbWlvMzJN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bGQgIk9wZXJhdGlvblJlZ2lvbihGV0RULCBTeXN0ZW1NZW1vcnksIDB4MTIz NDU2NzgsIDB4ODc2NTQzMjEpIg0KLSAgICAgICAgLy8NCi0gICAgICAgICooU3NkdFB0cisrKSA9 IDB4NUI7IC8vIEV4dE9wUHJlZml4DQotICAgICAgICAqKFNzZHRQdHIrKykgPSAweDgwOyAvLyBP cFJlZ2lvbk9wDQotICAgICAgICAqKFNzZHRQdHIrKykgPSAnRic7DQotICAgICAgICAqKFNzZHRQ dHIrKykgPSAnVyc7DQotICAgICAgICAqKFNzZHRQdHIrKykgPSAnRCc7DQotICAgICAgICAqKFNz ZHRQdHIrKykgPSAnVCc7DQotICAgICAgICAqKFNzZHRQdHIrKykgPSAweDAwOyAvLyBTeXN0ZW1N ZW1vcnkNCi0gICAgICAgICooU3NkdFB0cisrKSA9IDB4MEM7IC8vIERXb3JkUHJlZml4DQotDQot ICAgICAgICAvLw0KLSAgICAgICAgLy8gbm8gdmlydHVhbCBhZGRyZXNzaW5nIHlldCwgdGFrZSB0 aGUgZm91ciBsZWFzdCBzaWduaWZpY2FudCBieXRlcw0KLSAgICAgICAgLy8NCi0gICAgICAgIENv cHlNZW0oU3NkdFB0ciwgJkZ3RGF0YSwgNCk7DQotICAgICAgICBTc2R0UHRyICs9IDQ7DQotDQot ICAgICAgICAqKFNzZHRQdHIrKykgPSAweDBDOyAvLyBEV29yZFByZWZpeA0KLQ0KLSAgICAgICAg KihVSU5UMzIqKSBTc2R0UHRyID0gc2l6ZW9mICgqRndEYXRhKTsNCi0gICAgICAgIFNzZHRQdHIg Kz0gNDsNCi0NCi0gICAgICAgIC8vDQotICAgICAgICAvLyBhZGQgc3VzcGVuZCBzeXN0ZW0gc3Rh dGVzDQotICAgICAgICAvLw0KLSAgICAgICAgQ29weU1lbSAoU3NkdFB0ciwgJlN1c3BlbmRUb1Jh bSwgU3VzcGVuZFRvUmFtU2l6ZSk7DQotICAgICAgICBTc2R0UHRyICs9IFN1c3Blbm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