diff options
author | Alexei <Alexei.Fedorov@arm.com> | 2016-09-21 21:33:15 +0100 |
---|---|---|
committer | Leif Lindholm <leif.lindholm@linaro.org> | 2016-10-11 14:23:46 +0100 |
commit | a4bcf0bcdd81285e2ae881db7a51a454f8ab0951 (patch) | |
tree | f1c804a3102108141a8292934ef632090be96c3f /ArmPlatformPkg/Library | |
parent | 2d52a3a237c4294022030d99c82e26f9e58276ad (diff) | |
download | edk2-platforms-a4bcf0bcdd81285e2ae881db7a51a454f8ab0951.tar.xz |
ArmPlatformPkg: Remove UINTN cast when setting BaudRate.
SerialPortInitialize() set the BaudRate variable (type UINT64) as:
BaudRate = (UINTN)FixedPcdGet64 (PcdUartDefaultBaudRate);
This commit fixes a potential problem on ARM 32-bit builds, where the
UINTN type is defined as UINT32, by removing the cast:
BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate);
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Alexei Fedorov <alexei.fedorov@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPlatformPkg/Library')
-rw-r--r-- | ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c index 5dce852d90..571d0618c3 100644 --- a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c +++ b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c @@ -41,7 +41,7 @@ SerialPortInitialize ( UINT8 DataBits;
EFI_STOP_BITS_TYPE StopBits;
- BaudRate = (UINTN)FixedPcdGet64 (PcdUartDefaultBaudRate);
+ BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate);
ReceiveFifoDepth = 0; // Use default FIFO depth
Parity = (EFI_PARITY_TYPE)FixedPcdGet8 (PcdUartDefaultParity);
DataBits = FixedPcdGet8 (PcdUartDefaultDataBits);
|