]> git.proxmox.com Git - mirror_edk2.git/commit - ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
ArmPkg/ArmLib: Drain Write Buffer before DCache maintenance operations.
authorOlivier Martin <olivier.martin@arm.com>
Tue, 3 Jun 2014 16:37:29 +0000 (16:37 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Jun 2014 16:37:29 +0000 (16:37 +0000)
commit01674afdad3460f1c1f5f7a941c4c5895c8c3f86
treef0a06e07830cb71b1052fd2976da5420b1966106
parent8b7f930a14d1d5480b707b60323e95450e7361c1
ArmPkg/ArmLib: Drain Write Buffer before DCache maintenance operations.

Cache maintenance operations by Set/Way require that the Write Buffer
be drained before the cache is flushed.  Without that, the flush can
miss the most recent values written as they are still "pipelined".
That has unfortunate consequences, especially where code is being
copied to RAM.
The fix is to add DSB instructions before the affected operations.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15551 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.c
ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.c