diff options
author | Pierre Gondois <pierre.gondois@arm.com> | 2020-06-30 11:49:00 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-07-23 12:05:44 +0000 |
commit | 7ff0459739cd164592638fddfa2621a3b7c2ad2e (patch) | |
tree | f87c137dc471585e75c027a7b20920aab05a9d63 /EmbeddedPkg/Universal/MmcDxe/Diagnostics.c | |
parent | d0da48f112de6ba4f9c28310565809d4c63439a1 (diff) | |
download | edk2-7ff0459739cd164592638fddfa2621a3b7c2ad2e.zip edk2-7ff0459739cd164592638fddfa2621a3b7c2ad2e.tar.gz edk2-7ff0459739cd164592638fddfa2621a3b7c2ad2e.tar.bz2 |
EmbeddedPkg: Fix build error for MmcDxe
The following command line:
build -b NOOPT -a IA32 -t VS2017 -p edk2\EmbeddedPkg\EmbeddedPkg.dsc
Generates the following error:
MmcDxe.lib(Diagnostics.obj) : error LNK2001:
unresolved external symbol __allshl
MmcDxe.lib(Diagnostics.obj) : error LNK2001:
unresolved external symbol __aullshr
MmcDxe.lib(MmcBlockIo.obj) : error LNK2001:
unresolved external symbol __allmul
These erros are due to the use of shift/multiply operations
on UINT64 variable on a IA32 architecture.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Diffstat (limited to 'EmbeddedPkg/Universal/MmcDxe/Diagnostics.c')
-rw-r--r-- | EmbeddedPkg/Universal/MmcDxe/Diagnostics.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c b/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c index 20defeb..49b0690 100644 --- a/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c +++ b/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c @@ -1,7 +1,7 @@ /** @file
Diagnostics Protocol implementation for the MMC DXE driver
- Copyright (c) 2011-2014, ARM Limited. All rights reserved.
+ Copyright (c) 2011-2020, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -56,7 +56,7 @@ GenerateRandomBuffer ( UINT64* Buffer64 = (UINT64*)Buffer;
for (i = 0; i < (BufferSize >> 3); i++) {
- *Buffer64 = i | (~i << 32);
+ *Buffer64 = i | LShiftU64 (~i, 32);
Buffer64++;
}
}
@@ -227,7 +227,11 @@ MmcDriverDiagnosticsRunDiagnostics ( // LBA=10 Size=BlockSize
DiagnosticLog (L"MMC Driver Diagnostics - Test: Any Block\n");
- Status = MmcReadWriteDataTest (MmcHostInstance, MmcHostInstance->BlockIo.Media->LastBlock >> 1, MmcHostInstance->BlockIo.Media->BlockSize);
+ Status = MmcReadWriteDataTest (
+ MmcHostInstance,
+ RShiftU64 (MmcHostInstance->BlockIo.Media->LastBlock, 1),
+ MmcHostInstance->BlockIo.Media->BlockSize
+ );
// LBA=LastBlock Size=BlockSize
DiagnosticLog (L"MMC Driver Diagnostics - Test: Last Block\n");
|