Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Scott Duplichan f7e899c7c7 OvmfPkg: flash driver: drop needlessly wide multiplication (VS2010)
The current types of subexpressions used in QemuFlashPtr() are as follows.
(We also show the types of "larger" subexpressions, according to operator
binding.)

  mFlashBase + (Lba * mFdBlockSize) + Offset
      ^          ^         ^            ^
      |          |         |            |
   (UINT8*)   EFI_LBA    UINTN        UINTN
              (UINT64)

  ---------------------------------   ------
              (UINT8*)                UINTN

  ------------------------------------------
                    (UINT8*)

When building with VS2010 for Ia32 / NOOPT, the 64-by-32 bit
multiplication is translated to an intrinsic, which is not allowed in
edk2.

Recognize that "Lba" is always bounded by "mFdBlockCount" (an UINTN) here
-- all callers of QemuFlashPtr() ensure that. In addition, the flash chip
in question is always under 4GB, which is why we can address it at all on
Ia32. Narrow "Lba" to UINTN, without any loss of range.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Scott Duplichan <scott@notabs.org>

[commit message by lersek@redhat.com]

Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Build-tested-by: Scott Duplichan <scott@notabs.org>

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16384 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-14 10:23:43 +00:00
AppPkg AppPkg: Disable Lua builds by default. Update the ReadMe file. 2014-11-11 23:15:32 +00:00
ArmPkg ArmPkg/ArmGicLib: select GICv2 mode if SRE is present but unavailable 2014-11-13 16:41:51 +00:00
ArmPlatformPkg ArmPlatformPkg: fix undefined reference to memcpy 2014-11-12 10:01:41 +00:00
BaseTools BaseTools: Fix a cleanall issue. 2014-11-12 08:26:03 +00:00
BeagleBoardPkg ArmPlatformPkg: Increase more ARM address Pcd entries to 64-bit. 2014-11-11 00:43:03 +00:00
Conf EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
CryptoPkg CryptoPkg Updates to support RFC3161 timestamp signature verification. 2014-11-12 08:51:45 +00:00
DuetPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
EdkCompatibilityPkg EdkCompatibilityPkg: Add UEFI memory and SMRAM profile support. 2014-11-12 03:30:11 +00:00
EdkShellBinPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
EdkShellPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
EmbeddedPkg EmbeddedPkg/Lan9118Dxe: Remove link check in SNP initialization 2014-11-11 00:49:50 +00:00
EmulatorPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
FatBinPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
IntelFrameworkModulePkg Try to read key strike even when the TimeOuts value is zero, this will avoid BDS not get user input when TimeOuts value set to zero. 2014-11-06 08:56:54 +00:00
IntelFrameworkPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
IntelFspPkg Fix an issue on FixedMtreProgramming - AND/OR mask incorrect. 2014-09-28 01:07:13 +00:00
IntelFspWrapperPkg IntelFspPkg/IntelFspWrapperPkg: Fix some typos. 2014-09-03 06:48:38 +00:00
MdeModulePkg MdeModulePkg/Core/PiSmmCore/PiSmmCore.c: Fix compiler warning about variable set but unused 2014-11-14 08:44:41 +00:00
MdePkg UEFI 2.4 X509 Certificate Hash and RFC3161 Timestamp Verification support for Secure Boot 2014-11-14 08:41:12 +00:00
NetworkPkg Fix a bug in DHCP6 driver when using DUID LLT. 2014-11-12 05:14:07 +00:00
Nt32Pkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
Omap35xxPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
OptionRomPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
OvmfPkg OvmfPkg: flash driver: drop needlessly wide multiplication (VS2010) 2014-11-14 10:23:43 +00:00
PcAtChipsetPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
PerformancePkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
SecurityPkg UEFI 2.4 X509 Certificate Hash and RFC3161 Timestamp Verification support for Secure Boot 2014-11-14 08:41:12 +00:00
ShellBinPkg EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
ShellPkg [PATHC] ShellPkg: control code flow with a PCD 2014-11-12 21:28:51 +00:00
SourceLevelDebugPkg Fix a bug in DebugAgent that hang happens when the ACK for GO is lost. 2014-11-10 08:47:49 +00:00
StdLib StdLib/AppPkg: Add the NOOPT build target and fix a type conversion problem with VS2005. 2014-11-11 22:56:58 +00:00
StdLibPrivateInternalFiles EDK II Contributions.txt: Update patch format information 2014-10-31 22:05:50 +00:00
UefiCpuPkg UefiCpuPkg/CpuDxe: install Mp Service protocol 2014-11-13 18:30:18 +00:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
.gitignore EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
BuildNotes2.txt Update to new SVN URL in readme.txt 2013-06-08 05:26:39 +00:00
Edk2Setup.bat Updated version, missed the last two commits and to add the SVN Revision property (last part of the version value). 2014-08-22 16:08:47 +00:00
Maintainers.txt Update some package owners 2014-10-23 01:35:44 +00:00
edksetup.bat Update edksetup.bat to support Microsoft Visual Studio 2013 when building the Nt32Pkg emulation platform (enabled using the --nt32 flag). 2014-10-30 17:09:25 +00:00
edksetup.sh edksetup.sh: Ensure that WORKSPACE points to the top of an edk2 checkout 2014-07-28 17:37:40 +00:00