audk/MdeModulePkg/Universal
Laszlo Ersek f798e8bff7 MdeModulePkg: Acpi: enforce exclusion between FirmwareCtrl and XFirmwareCtrl
The code in AcpiTableDxe handles the installation of FADT and FACS in both
possible orders. In the [FADT, FACS] installation order, the FACS is at
once linked into the FADT. In the [FACS, FADT] installation order, the
FACS is stashed temporarily, and it is linked into the FADT when the FADT
is installed later.

According to the ACPI specification, *at most one* of FADT.FirmwareCtrl
and FADT.XFirmwareCtrl may be nonzero. The code is aware of this
requirement, and it never sets both of them to nonzero values at once.

However, the code doesn't expect the following:

- The caller first installs the FACS, which is stashed. The address that
  is saved happens to fall below 4GB.

- The caller then installs a FADT, with a zero FirmwareCtrl field, and a
  nonzero (pre-populated) XFirmwareCtrl field.

In this case the code sets FADT.FirmwareCtrl to the less-than-4GB address
of the stashed FACS, and leaves the different nonzero value in
FADT.XFirmwareCtrl. This violates the ACPI specification.

Prevent this by always zeroing the field that we do *not* set.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16659 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-26 08:05:04 +00:00
..
Acpi MdeModulePkg: Acpi: enforce exclusion between FirmwareCtrl and XFirmwareCtrl 2015-01-26 08:05:04 +00:00
CapsulePei MdeModulePkg: Source fixes and cleanup for ARMGCC compiles 2014-12-04 00:32:24 +00:00
CapsuleRuntimeDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
Console MdeModulePkg: Source fixes and cleanup for ARMGCC compiles 2014-12-04 00:32:24 +00:00
DebugPortDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
DebugSupportDxe MdeModulePkg DebugSupportDxe: Fix build error with GNU assembler 2014-12-17 05:16:48 +00:00
DevicePathDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
Disk Fix IA32 build failure: Use MultU64x32 for 64bit * 32bit. 2015-01-13 05:33:47 +00:00
DisplayEngineDxe The default type is not returned by display engine, this code update the logic to return it. 2015-01-23 06:11:22 +00:00
DriverSampleDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
EbcDxe Fix X64 native function call prolog. Prepare space for at least 4 arguments, 2014-09-22 05:54:41 +00:00
FaultTolerantWriteDxe MdeModulePkg FaultTolerantWriteDxe: Remove unnecessary @para from function header comments of ReadWorkSpaceData(). 2014-10-10 04:52:38 +00:00
FaultTolerantWritePei MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
FvSimpleFileSystemDxe MdeModulePkg/FvSimpleFileSystem:Fix a potential NULL dereference issue. 2014-12-30 08:18:57 +00:00
HiiDatabaseDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
HiiResourcesSampleDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
LegacyRegion2Dxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
LockBox/SmmLockBox MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
MemoryTest MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
Metronome MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
MonotonicCounterRuntimeDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
Network MdeModulePkg: Source fixes and cleanup for ARMGCC compiles 2014-12-04 00:32:24 +00:00
PCD Fix an issue in the PCD service to prevent potential out of bound array access 2014-11-26 07:17:31 +00:00
PcatSingleSegmentPciCfg2Pei MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
PlatformDriOverrideDxe Locate the config route protocol before install the config access protocol to fix potential issue. 2015-01-23 05:48:44 +00:00
PrintDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
ReportStatusCodeRouter MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
ResetSystemRuntimeDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
SectionExtractionDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
SectionExtractionPei MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
SecurityStubDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
SetupBrowserDxe Avoid change the return status from above code which will also be used later. 2015-01-23 05:49:31 +00:00
SmbiosDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
StatusCodeHandler MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
TimestampDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
Variable MdeModulePkg Variable: Implement VarCheck PROTOCOL 2015-01-05 03:38:36 +00:00
WatchdogTimerDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00