mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
bootcount: flush after storing the bootcounter
If the bootcounter address is in a cached memory, a flush of dcache must occur after updateing the bootcounter. Issue found on i.MX6 where bootcounter is put into the internal (cached) IRAM. Signed-off-by: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
474ecd2c84
commit
1947c2d2a0
1 changed files with 3 additions and 0 deletions
|
@ -18,6 +18,9 @@ __weak void bootcount_store(ulong a)
|
|||
raw_bootcount_store(reg, a);
|
||||
raw_bootcount_store(reg + 4, BOOTCOUNT_MAGIC);
|
||||
#endif /* defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD */
|
||||
flush_dcache_range(CONFIG_SYS_BOOTCOUNT_ADDR,
|
||||
CONFIG_SYS_BOOTCOUNT_ADDR +
|
||||
CONFIG_SYS_CACHELINE_SIZE);
|
||||
}
|
||||
|
||||
__weak ulong bootcount_load(void)
|
||||
|
|
Loading…
Reference in a new issue