mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/5] ARM: mmu: misc armv7 cache/MMU fixes
@ 2019-04-23 17:18 Ahmad Fatoum
  2019-04-23 17:18 ` [PATCH 1/5] ARM: cache-armv7: add work-around for errata 814220 Ahmad Fatoum
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Ahmad Fatoum @ 2019-04-23 17:18 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum, lst, ore, rcz

This series fixes a number of potential caching issues with armv7.

They are:

- Cortex-A7 erratum #814220
  Because of this erratum, the CPU may reorder cache maintenance operations
  when it shouldn't.
- Wrong Cache invalidation order for Cortex-A7
  On the Cortex-A7, the L2 cache needs to be invalidated before the L1 cache.
- Device memory isn't marked NX (Never eXecute)
  NX prevents the CPU instruction prefetcher from inadvertently
  accessing memory mapped devices


We haven't observed these actually causing problems with barebox,
so testing the changes is a bit tricky. I ran these changes on:

- Cortex-A5 (SAMA5D3, -marm, first stage in SRAM, second in SDRAM)
- Cortex-A7 (i.MX6UL, -marm, architected L2 cache, barebox in SDRAM)
- Cortex-A7 (i.MX6UL, -mthumb (2), architected L2 cache, barebox in SDRAM)
- Cortex-A9 (i.MX6Q,  -mthumb (2), barebox in SDRAM)

and verified that:

- barebox can still start up
- barebox PBL can still invoke barebox proper
- barebox can still boot itself over the network
- barebox can still boot a kernel
- barebox can do all of the above with CONFIG_MMU_EARLY=y and =n

Ahmad Fatoum (5):
  ARM: cache-armv7: add work-around for errata 814220
  ARM: imx: work around i.MX6UL ERR008958 (ARM errata 814220)
  ARM: cache-armv7: start invalidation from outer levels
  ARM: mmu: remove doubly defined macro
  ARM: mmu: mark uncached regions as eXecute never on v7

 arch/arm/Kconfig           | 12 ++++++++++++
 arch/arm/cpu/cache-armv7.S | 15 ++++++++++++++-
 arch/arm/cpu/mmu-early.c   | 27 ++++++++++++++++++++++++---
 arch/arm/cpu/mmu.c         | 16 ++++++++++------
 arch/arm/cpu/mmu.h         |  8 +++++++-
 arch/arm/mach-imx/Kconfig  |  1 +
 6 files changed, 68 insertions(+), 11 deletions(-)

-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-04-25 10:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 17:18 [PATCH 0/5] ARM: mmu: misc armv7 cache/MMU fixes Ahmad Fatoum
2019-04-23 17:18 ` [PATCH 1/5] ARM: cache-armv7: add work-around for errata 814220 Ahmad Fatoum
2019-04-23 17:39   ` Sam Ravnborg
2019-04-25 10:38     ` Ahmad Fatoum
2019-04-25 10:02   ` Lucas Stach
2019-04-23 17:18 ` [PATCH 2/5] ARM: imx: work around i.MX6UL ERR008958 (ARM errata 814220) Ahmad Fatoum
2019-04-23 17:41   ` Sam Ravnborg
2019-04-25 10:39     ` Ahmad Fatoum
2019-04-23 17:18 ` [PATCH 3/5] ARM: cache-armv7: start invalidation from outer levels Ahmad Fatoum
2019-04-23 17:21   ` Ahmad Fatoum
2019-04-25  9:57     ` Lucas Stach
2019-04-23 17:18 ` [PATCH 4/5] ARM: mmu: remove doubly defined macro Ahmad Fatoum
2019-04-23 17:18 ` [PATCH 5/5] ARM: mmu: mark uncached regions as eXecute never on v7 Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox