diff options
author | Soby Mathew <soby.mathew@arm.com> | 2014-11-18 10:14:14 +0000 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2015-01-13 14:28:08 +0000 |
commit | 099973469b430fdbccc6ab82737c760aeccfbfce (patch) | |
tree | cc19eb1c2a5e27de60c8fc03e3ddfb571494809e /include/bl31 | |
parent | 23cf7d0fcc6ba5ff2f06f43e3dc19ca854310077 (diff) |
Invalidate the dcache after initializing cpu-ops
This patch fixes a crash due to corruption of cpu_ops
data structure. During the secondary CPU boot, after the
cpu_ops has been initialized in the per cpu-data, the
dcache lines need to invalidated so that the update in
memory can be seen later on when the dcaches are turned ON.
Also, after initializing the psci per cpu data, the dcache
lines are flushed so that they are written back to memory
and dirty dcache lines are avoided.
Fixes ARM-Software/tf-issues#271
Change-Id: Ia90f55e9882690ead61226eea5a5a9146d35f313
Diffstat (limited to 'include/bl31')
-rw-r--r-- | include/bl31/cpu_data.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/bl31/cpu_data.h b/include/bl31/cpu_data.h index ba7ae063..c886e2b4 100644 --- a/include/bl31/cpu_data.h +++ b/include/bl31/cpu_data.h @@ -115,6 +115,10 @@ void init_cpu_data_ptr(void); #define flush_cpu_data(_m) flush_dcache_range((uint64_t) \ &(_cpu_data()->_m), \ sizeof(_cpu_data()->_m)) +#define flush_cpu_data_by_index(_ix, _m) \ + flush_dcache_range((uint64_t) \ + &(_cpu_data_by_index(_ix)->_m), \ + sizeof(_cpu_data_by_index(_ix)->_m)) #endif /* __ASSEMBLY__ */ |