ArmPlatformPkg/NorFlashDxe: Change Flash memory attributes before writes
ArmPlatformPkg/NorFlashDxe: Change Flash memory attributes before writes

In NorFlashFvbInitialize() if a valid Firmware Volume header is not found at the
start of NOR Flash, the Flash memory is written before it has been remapped with
EFI_MEMORY_UC attributes to allow write commands. Since the flash memory was
previously mapped with Normal and possibly cacheable memory attributes, the
Flash commands might never reach the device.

This patch fixes this issue by remapping the Flash memory region with correct
memory attributes before writing to it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Achin Gupta <41a3159f04979f8ab0f18b7cd5cc8189d01ec1bb@arm.com>
Reviewed-by: Ard Biesheuvel <66d3c5fdaeea7ff1f996ad04f2c45e08ab38e2f5@linaro.org>

MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2