Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Laszlo Ersek 06f1982a64 OvmfPkg: QemuFlashFvbServicesRuntimeDxe: fix out-of-LBA write access
When QemuFlashWrite() is asked to write a range that includes the last
byte of the LBA, then the byte that the function uses to switch the flash
device back to read mode (ROMD mode in KVM speak) actually falls out of
the LBA.

Normally this doesn't cause visible problems. However, if the variable
store and the firmware code are backed by separate flash devices, as
implemented by

  [Qemu-devel] [PATCH v2] hw/i386/pc_sysfw: support two flash drives
  http://thread.gmane.org/gmane.comp.emulators.qemu/243678

plus

  [edk2] [edk2 PATCH] OvmfPkg: split the variable store to a separate file
  http://thread.gmane.org/gmane.comp.bios.tianocore.devel/5045/focus=5046

then the READ_ARRAY_CMD not only reaches a different LBA, it reaches a
different qemu device. This results in a guest reboot soon after.

Fix this by ensuring that we always stay within the LBA just written when
issuing READ_ARRAY_CMD.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14996 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17 18:17:55 +00:00
AppPkg Enable the build command override the .DSC file contents to enable debug output and specify which debug messages are displayed. An example: 2013-11-19 02:37:37 +00:00
ArmPkg ARM Packages: Removed 'inline' keyword 2013-12-10 16:39:54 +00:00
ArmPlatformPkg ArmPlatformPkg/ArmFvpDxe: Added Virtio Block support 2013-12-13 12:05:01 +00:00
BaseTools Sync BaseTool trunk (version r2610) into EDKII BaseTools. 2013-11-18 07:41:21 +00:00
BeagleBoardPkg ArmPlatformPkg: Fix and Implement ArmPlatformGetPrimaryCoreMpId 2013-12-06 16:11:34 +00:00
Conf Adding top-level Conf directory for next generation of EDK II build infrastructure tools. 2007-06-20 19:33:23 +00:00
CryptoPkg Fixed one typo in MathRShiftU64.S stub implementation; Add one digest algorithm registration to make sure the underlying algorithm is available for the default OpenSSL software PRNG implementation. 2013-11-19 02:57:19 +00:00
DuetPkg Fix Duet hang/reboot issue due to the NULL instance of CpuExceptionHandlerLib is used. 2013-11-26 05:41:34 +00:00
EdkCompatibilityPkg Follow UEFI spec to add the definition for EFI_SPECIFICATION_VERSION, and update other table version to refer to it. Remove the “/D TIANO_RELEASE_VERSION=0x00080006” option in Nt32Pkg DSC file, since it’s not used in source code. 2013-11-26 07:36:29 +00:00
EdkShellBinPkg EdkShellBinPkg: Added AArch64 EdkShellPkg binary and Updated Arm binary 2013-09-24 11:43:02 +00:00
EdkShellPkg Follow UEFI spec to add the definition for EFI_SPECIFICATION_VERSION, and update other table version to refer to it. Remove the “/D TIANO_RELEASE_VERSION=0x00080006” option in Nt32Pkg DSC file, since it’s not used in source code. 2013-11-26 07:36:29 +00:00
EmbeddedPkg EmbeddedPkg/EmbeddedPkg.dec: Defined default values for PcdPrePiCpuMemorySize & PcdPrePiCpuIoSize 2013-11-28 21:40:14 +00:00
EmulatorPkg EmulatorPkg: Use FaultTolerantWritePei driver. 2013-07-03 09:24:07 +00:00
FatBinPkg Fix a bug in Fat driver that it asserts when OpenEx/ReadEx/WriteEx is about to return failure. 2013-11-29 03:04:16 +00:00
IntelFrameworkModulePkg Add additional check mRuntimeSmbiosEntryPoint == NULL to avoid K9 error. 2013-12-11 08:53:19 +00:00
IntelFrameworkPkg Fill the ImageHandle and DriverBindingHandle field of Driver Binding Protocol before installing the Driver Binding Protocol instance. 2013-07-10 02:06:49 +00:00
MdeModulePkg Update code to support guid op nest in the statement. 2013-12-17 08:33:06 +00:00
MdePkg 1. Add ISCSI iBFT CHAP types to IScsiBootFirmwareTable.h. 2013-12-10 09:14:39 +00:00
NetworkPkg Fix a bug in TCP driver’s component name print function. 2013-12-17 07:46:11 +00:00
Nt32Pkg Follow UEFI spec to add the definition for EFI_SPECIFICATION_VERSION, and update other table version to refer to it. Remove the “/D TIANO_RELEASE_VERSION=0x00080006” option in Nt32Pkg DSC file, since it’s not used in source code. 2013-11-26 07:36:29 +00:00
Omap35xxPkg EmbeddedPkg: Introduced a separate SerialPortExtLib library 2013-03-12 00:40:11 +00:00
OptionRomPkg OptionRomPkg: Corrected path for the FtdiUsbSerialDxe.inf in OptionRomPkg.dsc 2013-11-01 17:01:23 +00:00
OvmfPkg OvmfPkg: QemuFlashFvbServicesRuntimeDxe: fix out-of-LBA write access 2013-12-17 18:17:55 +00:00
PcAtChipsetPkg Fix PciHostBridge driver to return success for EfiPciHostBridgeEndEnumeration to fix OVMF boot no display issue. 2013-07-22 07:35:51 +00:00
PerformancePkg Refine the select language logic. 2013-09-05 05:39:57 +00:00
SecurityPkg Correct INF file to make module pass ICC compiler. 2013-12-11 08:22:43 +00:00
ShellBinPkg ShellBinPkg: Update ARM and AArch64 Binaries with svn 14706 ShellPkg sources 2013-09-24 10:22:32 +00:00
ShellPkg Update code to ensure the pointer ‘CurrentName’ in function ‘PerformSingleMappingDisplay’ isn’t null before being processed. 2013-12-17 01:04:38 +00:00
SourceLevelDebugPkg Check Context before use it. 2013-12-13 06:15:50 +00:00
StdLib Fix the non-blocking behavior for connect. The behavior was correct if the code polled the connect routine but was not correct when using select to complete the asynchronous request. This change fixes the select case by moving where some of the operations performed upon the connection completion. 2013-12-13 19:22:39 +00:00
StdLibPrivateInternalFiles EADK (StdLib, AppPkg, StdLibPrivateInternalFiles): Update ReadMe.txt in all packages. 2013-10-24 23:14:10 +00:00
UefiCpuPkg Fix meta file issue. 2013-12-13 04:46:47 +00:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
BuildNotes2.txt Update to new SVN URL in readme.txt 2013-06-08 05:26:39 +00:00
edksetup.bat Update edksetup.bat to check VS2012 2013-09-04 07:41:04 +00:00
edksetup.sh Correct copyright year 2011-02-16 12:21:31 +00:00