Commit c808d913 authored by Catalin Marinas's avatar Catalin Marinas

Data written to the L2 cache can be overwritten with stale data on Cortex-A8

This patch is a workaround for the 460075 Cortex-A8 (r2p0) erratum. It
configures the L2 cache auxiliary control register so that the Write
Allocate mode for the L2 cache is disabled.
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent e385bef2
...@@ -575,6 +575,17 @@ config ARM_ERRATA_458693 ...@@ -575,6 +575,17 @@ config ARM_ERRATA_458693
different cache line. This false hazard might then cause a different cache line. This false hazard might then cause a
processor deadlock. processor deadlock.
config ARM_ERRATA_460075
bool "Data written to the L2 cache can be overwritten with stale data on Cortex-A8"
depends on CPU_V7
default n
help
This option enables the workaround for the 458692 Cortex-A8
(r2p0) erratum. Any asynchronous access to the L2 cache may
encounter a situation in which recent store transactions to
the L2 cache are lost and overwritten with stale memory
contents from external memory.
endmenu endmenu
source "arch/arm/common/Kconfig" source "arch/arm/common/Kconfig"
......
...@@ -197,6 +197,11 @@ __v7_setup: ...@@ -197,6 +197,11 @@ __v7_setup:
orr r10, r10, #(1 << 5) @ set L1NEON to 1 orr r10, r10, #(1 << 5) @ set L1NEON to 1
orr r10, r10, #(1 << 9) @ set PLDNOP to 1 orr r10, r10, #(1 << 9) @ set PLDNOP to 1
mcr p15, 0, r10, c1, c0, 1 @ write aux control register mcr p15, 0, r10, c1, c0, 1 @ write aux control register
#endif
#ifdef CONFIG_ARM_ERRATA_460075
mrc p15, 1, r10, c9, c0, 2 @ read L2 cache aux ctrl register
orr r10, r10, #(1 << 22) @ set the Write Allocate disable bit
mcr p15, 1, r10, c9, c0, 2 @ write the L2 cache aux ctrl register
#endif #endif
mov r10, #0 mov r10, #0
#ifdef HARVARD_CACHE #ifdef HARVARD_CACHE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment