From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1i9lPy-0006w6-L4 for barebox@lists.infradead.org; Mon, 16 Sep 2019 07:27:28 +0000 From: Sascha Hauer Date: Mon, 16 Sep 2019 09:27:21 +0200 Message-Id: <20190916072721.12392-7-s.hauer@pengutronix.de> In-Reply-To: <20190916072721.12392-1-s.hauer@pengutronix.de> References: <20190916072721.12392-1-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 6/6] ARM: aarch64: Re-implement most of barebox_arm_entry() in assembly To: Barebox List Cc: Andrey Smirnov RnJvbTogQW5kcmV5IFNtaXJub3YgPGFuZHJldy5zbWlybm92QGdtYWlsLmNvbT4KCkdDQzkgbm93 IHByb2R1Y2VzIHRoZSBmb2xsb3dpbmcgd2FybmluZzoKCmNvbW1vbi5oOjUxOjI6IHdhcm5pbmc6 IGxpc3RpbmcgdGhlIHN0YWNrIHBvaW50ZXIgcmVnaXN0ZXIg4oCYc3DigJkgaW4gYSBjbG9iYmVy IGxpc3QgaXMgZGVwcmVjYXRlZCBbLVdkZXByZWNhdGVkXQogICA1MSB8ICBfX2FzbV9fIF9fdm9s YXRpbGVfXygibW92IHNwLCAlMCIKICAgICAgfCAgXn5+fn5+fgpjb21tb24uaDo1MToyOiBub3Rl OiB0aGUgdmFsdWUgb2YgdGhlIHN0YWNrIHBvaW50ZXIgYWZ0ZXIgIGFuIOKAmGFzbeKAmSBzdGF0 ZW1lbnQgbXVzdCBiZSB0aGUgc2FtZSBhcyBpdCB3YXMgYmVmb3JlIHRoZSBzdGF0ZW1lbnQKClN0 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