From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X4R6o-0002xx-VY for barebox@lists.infradead.org; Tue, 08 Jul 2014 08:50:48 +0000 From: Sascha Hauer Date: Tue, 8 Jul 2014 10:50:13 +0200 Message-Id: <1404809417-21477-18-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1404809417-21477-1-git-send-email-s.hauer@pengutronix.de> References: <1404809417-21477-1-git-send-email-s.hauer@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 17/21] Add initial EFI architecture support To: barebox@lists.infradead.org VGhpcyBhZGRzIHN1cHBvcnQgZm9yIHJ1bm5pbmcgYmFyZWJveCBpbiBhbiBFRkkgZW52aXJvbm1l bnQKb24gWDg2IFBDIGhhcmR3YXJlLgoKU2lnbmVkLW9mZi1ieTogU2FzY2hhIEhhdWVyIDxzLmhh dWVyQHBlbmd1dHJvbml4LmRlPgotLS0KIGFyY2gvZWZpL0tjb25maWcgICAgICAgICAgICAgICAg ICAgICAgICAgICB8ICAgNDcgKwogYXJjaC9lZmkvTWFrZWZpbGUgICAgICAgICAgICAgICAgICAg ICAgICAgIHwgICA0MSArCiBhcmNoL2VmaS9jb25maWdzL2VmaV9kZWZjb25maWcgICAgICAgICAg ICAgfCAgIDczICsrCiBhcmNoL2VmaS9lZmkvTWFrZWZpbGUgICAgICAgICAgICAgICAgICAgICAg fCAgICAyICsKIGFyY2gvZWZpL2VmaS9jbG9ja3NvdXJjZS5jICAgICAgICAgICAgICAgICB8ICAg NjAgKysKIGFyY2gvZWZpL2VmaS9lZmktYmxvY2staW8uYyAgICAgICAgICAgICAgICB8ICAxNzQg KysrKwogYXJjaC9lZmkvZWZpL2VmaS1kZXZpY2UuYyAgICAgICAgICAgICAgICAgIHwgIDM0OCAr KysrKysrCiBhcmNoL2VmaS9lZmkvZWZpLWltYWdlLmMgICAgICAgICAgICAgICAgICAgfCAgMTA1 ICsrKwogYXJjaC9lZmkvZWZpL2VmaS5jICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDM0MiAr KysrKysrCiBhcmNoL2VmaS9lZmkvZW52LWVmaS9uZXR3b3JrL2V0aDAtZGlzY292ZXIgfCAgICA1 ICsKIGFyY2gvZWZpL2luY2x1ZGUvYXNtL2JhcmVib3guaCAgICAgICAgICAgICB8ICAgIDEgKwog YXJjaC9lZmkvaW5jbHVkZS9hc20vYml0b3BzLmggICAgICAgICAgICAgIHwgICAxNSArCiBhcmNo L2VmaS9pbmNsdWRlL2FzbS9ieXRlb3JkZXIuaCAgICAgICAgICAgfCAgICA4ICsKIGFyY2gvZWZp L2luY2x1ZGUvYXNtL2NvbW1vbi5oICAgICAgICAgICAgICB8ICAgIDQgKwogYXJjaC9lZmkvaW5j bHVkZS9hc20vZG1hLmggICAgICAgICAgICAgICAgIHwgICAxMyArCiBhcmNoL2VmaS9pbmNsdWRl L2FzbS9lbGYuaCAgICAgICAgICAgICAgICAgfCAgIDYwICsrCiBhcmNoL2VmaS9pbmNsdWRlL2Fz bS9pby5oICAgICAgICAgICAgICAgICAgfCAgIDU1ICsrCiBhcmNoL2VmaS9pbmNsdWRlL2FzbS9w b3NpeF90eXBlcy5oICAgICAgICAgfCAgIDkzICsrCiBhcmNoL2VmaS9pbmNsdWRlL2FzbS9zZWN0 aW9ucy5oICAgICAgICAgICAgfCAgICAxICsKIGFyY2gvZWZpL2luY2x1ZGUvYXNtL3N0cmluZy5o ICAgICAgICAgICAgICB8ICAgIDEgKwogYXJjaC9lZmkvaW5jbHVkZS9hc20vc3dhYi5oICAgICAg ICAgICAgICAgIHwgICAgNiArCiBhcmNoL2VmaS9pbmNsdWRlL2FzbS90eXBlcy5oICAgICAgICAg ICAgICAgfCAgIDczICsrCiBhcmNoL2VmaS9pbmNsdWRlL2FzbS91bmFsaWduZWQuaCAgICAgICAg ICAgfCAgIDE5ICsKIGFyY2gvZWZpL2luY2x1ZGUvbWFjaC9kZWJ1Z19sbC5oICAgICAgICAgICB8 ICAgMjAgKwogYXJjaC9lZmkvaW5jbHVkZS9tYWNoL2VmaS1kZXZpY2UuaCAgICAgICAgIHwgICA0 NSArCiBhcmNoL2VmaS9pbmNsdWRlL21hY2gvZWZpLmggICAgICAgICAgICAgICAgfCAgIDI0ICsK IGFyY2gvZWZpL2xpYi8uZ2l0aWdub3JlICAgICAgICAgICAgICAgICAgICB8ICAgIDIgKwogYXJj aC9lZmkvbGliL01ha2VmaWxlICAgICAgICAgICAgICAgICAgICAgIHwgICAgNCArCiBhcmNoL2Vm aS9saWIvY3J0MC1lZmktaWEzMi5TICAgICAgICAgICAgICAgfCAgIDc2ICsrCiBhcmNoL2VmaS9s aWIvY3J0MC1lZmkteDg2XzY0LlMgICAgICAgICAgICAgfCAgIDc1ICsrCiBhcmNoL2VmaS9saWIv ZWxmX2lhMzJfZWZpLmxkcy5TICAgICAgICAgICAgfCAgMTAyICsrKwogYXJjaC9lZmkvbGliL2Vs Zl94ODZfNjRfZWZpLmxkcy5TICAgICAgICAgIHwgICA5MyArKwogYXJjaC9lZmkvbGliL3JlbG9j X2lhMzIuYyAgICAgICAgICAgICAgICAgIHwgICA5NyArKwogYXJjaC9lZmkvbGliL3JlbG9jX3g4 Nl82NC5jICAgICAgICAgICAgICAgIHwgICA5NiArKwogY29tbW9uL0tjb25maWcgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHwgICAgOCArCiBjb21tb24vTWFrZWZpbGUgICAgICAgICAgICAg ICAgICAgICAgICAgICAgfCAgICA0ICstCiBjb21tb24vZWZpLWRldmljZXBhdGguYyAgICAgICAg ICAgICAgICAgICAgfCAxMzcwICsrKysrKysrKysrKysrK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BTExPQ19TSVpFPTB4MAorQ09ORklHX01BTExPQ19UTFNGPXkKK0NPTkZJR19Q Uk9NUFQ9ImJhcmVib3g+ICIKK0NPTkZJR19IVVNIX0ZBTkNZX1BST01QVD15CitDT05GSUdfQ01E TElORV9FRElUSU5HPXkKK0NPTkZJR19BVVRPX0NPTVBMRVRFPXkKK0NPTkZJR19NRU5VPXkKKyMg Q09ORklHX1RJTUVTVEFNUCBpcyBub3Qgc2V0CitDT05GSUdfQ09OU09MRV9BQ1RJVkFURV9BTEw9 eQorQ09ORklHX1BBUlRJVElPTl9ESVNLX0VGST15CitDT05GSUdfREVGQVVMVF9FTlZJUk9OTUVO VF9HRU5FUklDX05FVz15CitDT05GSUdfUE9MTEVSPXkKK0NPTkZJR19ERUJVR19JTkZPPXkKK0NP TkZJR19ERUJVR19MTD15CitDT05GSUdfTE9OR0hFTFA9eQorQ09ORklHX0NNRF9JT01FTT15CitD T05GSUdfQ01EX01FTUlORk89eQorQ09ORklHX0NNRF9CT09UTV9TSE9XX1RZUEU9eQorQ09ORklH X0NNRF9CT09UTV9WRVJCT1NFPXkKK0NPTkZJR19DTURfQk9PVE1fSU5JVFJEPXkKK0NPTkZJR19D TURfQk9PVE1fT0ZUUkVFPXkKK0NPTkZJR19DTURfR089eQorQ09ORklHX0NNRF9MT0FEQj15CitD T05GSUdfQ01EX1JFU0VUPXkKK0NPTkZJR19DTURfVUlNQUdFPXkKK0NPTkZJR19DTURfUEFSVElU SU9OPXkKK0NPTkZJR19DTURfRVhQT1JUPXkKK0NPTkZJR19DTURfTE9BREVOVj15CitDT05GSUdf Q01EX1BSSU5URU5WPXkKK0NPTkZJR19DTURfTUFHSUNWQVI9eQorQ09ORklHX0NNRF9NQUdJQ1ZB Ul9IRUxQPXkKK0NPTkZJR19DTURfU0FWRUVOVj15CitDT05GSUdfQ01EX0ZJTEVUWVBFPXkKK0NP TkZJR19DTURfTE49eQorQ09ORklHX0NNRF9NRDVTVU09eQorQ09ORklHX0NNRF9VTk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CisJfQorCisJLiA9IEFMSUdOKDY0KTsKKworCV9fYmFyZWJveF9pbml0Y2Fs bHNfc3RhcnQgPSAuOworCV9fYmFyZWJveF9pbml0Y2FsbHMgOiB7IElOSVRDQUxMUyB9CisJX19i YXJlYm94X2luaXRjYWxsc19lbmQgPSAuOworCisJLiA9IEFMSUdOKDY0KTsKKwlfX2JhcmVib3hf bWFnaWN2YXJfc3RhcnQgPSAuOworCS5iYXJlYm94X21hZ2ljdmFyIDogeyBCQVJFQk9YX01BR0lD VkFSUyB9CisJX19iYXJlYm94X21hZ2ljdmFyX2VuZCA9IC47CisKKwkuID0gQUxJR04oNjQpOwor CV9fYmFyZWJveF9jbWRfc3RhcnQgPSAuOworCV9fYmFyZWJveF9jbWQgOiB7IEJBUkVCT1hfQ01E UyB9CisJX19iYXJlYm94X2NtZF9lbmQgPSAuOworCisJLiA9IEFMSUdOKDQwOTYpOworCS5keW5h bWljIDogeyAqKC5keW5hbWljKSB9CisJLiA9IEFMSUdOKDQwOTYpOworCisJLnJlbGEgOiB7CisJ CSooLnJlbGEuZGF0YSopCisJCSooLnJlbGEuZ290KQorCQkqKC5yZWxhLnN0YWIpCisJfQorCisJ LiA9IEFMSUdOKDQwOTYpOworCS5keW5zeW0gOiB7ICooLmR5bnN5bSkgfQorCS4gPSBBTElHTig0 MDk2KTsKKwkuZHluc3RyIDogeyAqKC5keW5zdHIpIH0KKwkuID0gQUxJR04oNDA5Nik7CisJLmln bm9yZWQucmVsb2MgOiB7CisJCSooLnJlbGEucmVsb2MpCisJCSooLmVoX2ZyYW1lKQorCQkqKC5u b3RlLkdOVS1zdGFjaykKKwl9CisKKwkuY29tbWVudCAwIDogeyAqKC5jb21tZW50KSB9Cit9CmRp ZmYgLS1naXQgYS9hcmNoL2VmaS9saWIvcmVsb2NfaWEzMi5jIGIvYXJjaC9lZmkvbGliL3JlbG9j X2lhMzIuYwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi40NjkyOTY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F9JU19FTkRfVFlQRShhKQorI2RlZmluZSBEUF9JU19FTkRfU1VCVFlQRShhKSAgICAgICAg KCAoKGEpLT5zdWJfdHlwZSA9PSBFTkRfRU5USVJFX0RFVklDRV9QQVRIX1NVQlRZUEUgKQorCisj ZGVmaW5lIGRldmljZV9wYXRoX3R5cGUoYSkgICAgICAgICAgICggKChhKS0+dHlwZSkgJiBFRklf RFBfVFlQRV9NQVNLICkKKyNkZWZpbmUgbmV4dF9kZXZpY2VfcGF0aF9ub2RlKGEpICAgICAgICgg KHN0cnVjdCBlZmlfZGV2aWNlX3BhdGggKikgKCAoKHU4ICopIChhKSkgKyAoYSktPmxlbmd0aCkp CisjZGVmaW5lIGlzX2RldmljZV9wYXRoX2VuZF90eXBlKGEpICAgICAgKCBkZXZpY2VfcGF0aF90 eXBlKGEpID09IEVORF9ERVZJQ0VfUEFUSF9UWVBFICkKKyNkZWZpbmUgaXNfZGV2aWNlX3BhdGhf ZW5kX3N1Yl90eXBlKGEpICAgKCAoYSktPnN1Yl90eXBlID09IEVORF9FTlRJUkVfREVWSUNFX1BB VEhfU1VCVFlQRSApCisjZGVmaW5lIGlzX2RldmljZV9wYXRoX2VuZChhKSAgICAgICAgICAoIGlz X2RldmljZV9wYXRoX2VuZF90eXBlKGEpICYmIGlzX2RldmljZV9wYXRoX2VuZF9zdWJfdHlwZShh KSApCisjZGVmaW5lIGlzX2RldmljZV9wYXRoX3VucGFja2VkKGEpICAgICAoIChhKS0+dHlwZSAm IEVGSV9EUF9UWVBFX1VOUEFDS0VEICkKKworI2RlZmluZSBzZXRfZGV2aWNlX3BhdGhfZW5kX25v ZGUoYSkgIHsgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgKGEpLT50eXBlID0g RU5EX0RFVklDRV9QQVRIX1RZUEU7ICAgICAgICAgICBcCisgICAgICAgICAgICAoYSktPnN1Yl90 eXBlID0gRU5EX0VOVElSRV9ERVZJQ0VfUEFUSF9TVUJUWVBFOyAgICAgXAorICAgICAgICAgICAg KGEpLT5sZW5ndGggPSBzaXplb2Yoc3RydWN0IGVmaV9kZXZpY2VfcGF0aCk7ICAgXAorICAgICAg ICAgICAgfQorCisvKgorICogSGFyZHdhcmUgRGV2aWNlIFBhdGggKFVFRkkgMi40IHNwZWNpZmlj YXRpb24sIHZlcnNpb24gMi40IMKnIDkuMy4yLikKKyAqLworCisjZGVmaW5lIEhBUkRXQVJFX0RF VklDRV9QQVRIICAgICAgICAgICAgMHgwMQorCisjZGVmaW5lIEhXX1BDSV9EUCAgICAgICAgICAg ICAgICAgICAgICAgMHgwMQorc3RydWN0IHBjaV9kZXZpY2VfcGF0aCB7CisJc3RydWN0IGVmaV9k ZXZpY2VfcGF0aCBoZWFkZXI7CisJdTggRnVuY3Rpb247CisJdTggRGV2aWNlOworfTsKKworI2Rl ZmluZSBIV19QQ0NBUkRfRFAgICAgICAgICAgICAgICAgICAgIDB4MDIKK3N0cnVjdCBwY2NhcmRf ZGV2aWNlX3BhdGggeworCXN0cnVjdCBlZmlfZGV2aWNlX3BhdGggaGVhZGVyOworCXU4IGZ1bmN0 aW9uX251bWJlcjsKK307CisKKyNkZWZpbmUgSFdfTUVNTUFQX0RQICAgICAgICAgICAgICAgICAg ICAweDAzCitzdHJ1Y3QgbWVtbWFwX2RldmljZV9wYXRoIHsKKwlzdHJ1Y3QgZWZpX2RldmljZV9w YXRoIGhlYWRlcjsKKwl1MzIgbWVtb3J5X3R5cGU7CisJZWZpX3BoeXNpY2FsX2FkZHJfdCBzdGFy dGluZ19hZGRyZXNzOworCWVmaV9waHlzaWNhbF9hZGRyX3QgZW5kaW5nX2FkZHJlc3M7Cit9Owor CisjZGVmaW5lIEhXX1ZFTkRPUl9EUCAgICAgICAgICAgICAgICAgICAgMHgwNAorc3RydWN0IHZl bmRvcl9kZXZpY2VfcGF0aCB7CisJc3RydWN0IGVmaV9kZXZpY2VfcGF0aCBoZWFkZXI7CisJZWZp X2d1aWRfdCBHdWlkOworfTsKKworc3RydWN0IH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AgMHgwMQorc3RydWN0IGhhcmRkcml2ZV9kZXZpY2VfcGF0aCB7 CisJc3RydWN0IGVmaV9kZXZpY2VfcGF0aCBoZWFkZXI7CisJdTMyIHBhcnRpdGlvbl9udW1iZXI7 CisJdTY0IHBhcnRpdGlvbl9zdGFydDsKKwl1NjQgcGFydGl0aW9uX3NpemU7CisJdTggc2lnbmF0 dXJlWzE2XTsKKwl1OCBtYnJfdHlwZTsKKwl1OCBzaWduYXR1cmVfdHlwZTsKK307CisKKyNkZWZp bmUgTUJSX1RZUEVfUENBVCAgICAgICAgICAgICAgICAgICAgICAgMHgwMQorI2RlZmluZSBNQlJf VFlQRV9FRklfUEFSVElUSU9OX1RBQkxFX0hFQURFUiAweDAyCisKKyNkZWZpbmUgU0lHTkFUVVJF X1RZUEVfTUJSICAgICAgICAgICAgICAgICAgMHgwMQorI2RlZmluZSBTSUdOQVRVUkVfVFlQRV9H VUlEICAgICAgICAgICAgICAgICAweDAyCisKKyNkZWZpbmUgTUVESUFfQ0RST01fRFAgICAgICAg ICAgICAgICAgICAweDAyCitzdHJ1Y3QgY2Ryb21fZGV2aWNlX3BhdGggeworCXN0cnVjdCBlZmlf ZGV2aWNlX3BhdGggaGVhZGVyOworCXUzMiBib290X2VudHJ5OworCXU2NCBwYXJ0aXRpb25fc3Rh cnQ7CisJdTY0IHBhcnRpdGlvbl9zaXplOworfTsKKworI2RlZmluZSBNRURJQV9WRU5ET1JfRFAg ICAgICAgICAgICAgICAgIDB4MDMKKy8qIFVzZSBWRU5ET1JfREVWSUNFX1BBVEggc3RydWN0ICov CisKKyNkZWZpbmUgTUVESUFfRklMRVBBVEhfRFAgICAgICAgICAgICAgICAweDA0CitzdHJ1Y3Qg ZmlsZXBhdGhfZGV2aWNlX3BhdGggeworCXN0cnVjdCBlZmlfZGV2aWNlX3BhdGggaGVhZGVyOwor CXMxNiBwYXRoX25hbWVbMV07Cit9OworCisjZGVmaW5lIFNJWkVfT0ZfRklMRVBBVEhfREVWSUNF X1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RydWN0IG1lZGlhX3JlbGF0aXZlX29mZnNldF9yYW5nZV9kZXZp Y2VfcGF0aCB7CisJc3RydWN0IGVmaV9kZXZpY2VfcGF0aCBoZWFkZXI7CisJdTMyIFJlc2VydmVk OworCXU2NCBzdGFydGluZ19vZmZzZXQ7CisJdTY0IGVuZGluZ19vZmZzZXQ7Cit9OworCisvKgor ICogQklPUyBCb290IFNwZWNpZmljYXRpb24gRGV2aWNlIFBhdGggKFVFRkkgMi40IHNwZWNpZmlj YXRpb24sIHZlcnNpb24gMi40IMKnIDkuMy43LikKKyAqLworI2RlZmluZSBCQlNfREVWSUNFX1BB VEggICAgICAgICAgICAgICAgIDB4MDUKKworI2RlZmluZSBCQlNfQkJTX0RQICAgICAgICAgICAg ICAgICAgICAgIDB4MDEKK3N0cnVjdCBiYnNfYmJzX2RldmljZV9wYXRoIHsKKwlzdHJ1Y3QgZWZp X2RldmljZV9wYXRoIGhlYWRlcjsKKwl1MTYgZGV2aWNlX3R5cGU7CisJdTE2IHN0YXR1c19mbGFn OworCXM4IFN0cmluZ1sxXTsKK307CisKKy8qIGRldmljZV90eXBlIGRlZmluaXRpb25zIC0gZnJv bSBCQlMgc3BlY2lmaWNhdGlvbiAqLworI2RlZmluZSBCQlNfVFlQRV9GTE9QUFkgICAgICAgICAg ICAgICAgIDB4MDEKKyNkZWZpbmUgQkJTX1RZUEVfSEFSRERSSVZFICAgICAgICAgICAgICAweDAy CisjZGVmaW5lIEJCU19UWVBFX0NEUk9NICAgICAgICAgICAgICAgICAgMHgwMworI2RlZmluZSBC QlNfVFlQRV9QQ01DSUEgICAgICAgICAgICAgICAgIDB4MDQKKyNkZWZpbmUgQkJTX1RZUEVfVVNC ICAgICAgICAgICAgICAgICAgICAweDA1CisjZGVmaW5lIEJCU19UWVBFX0VNQkVEREVEX05FVFdP UksgICAgICAgMHgwNgorI2RlZmluZSBCQlNfVFlQRV9ERVYgICAgICAgICAgICAgICAgICAgIDB4 ODAKKyNkZWZpbmUgQkJTX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