NorFlashDxe must use aligned MMIO accesses to read data from flash as this is device memory.
The AlignedCopyMem() in NorFlashDxe was used to copy the flash data which prevented unaligned access to device memory. However, the compiler could optimize the code to generate pre/post indexed or LDP operations. This is a problem for guest/virtual firmware as the hypervisor code cannot get the syndrome information for the trapped accesses. To address the such issues, BaseMemoryLibMmio library has been introduced to perform aligned MMIO accesses. The NorFlashDxe has been updated to use CopyMem() instead of using AlignedCopyMem() and therefore the NorFlashDxe must be linked with BaseMemoryLibMmio. This patch updates the workspace files to link NorFlashDxe with BaseMemoryLibMmio for the RDK Qemu platform. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> --- Platform/Comcast/RDKQemu/RDKQemu.dsc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Platform/Comcast/RDKQemu/RDKQemu.dsc b/Platform/Comcast/RDKQemu/RDKQemu.dsc index 440d2ace917cb639a04d1581fae71364d49c774f..c4e09c716a506c7e33a9cafd3612d81c21375751 100644 --- a/Platform/Comcast/RDKQemu/RDKQemu.dsc +++ b/Platform/Comcast/RDKQemu/RDKQemu.dsc @@ -1,5 +1,5 @@ # -# Copyright (c) 2011-2015, ARM Limited. All rights reserved. +# Copyright (c) 2011-2020, ARM Limited. All rights reserved. # Copyright (c) 2014 - 2018, Linaro Limited. All rights reserved. # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. # @@ -301,7 +301,11 @@ [Components.common] <LibraryClasses> NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf } - ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf + ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf { + <LibraryClasses> + BaseMemoryLib|MdePkg/Library/BaseMemoryLibMmio/BaseMemoryLibMmio.inf + } + MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf # -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59518): https://edk2.groups.io/g/devel/message/59518 Mute This Topic: https://groups.io/mt/74200942/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-