From 2efbf710e27a78494cef38673b85ed360ec3b600 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Tue, 16 Sep 2014 00:41:45 +0000 Subject: [PATCH] ArmPlatformPkg/NorFlashDxe: use MmioWrite () not memory stores When writing to the flash, make sure to use MmioWrite () wrappers instead of letting the compiler generate the store instructions. This is needed because under virtualization, store instructions with multiple outputs (i.e., store pair or store with writeback) cannot be emulated efficiently when operating on MMIO ranges. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-By: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16107 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c index 5673d0bf29..2f828ec869 100644 --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c @@ -525,7 +525,7 @@ NorFlashWriteBuffer ( // Write the data to the NOR Flash, advancing each address by 4 bytes for(Count=0; Count < BufferSizeInWords; Count++, Data++, Buffer++) { - *Data = *Buffer; + MmioWrite32 ((UINTN)Data, *Buffer); } // Issue the Buffered Program Confirm command, to start the programming operation -- 2.39.2