ArmPkg/GenericWatchdogDxe: Split 64bit register write to 2x32bit
authorMarcin Wojtas <mw@semihalf.com>
Thu, 2 Aug 2018 20:50:54 +0000 (22:50 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 3 Aug 2018 07:29:14 +0000 (09:29 +0200)
commitdd4cae4d82c7477273f3da455084844db5cca0c0
tree36cec36eefe204f864b3f9011b2cccfa07a0fa29
parent1d802e234e813a6726f4c6fd161ae9bd146bc552
ArmPkg/GenericWatchdogDxe: Split 64bit register write to 2x32bit

According to the SBSA specification the Watchdog Compare
Register is split into two separate 32bit registers.
EDK2 code uses a single 64bit transaction to update
them, which can be problematic, depending on the SoC
implementation and could result in unpredictable behavior.

Fix this by modifying WatchdogWriteCompareRegister routine to
use two consecutive 32bit writes to the Watchdog Compare Register
Low and High, using new dedicated macros.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h
ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c