Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Laszlo Ersek 504ab5731d OvmfPkg: AcpiS3SaveDxe: prepare for End-of-Dxe callback
We are preparing for detaching the S3Ready() functionality from the
EFI_ACPI_S3_SAVE_PROTOCOL.S3Save() protocol member function. Instead, we
will hook the same logic to the End-of-Dxe event group.

The EFI_ACPI_S3_SAVE_PROTOCOL has another member: GetLegacyMemorySize().
According to the documenation,

  This function returns the size of the legacy memory (meaning below 1 MB)
  that is required during an S3 resume. Before the Framework-based
  firmware transfers control to the OS, it has to transition from flat
  mode into real mode in case the OS supplies only a real-mode waking
  vector. This transition requires a certain amount of legacy memory.
  After getting the size of legacy memory below, the caller is responsible
  for allocating the legacy memory below 1 MB according to the size that
  is returned. The specific implementation of allocating the legacy memory
  is out of the scope of this specification.

When EFI_ACPI_S3_SAVE_PROTOCOL.S3Save() is called, the address of the
legacy memory allocated above must be passed to it, in the
LegacyMemoryAddress parameter.

In practice however:

- The S3Ready() function ignores the LegacyMemoryAddress completely.

- No code in the edk2 tree calls
  EFI_ACPI_S3_SAVE_PROTOCOL.GetLegacyMemorySize(), ever.

- All callers of this specific implementation of
  EFI_ACPI_S3_SAVE_PROTOCOL.S3Save() in the edk2 tree pass a NULL
  LegacyMemoryAddress:

  BdsLibBootViaBootOption()
  [IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c]

For this reason, ASSERT() explicitly that LegacyGetS3MemorySize() is never
called, and that the LegacyMemoryAddress parameter is always NULL.

This fact is important to capture in the code, because in the End-of-Dxe
callback, no LegacyMemoryAddress parameter can be taken. So let's make it
clear that we actually don't even have any use for that parameter.

This patch ports the identical change from IntelFrameworkModulePkg to
OvmfPkg.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17806 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 06:36:38 +00:00
AppPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
ArmPkg ArmPkg/ArmLib: Fixed build after recent BaseTools changes 2015-06-15 15:31:29 +00:00
ArmPlatformPkg ArmPlatformPkg: Use the merged Variable driver 2015-07-01 03:10:01 +00:00
ArmVirtPkg ArmVirtPkg: build runtime drivers with 64 KB section alignment 2015-07-02 06:36:10 +00:00
BaseTools BaseTools: AArch64: use explicit linker scripts 2015-07-02 06:36:00 +00:00
BeagleBoardPkg ArmPlaformPkg: Replaced gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut 2015-05-13 18:25:47 +00:00
Conf EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
CorebootModulePkg CorebootModulePkg: Get power management register addresses. 2015-07-01 09:41:58 +00:00
CorebootPayloadPkg CorebootPayloadPkg: Fix "reset -s" issue. 2015-06-25 16:02:16 +00:00
CryptoPkg CryptoPkg: Fix the dereferenced pointer issue 2015-06-30 03:27:23 +00:00
DuetPkg DuetPkg: Use the new PCDs defined in MdePkg. 2015-05-06 03:26:49 +00:00
EdkCompatibilityPkg EdkCompatibilityPkg SmmBaseHelper: Unregister profile image correctly. 2015-06-09 09:42:15 +00:00
EdkShellBinPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EdkShellPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EmbeddedPkg EmbeddedPkg/AcpiLib: Introduced LocateAndInstallAcpiFromFvConditional() 2015-05-29 14:39:41 +00:00
EmulatorPkg EmulatorPkg: Add TpmMeasurementLib and AuthVariableLib library mapping 2015-07-01 03:06:09 +00:00
FatBinPkg FatBinPkg: Update ARM and AArch64 binaries 2015-02-27 17:27:42 +00:00
IntelFrameworkModulePkg IntelFrameworkModulePkg: AcpiS3SaveDxe: call S3Ready() at End-of-Dxe 2015-07-02 06:36:29 +00:00
IntelFrameworkPkg IntelFrameworkPkg FrameworkUefiLib: Use safe string functions 2015-06-30 06:28:57 +00:00
IntelFspPkg IntelFspPkg BaseFspDebugLibSerialPort: Use safe string functions 2015-06-30 06:30:20 +00:00
IntelFspWrapperPkg IntelFspWrapperPkg: Update PeiFspHobProcessLibSample to consume PI CapsulePpi 2015-05-08 07:44:30 +00:00
MdeModulePkg MdeModulePkg: Update DxeCore to handle LoadFile DevicePath 2015-07-02 04:28:21 +00:00
MdePkg MdePkg: Add P2P Bridge Secondary Latency Timer register definition 2015-07-01 15:21:35 +00:00
NetworkPkg NetworkPkg: Remove unused variables from IpSecDxe to fix GCC build. 2015-07-01 03:35:32 +00:00
Nt32Pkg Nt32Pkg: Use the merged Variable driver 2015-07-01 03:09:00 +00:00
Omap35xxPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
OptionRomPkg Add IPV6 support from UNDI 2015-04-30 02:57:10 +00:00
OvmfPkg OvmfPkg: AcpiS3SaveDxe: prepare for End-of-Dxe callback 2015-07-02 06:36:38 +00:00
PcAtChipsetPkg PcAtChipsetPkg: Fix PCD expression build failure 2015-06-12 01:43:46 +00:00
PerformancePkg PerformancePkg Dp_App: Resolve buffer size mismatch 2015-06-30 06:31:28 +00:00
SecurityPkg SecurityPkg: Delete Auth Variable driver 2015-07-01 03:13:02 +00:00
ShellBinPkg ShellBinPkg: Ia32/X64 Shell binary update. 2015-06-12 11:20:53 +00:00
ShellPkg ShellPkg: Refine the code logic of StrnCatGrow. 2015-07-02 01:12:03 +00:00
SourceLevelDebugPkg SourceLevelDebugPkg/DebugAgent: Add typecast to fix sign extension 2015-06-26 03:06:50 +00:00
StdLib */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
StdLibPrivateInternalFiles */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
UefiCpuPkg UefiCpuPkg S3Resume2Pei: Use safe string functions 2015-06-30 06:30:44 +00:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
Vlv2DeviceRefCodePkg Fixed potential security issue introduced by SmramCpuNvs variable. 2015-06-23 07:22:44 +00:00
Vlv2TbltDevicePkg Fixed a couple of typos of 'Configuration' ('Congfiguration') in Vlv2TbltDevicePkg. 2015-07-01 08:45:46 +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 Edk2: Update Edk2Setup.bat 2015-06-16 07:23:45 +00:00
Maintainers.txt Maintainers.txt: Added Leif Lindholm as a co-maintainer 2015-05-29 16:23:52 +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