From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 31/39] ARM: layerscape: ppa: use sync_for_execution instead of a manual cache flush
Date: Fri, 29 Nov 2019 16:14:57 +0100 [thread overview]
Message-ID: <20191129151505.23946-32-l.stach@pengutronix.de> (raw)
In-Reply-To: <20191129151505.23946-1-l.stach@pengutronix.de>
The copied code is then jumped to, so we need to sync the caches for
execution instead of just flushing the data caches.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/mach-layerscape/ppa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c
index 607045102071..987cb6587608 100644
--- a/arch/arm/mach-layerscape/ppa.c
+++ b/arch/arm/mach-layerscape/ppa.c
@@ -14,9 +14,9 @@
#include <image-fit.h>
#include <asm/psci.h>
#include <mach/layerscape.h>
+#include <asm/cache.h>
int ppa_entry(const void *, u32 *, u32 *);
-void dma_flush_range(void *ptr, size_t size);
static int of_psci_do_fixup(struct device_node *root, void *unused)
{
@@ -73,7 +73,7 @@ static int ppa_init(void *ppa, size_t ppa_size, void *sec_firmware_addr)
/* Copy the secure firmware to secure memory */
memcpy(sec_firmware_addr, buf, firmware_size);
- dma_flush_range(sec_firmware_addr, ppa_size);
+ sync_caches_for_execution();
ret = ppa_entry(sec_firmware_addr, boot_loc_ptr_l, boot_loc_ptr_h);
if (ret) {
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-11-29 15:15 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 15:14 [PATCH 00/39] randcfg build fixes Lucas Stach
2019-11-29 15:14 ` [PATCH 01/39] ARM: imx: add image type choice Lucas Stach
2019-12-02 10:07 ` Sascha Hauer
2019-12-02 10:51 ` Lucas Stach
2019-12-04 7:26 ` Sascha Hauer
2019-11-29 15:14 ` [PATCH 02/39] ratp: add more build dependencies Lucas Stach
2019-11-29 15:14 ` [PATCH 03/39] ARM: move into ARM32 specific optee kernel start into lib32 dir Lucas Stach
2019-11-29 15:14 ` [PATCH 04/39] ARM: implement CONFIG_PBL_BREAK for ARM64 Lucas Stach
2019-11-29 15:14 ` [PATCH 05/39] lib: zstd: declare locally used functions as static Lucas Stach
2019-11-29 15:14 ` [PATCH 06/39] common: provide stubs for ctrlc_* functions Lucas Stach
2019-11-29 15:14 ` [PATCH 07/39] commands: keystore: use correct type for s_len Lucas Stach
2019-11-29 15:14 ` [PATCH 08/39] gui: picopng: declare locally used functions as static Lucas Stach
2019-11-29 15:14 ` [PATCH 09/39] reset_source: add stub for reset_source_set_device Lucas Stach
2019-11-29 15:14 ` [PATCH 10/39] spi: fix symbol export for spi_register_controller Lucas Stach
2019-11-29 15:14 ` [PATCH 11/39] mfd: superio: add missing semicolon after EXPORT_SYMBOL Lucas Stach
2019-11-29 15:14 ` [PATCH 12/39] ARM: psci: declare locally used functions as static Lucas Stach
2019-11-29 15:14 ` [PATCH 13/39] ARM: mxs: bcb: " Lucas Stach
2019-11-29 15:14 ` [PATCH 14/39] usb: dwc3: depend on OFDEVICE Lucas Stach
2019-11-29 15:14 ` [PATCH 15/39] mtd: nand: don't call BBT functions if BBT support isn't built Lucas Stach
2019-11-29 15:14 ` [PATCH 16/39] mfd: da9063: don't try to register gpiochip when GPIOLIB " Lucas Stach
2019-11-29 15:14 ` [PATCH 17/39] mci: MCI_IMX_ESDHC_PBL has no dependency on MCI Lucas Stach
2019-11-29 15:14 ` [PATCH 18/39] i2c: always walk down into i2c/busses Makefile Lucas Stach
2019-11-29 15:14 ` [PATCH 19/39] usb: usb251xb: depend on OFDEVICE Lucas Stach
2019-11-29 15:14 ` [PATCH 20/39] pstore: don't try to grab non-existent logbuf Lucas Stach
2019-11-29 15:14 ` [PATCH 21/39] firmware: zynqmp-fpga: fix comparison between pointer and integer Lucas Stach
2019-11-29 15:14 ` [PATCH 22/39] pstore: ramoops: use correct format specifier for size_t variables Lucas Stach
2019-11-29 15:14 ` [PATCH 23/39] clocksource: ARMv8 timer can only be built on ARMv8 Lucas Stach
2019-11-29 15:14 ` [PATCH 24/39] input: select POLLER Lucas Stach
2019-11-29 15:14 ` [PATCH 25/39] ARM: layerscape: add missing selects for TQMLS1046A Lucas Stach
2019-11-29 15:14 ` [PATCH 26/39] ARM: PBL break is not available on ARMv4 Lucas Stach
2019-11-29 15:14 ` [PATCH 27/39] ARM: ARM_SMCCC is only available on >= ARMv7 Lucas Stach
2019-11-29 15:14 ` [PATCH 28/39] ARM: layerscape: select OFTREE and OFDEVICE Lucas Stach
2019-11-29 15:14 ` [PATCH 29/39] usb: dwc3: dual role mode needs gadget support Lucas Stach
2019-11-29 15:14 ` [PATCH 30/39] pinctrl: at91pio4: move to correct location in Kconfig Lucas Stach
2019-11-29 15:14 ` Lucas Stach [this message]
2019-11-29 15:14 ` [PATCH 32/39] ubootvarfs: depend on OFTREE Lucas Stach
2019-11-29 15:14 ` [PATCH 33/39] ARM: davinci: virt2real: select OFTREE and OFDEVICE Lucas Stach
2019-11-29 15:15 ` [PATCH 34/39] ARM: omap: pfc200: NAND support requires CONFIG_OMAP_GPMC Lucas Stach
2019-11-29 15:15 ` [PATCH 35/39] net: designware-eqos: depend on COMMON_CLK Lucas Stach
2019-11-29 15:15 ` [PATCH 36/39] ARM: mvebu: correct DTB rule for MARVELL_ARMADA_XP_DB Lucas Stach
2019-11-29 15:15 ` [PATCH 37/39] nvme: correct symbol export name for nvme_submit_sync_cmd Lucas Stach
2019-11-29 15:15 ` [PATCH 38/39] pinctrl: tegra: mark drvdata as maybe unused Lucas Stach
2019-11-29 15:15 ` [PATCH 39/39] pinctrl: at91pio4 depends on OFDEVICE Lucas Stach
2019-12-02 8:44 ` [PATCH 00/39] randcfg build fixes Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191129151505.23946-32-l.stach@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox