From 8274521330e956ada5b9fc2a21aa81bd9d872f4c Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Tue, 12 Mar 2013 00:44:30 +0000 Subject: ArmPlatformPkg/NorFlashDxe: Fixed BufferSize calculation in NorFlashWriteSingleBlock() Needed to convert Word into Byte. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14178 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ArmPlatformPkg') diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c index d1506c7217..a9c589b744 100644 --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c @@ -596,7 +596,7 @@ NorFlashWriteSingleBlock ( if ((WordAddress & BOUNDARY_OF_32_WORDS) == 0x00) { // First, break the entire block into buffer-sized chunks. - BuffersInBlock = (UINTN)BlockSizeInWords / P30_MAX_BUFFER_SIZE_IN_BYTES; + BuffersInBlock = (UINTN)(BlockSizeInWords * 4) / P30_MAX_BUFFER_SIZE_IN_BYTES; // Then feed each buffer chunk to the NOR Flash for(BufferIndex=0; -- cgit v1.2.3