From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cam-smtp0.cambridge.arm.com (cam-smtp0.cambridge.arm.com [217.140.106.54]) by mx.groups.io with SMTP id smtpd.web12.22255.1593612373212479498 for ; Wed, 01 Jul 2020 07:06:13 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.106.54, mailfrom: pierre.gondois@arm.com) Received: from E119881.Arm.com (E119881.Arm.com [10.1.197.28]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id 061E69Zq029795; Wed, 1 Jul 2020 15:06:11 +0100 From: "PierreGondois" To: devel@edk2.groups.io Cc: Pierre Gondois , sami.mujawar@arm.com, tomas.pilar@arm.com, bob.c.feng@intel.com, liming.gao@intel.com, nd@arm.com Subject: [PATCH v5 4/5] BaseTools: Compile AML bytecode arrays into .obj file Date: Wed, 1 Jul 2020 15:06:03 +0100 Message-Id: <20200701140604.5292-5-pierre.gondois@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20200701140604.5292-1-pierre.gondois@arm.com> References: <20200701140604.5292-1-pierre.gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: base64 RnJvbTogUGllcnJlIEdvbmRvaXMgPHBpZXJyZS5nb25kb2lzQGFybS5jb20+CgpUaGUgQW1sVG9I ZXggc2NyaXB0IGFuZCBQb3NpeC9XaW5kb3dzTGlrZSB3cmFwcGVycyBjb252ZXJ0CmFuIEFNTCBm aWxlIHRvIGEgLmhleCBmaWxlLCBjb250YWluaW5nIGEgQyBhcnJheSBzdG9yaW5nCkFNTCBieXRl Y29kZS4gVGhpcyAiLmhleCIgZmlsZSBjYW4gdGhlbiBiZSBpbmNsdWRlZCBpbiBhCkMgZmlsZSwg YWxsb3dpbmcgdG8gYWNjZXNzIHRoZSBBTUwgYnl0ZWNvZGUgZnJvbSB0aGlzIEMKZmlsZS4KClRo ZSBFREsyIGJ1aWxkIHN5c3RlbSBkb2Vzbid0IGFsbG93IHR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bnRh aW5pbmcgcGFyc2VkIHZhbHVlcy4NCiAjDQogZGVmIFBhcnNlQXJncygpOg0KICAgICAjIEluaXRp YWxpemUgdGhlIHBhcnNlci4NCi0gICAgUGFyc2VyID0gYXJncGFyc2UuQXJndW1lbnRQYXJzZXIo DQotICAgICAgZGVzY3JpcHRpb249IkNvbnZlcnQgYW4gQU1MIGZpbGUgdG8gYSAuaGV4IGZpbGUg Y29udGFpbmluZyB0aGUgQU1MICIgKyBcDQotICAgICAgICAgICAgICAgICAgImJ5dGVjb2RlIHN0 b3JlZCBpbiBhIEMgYXJyYXkuIEJ5IGRlZmF1bHQsICIgKyBcDQotICAgICAgICAgICAgICAgICAg IlwiVGFibGVzXFxEc2R0LmFtbFwiIHdpbGwgZ2VuZXJhdGUiICsgXA0KLSAgICAgICAgICAgICAg ICAgICJcIlRhYmxlc1xcRHNkdC5oZXhcIi4gXCJUYWJsZXNcXERzZHQuaGV4XCIgd2lsbCAiICsg XA0KLSAgICAgICAgICAgICAgICAgICJjb250YWluIGEgQyBhcnJheSBuYW1lZCBcImRzZHRfYW1s X2NvZGVcIiB0aGF0ICIgKyBcDQotICAgICAgICAgICAgICAgICAgImNvbnRhaW5zIHRoZSBBTUwg Ynl0ZWNvZGUuIg0KLSAgICAgICkNCisgICAgUGFyc2VyID0gYXJncGFyc2UuQXJndW1lbnRQYXJz ZXIoZGVzY3JpcHRpb249X19kZXNjcmlwdGlvbl9fKQ0KIA0KICAgICAjIERlZmluZSB0aGUgcG9z c2libGUgYXJndW1lbnRzLg0KLSAgICBQYXJzZXIuYWRkX2FyZ3VtZW50KA0KLSAgICAgIGRlc3Q9 IklucHV0RmlsZSIsDQotICAgICAgaGVscD0iUGF0aCB0byBhbiBpbnB1dCBBTUwgZmlsZSB0byBn ZW5lcmF0ZSBhIC5oZXggZmlsZSBmcm9tLiINCi0gICAgICApDQotICAgIFBhcnNlci5hZGRfYXJn dW1lbnQoDQotICAgICAgIi1vIiwgIi0tb3V0LWRpciIsIGR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gT3V0cHV0RmlsZSwgQmFz ZU5hbWUpOg0KK2RlZiBBbWxUb0MoSW5wdXRGaWxlLCBPdXRwdXRGaWxlLCBCYXNlTmFtZSk6DQog DQotICAgIE1hY3JvTmFtZSA9ICJfX3t9X0hFWF9fIi5mb3JtYXQoQmFzZU5hbWUudXBwZXIoKSkN CiAgICAgQXJyYXlOYW1lID0gQmFzZU5hbWUubG93ZXIoKSArICJfYW1sX2NvZGUiDQorICAgIEZp bGVIZWFkZXIgPVwNCisiIiINCisvLyBUaGlzIGZpbGUgaGFzIGJlZW4gZ2VuZXJhdGVkIGZyb206 DQorLy8gICAtUHl0aG9uIHNjcmlwdDoge30NCisvLyAgIC1JbnB1dCBBTUwgZmlsZToge30NCisN CisiIiINCiANCiAgICAgd2l0aCBvcGVuKElucHV0RmlsZSwgInJiIikgYXMgZkluLCBvcGVuKE91 dHB1dEZpbGUsICJ3IikgYXMgZk91dDoNCiAgICAgICAgICMgV3JpdGUgaGVhZGVyLg0KLSAgICAg ICAgZk91dC53cml0ZSgiLy8gVGhpcyBmaWxlIGhhcyBiZWVuIGdlbmVyYXRlZCBmcm9tOlxuIiAr IFwNCi0gICAgICAgICAgICAgICAgICAgIi8vIFx0UHl0aG9uIHNjcmlwdDogIiArIFwNCi0gICAg ICAgICAgICAgICAgICAgb3MucGF0aC5hYnNwYXRoKF9fZmlsZV9fKSArICJcbiIgKyBcDQotICAg ICAgICAgICAgICAgICAgICIvLyBcdElucHV0IEFNTCBmaWxlOiAiICsgXA0KLSAgICAgICAgICAg ICAgICAgICBvcy5wYXRoLmFic3BhdGgoSW5wdXRGaWxlKSArICJcblxuIiArIFwNCi0gICAgICAg ICAgICAgICAgICAgIiNpZm5kZWYge31cbiIuZm9ybWF0KE1hY3JvTmFtZSkgKyBcDQotICAgICAg ICAgICAgICAgICAgICIjZGVmaW5lIHt9XG5cbiIuZm9ybWF0KE1hY3JvTmFtZSkNCi0gICAgICAg ICAgICAgICAgICAgKQ0KKyAgICAgICAgZk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