Commit Graph

25416 Commits

Author SHA1 Message Date
Felix Polyudov 842695d2ff BaseTools: Fix incorrect formatting of GenFds command dictionary
GenFdsCommand returned dictionary with elements that
are not compatible with GenFdsApi.
As a result the following options were not processed by GenFdsApi:
-v, -q, -d, --genfds-multi-thread, --ignore-sources
The issue is introduced by commit b3497bad12.

V2: Remove EFI_SOURCE references

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Felix Polyudov <felixp@ami.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-21 18:03:29 +08:00
Fan, ZhijuX 3e1ab49481 BaseTools:Build fail when PCD use in the [DEPEX] section of INF files
Update _FixedPcdVoidTypeDict to FixedVoidTypePcds
'_FixedPcdVoidTypeDict' no longer exists because edk2 version (b23414f6).
'ModuleAutoGen' object has no attribute '_FixedPcdVoidTypeDict'.
Build fail when PCD use in the [DEPEX] section of INF files

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-21 18:03:28 +08:00
Chasel, Chiu e3b8fd1185 IntelFsp2Pkg: Remove unused keyword in new PPI header
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1477

There was unused keyword added in FspmArchConfigPpi.h
header block and should be removed.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2019-01-21 15:49:02 +08:00
Dandan Bi eb76b76218 MdePkg/BasePeCoffLib: Correct the address of RelocBaseEnd
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1426

When calculating the address of RelocBaseEnd,
the RelocBase address is ImageBase + RelocDir->VirtualAddress,
the size of RelocDir is RelocDir->Size.
So the RelocBaseEnd address is:
ImageBase + RelocDir->VirtualAddress + RelocDir->Size - 1
not
ImageBase + RelocDir->VirtualAddress + RelocDir->Size

This patch is to fix this issue when call PeCoffLoaderImageAddress
function to calculate the address of RelocBaseEnd.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-21 10:12:04 +08:00
Feng, Bob C cce9d76358 BaseTools: Allow empty value for HiiPcd in Dsc
https://bugzilla.tianocore.org/show_bug.cgi?id=1466

DEC file defines PCD default value and PCD supported type.
DSC can configure PCD type and value.
If the value is same to default value in DEC file,
DSC can only configure PCD type and leave empty for value.
This usage supports all type PCD except for DynamicHii type.
So, DynamicHii PCD should support this usage. Below is one example in DSC.

for example,
[PcdsDynamicHii.common.DEFAULT]
PcdPkgTokenSpaceGuid.PcdCName|L"VarName"|gVarGuid|0x00||NV,BS

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-18 10:20:01 +08:00
Feng, Bob C c68b564900 BaseTools: Remove EDK_SOURCE keyword from Inf Parser.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350
Remove unused EDK_SOURCE keyword from Inf Parser.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-17 19:49:20 +08:00
Feng, Bob C 7f98ef37f6 BaseTools: Remove EDK_SOURCE keyword from GenFds tool.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350
Remove unused EDK_SOURCE keyword from GenFds tool.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-17 19:49:20 +08:00
Feng, Bob C 0006d3fd0f BaseTools: Remove EDK_SOURCE keyword from ECC Tool
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350
Remove EDK_SOURCE keyword from ECC Tool.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-17 19:49:20 +08:00
Ard Biesheuvel 00755e1c80 ArmPkg/DefaultExceptionHandlerLib: add missing UefiLib include
Commit 31f5388006 ("ArmPkg/DefaultExceptionHandlerLib: use console
if available") added calls to AsciiPrint() to the default exception
handler code, but the ARM version did not include UefiLib.h yet
(even though the .INF declares it unconditionally), resulting in
build breakage. So add the missing include.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-01-17 10:37:24 +01:00
Chasel, Chiu 3837e2e038 IntelFsp2Pkg: Add FspmArchConfigPpi to support Dispatch mode
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1381

In Dispatch mode FSP may consume PPI directly so creating
FSPM_ARCH_CONFIG_PPI to align with FSPM_ARCH_UPD.
Also Keeps new structure size 8 bytes alignment as other
structures.

Test: Verified on internal platform to boot with this PPI
installed successfully.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2019-01-17 07:37:16 +08:00
Ard Biesheuvel 66cffa6525 EmbeddedPkg/NorFlashInfoLib: convert to BASE library
The library's MODULE_TYPE and the module type restrictions it
defines are needlessly strict. Just change the library to BASE
type and drop the restrictions entirely. Also, drop a bogus
library dependency on DxeServicesLib.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-01-16 21:37:10 +01:00
Ard Biesheuvel 31f5388006 ArmPkg/DefaultExceptionHandlerLib: use console if available
Print the minimal 'exception occurred' message to the console as well
as to the serial port if the console is available. This makes such
messages visible on systems where the console is graphical and the
serial is not connected.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
2019-01-16 21:33:35 +01:00
Ard Biesheuvel 1e32c49718 ArmPkg/DefaultExceptionHandlerLib: drop BASE variant
Drop the redundant BASE variant, which is no longer used anywhere
now that DebugAgentSymbolsBaseLib no longer incorporates a vector
table and exception handling.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-01-16 20:30:14 +01:00
Ard Biesheuvel ef9f0bff47 ArmVirtPkg: drop reference to ArmPkg/DefaultExceptionHandlerLibBase
Drop the reference to ArmPkg/DefaultExceptionHandlerLibBase, which
is no longer used anywhere now that DebugAgentSymbolsBaseLib no
longer incorporates a vector table and exception handling.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-01-16 20:30:14 +01:00
Ard Biesheuvel 74a12eae9f ArmPkg/DefaultExceptionHandlerLib: declare the permitted usage context
Declare that this library is only usable in the context of DXE core
or a DXE driver. Set the MODULE_TYPE to BASE: this only affects the
prototype of the constructor (if present) but doesn't actually
restrict the usage context otherwise.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-01-16 20:30:13 +01:00
Ard Biesheuvel 47d9777331 ArmPkg/DebugAgentSymbolsBaseLib: remove exception handling
DebugAgentSymbolsBaseLib is an optional library that is in charge
of extracting debug headers from SEC and PEI_CORE images in memory
so the filename and the offset in memory can be reported via the
UART, allowing a developer to load debugging symbols into his
debugger.

Interestingly enough, DebugAgentSymbolsBaseLib is also in charge of
exception handling before this duty is taken over by either the PEI
core, or the CPU DXE driver when running under PrePi.

Since exceptions are not actually handled at all on AArch64, and simply
routed to the DefaultExceptionHandlerLib (for which a special version
has been created to be usable this early), let's get rid of this
dubious functionality altogether.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-01-16 20:30:13 +01:00
Ard Biesheuvel 5072c47411 MdeModulePkg/MdeModulePkg.dsc: add MM_STANDALONE FTW and variable modules
For build testing coverage, add the newly introduced MM_STANDALONE
versions of the fault tolerant write (FTW) and variable runtime
driver to MdeModulePkg.dsc. Note that the resulting binaries will
not be able to run, since they rely on dummy implementations of
MemoryAllocationLib and HobLib.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>.
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 9b24a7dfcb MdeModulePkg/VarCheckLib: add MM_STANDALONE support
Add MM_STANDALONE to the list of permitted module types of the
VarCheckLib library implementation.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>.
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 55b52703fa MdeModulePkg/AuthVariableLibNull: add MM_STANDALONE support
Add MM_STANDALONE to the list of permitted module types of the
AuthVariableLibNull library implementation.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>.
2019-01-16 20:10:51 +01:00
Ard Biesheuvel fc27682813 MdeModulePkg/MdeModulePkg/dsc: move DxeDebugSupportDxe to x86 only section
MdeModulePkg/Universal/DebugSupportDxe/DebugSupportDxe.inf does not
build for AARCH64 since it does not provide the needed PlDebugSupport.h
header. So move the module to a x86 only section.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>.
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 24dbeca90b MdeModulePkg: implement NULL instance of MemoryAllocationLib library class
In order to permit MM_STANDALONE modules to be built without relying
on StandaloneMmPkg, provide a BASE type NULL implementation of
MemoryAllocationLib.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>.
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 775feb5f26 MdeModulePkg: implement NULL instance of HobLib library class
In order to permit MM_STANDALONE modules to be built without relying
on StandaloneMmPkg, provide a BASE type NULL implementation of HobLib.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>.
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 2ac8d8d55c MdePkg: add MM_STANDALONE implementation of MmServicesTableLib
The newly introduced generic MmServicesTableLib can be implemented
for traditional SMM (as we did already), but MM_STANDALONE drivers
require an implementation that is based on standalone MM.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 5866d49923 MdePkg: introduce standalone MM entry point library implementation
Add an implementation of the StandaloneMmDriverEntryPoint library
class.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 7df4764e6a MdePkg: introduce standalone MM entry point library class
Add the library interface for the standalone MM driver entry point.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 688b2cad7b MdeModulePkg/VariableRuntimeDxe: implement standalone MM version
Reuse most of the existing code to implement a variable runtime
driver that will be able to execute in the context of standalone
MM.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2019-01-16 20:10:51 +01:00
Ard Biesheuvel a855f63e2f MdeModulePkg/VariableRuntimeDxe: factor out boot service accesses
In preparation of providing a standalone MM based variable runtime
driver, move the existing SMM driver to the new MM services table,
and factor out some pieces that are specific to the traditional
driver, mainly related to the use of UEFI boot services, which are
not accessible to standalone MM drivers.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2019-01-16 20:10:51 +01:00
Ard Biesheuvel d0def00d33 MdeModulePkg/FaultTolerantWriteDxe: implement standalone MM version
Implement a new version of the fault tolerant write driver that can
be used in the context of a standalone MM implementation.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 22cedf5bbd MdeModulePkg/FaultTolerantWriteDxe: factor out boot service accesses
In preparation of providing a standalone MM based FTW driver, move
the existing SMM driver to the new MM services table, and factor out
some pieces that are specific to the traditional driver, mainly
related to the use of UEFI boot services, which are not accessible
to standalone MM drivers.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2019-01-16 20:10:51 +01:00
Ard Biesheuvel e2f0d814c1 Vlv2TbltDevicePkg: add MmServicesTableLib resolution
The SMM based FTW and variable drivers are going to depend on
MmServicesTableLib after a subsequent patch, so add a resolution
for it to various Vlv2TbltDevicePkg .dsc files.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2019-01-16 20:10:51 +01:00
Ard Biesheuvel 6126f43994 QuarkPlatformPkg: add MmServicesTableLib resolution
The SMM based FTW and variable drivers are going to depend on
MmServicesTableLib after a subsequent patch, so add a resolution
for it to various QuarkPlatformPkg .dsc files.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-16 17:51:30 +01:00
Ard Biesheuvel 8b3dcd2f9a OvmfPkg: add MmServicesTableLib resolution
The SMM based FTW and variable drivers are going to depend on
MmServicesTableLib after a subsequent patch, so add a resolution
for it to various OvmfPkg .dsc files.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2019-01-16 17:51:00 +01:00
Ard Biesheuvel 0ab029d2f7 MdeModulePkg/MdeModulePkg.dsc: add MmServicesTableLib resolution
The SMM based FTW and variable drivers are going to depend on
MmServicesTableLib after a subsequent patch, so add a resolution
for it to MdeModulePkg.dsc.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2019-01-16 17:50:09 +01:00
Dandan Bi 2f4a5a9f4c MdePkg/BasePeCoffLib: Add more check for relocation data
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1426

V2:
(1) Add NULL pointer check for the input parameters
(2) Add check for the "Adjust" value before applying fix ups.

In function PeCoffLoaderRelocateImageForRuntime, it doesn't
do much check when do relocation. For API level consideration,
it's not safe enough.
So this patch is to replace the same code logic with function
PeCoffLoaderImageAddress which will cover more validation.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-16 22:38:00 +08:00
Liming Gao 9e90fb097c BaseTools VolInfo: Fix XCODE5 build issue
XCODE5 reports warning "equality comparison with extraneous parentheses".
Remove extraneous parentheses around the comparison to silence this warning.
This issue is caused by commit 8daa4278e8.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2019-01-16 22:37:59 +08:00
Ruiyu Ni 1f7b748315 Maintainers.txt: Update mail address
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-15 17:44:35 +08:00
Liming Gao 2d4fd226da BaseTools GenFw: Fix XCODE5 build issue
Warning message is that "equality comparison with extraneous parentheses"
Remove extraneous parentheses around the comparison to silence this warning.
This issue is caused by commit 8daa4278e8.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
2019-01-15 14:44:01 +08:00
Eric Dong eb98fe2ae1 UefiCpuPkg/RegisterCpuFeaturesLib: Replace AcquireSpinLock.
In AcquireSpinLock function, it may call GetPerformanceCounter which
final calls PeiService table. This code may also been used by AP but
AP should not calls PeiService. This patch update code to avoid use
AcquireSpinLock function.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1411

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
2019-01-15 13:27:37 +08:00
Eric Dong 306a58365a MdeModulePkg/BootScriptExecuteorDxe: check 64BIT_WAKE_F in FACS.OSPMFlags
((Facs->Flags & EFI_ACPI_4_0_OSPM_64BIT_WAKE__F) != 0))

In above code, Facs->OspmFlags should be used instead.
EFI_ACPI_4_0_OSPM_64BIT_WAKE__F is a bit in OSPM Enabled Firmware
Control Structure Flags field, not in Firmware Control Structure
Feature Flags.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1430

Cc: Aleksiy <oleksiyy@ami.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2019-01-15 13:17:26 +08:00
Eric Dong de228fb135 UefiCpuPkg/S3Resume2Pei: check 64BIT_WAKE_F in FACS.OSPMFlags.
((Facs->Flags & EFI_ACPI_4_0_OSPM_64BIT_WAKE__F) != 0))

In above code, Facs->OspmFlags should be used instead.
EFI_ACPI_4_0_OSPM_64BIT_WAKE__F is a bit in OSPM Enabled Firmware
Control Structure Flags field, not in Firmware Control Structure
Feature Flags.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1430

Cc: Aleksiy <oleksiyy@ami.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2019-01-15 13:17:26 +08:00
Songpeng Li 44fc27b2bf NetworkPkg/Dhcp6Dxe: Remove an unused global variable.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1413

The global variable mAllDhcpServersAddress has never
been used, this patch is to clean it.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Songpeng Li <songpeng.li@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
2019-01-15 09:39:13 +08:00
Songpeng Li 44e5fa81e3 NetworkPkg/IScsiDxe: Remove unused global variables.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1413

Global variables mIScsiDeviceListUpdated and
mNumberOfIScsiDevices have never been used, this patch
is to clean them.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Songpeng Li <songpeng.li@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
2019-01-15 09:39:13 +08:00
Ard Biesheuvel 76c23f9e0d ArmPkg/ArmMmuLib AARCH64: fix out of bounds access
Take care not to dereference BlockEntry if it may be pointing past
the end of the page table we are manipulating. It is only a read,
and thus harmless, but HeapGuard triggers on it so let's fix it.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-01-14 19:46:57 +01:00
Ard Biesheuvel d08575759e ArmPkg/ArmMmuLib ARM: disregard high memory when setting permissions
Ignore calls to ArmSetMemoryAttributes () when the region described
is outside of the 32-bit addressable range. This memory is not
mapped in the first place, and the current code does not deal with
the high bits correctly, resulting in hangs.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-01-14 19:42:23 +01:00
Ard Biesheuvel e695e44545 BaseTools/tools_def GCC5: disable LTO for ASLC invocations
GCC for 32-bit ARM chokes on .aslc files when running with LTO
enabled. Since LTO has no benefit whatsoever here, just disable
it globally for GCC5 and up when building .aslc files.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-14 18:07:10 +01:00
Ard Biesheuvel 17f5fd9291 MdePkg: implement MmServicesTableLib based on traditional SMM
The definitions of the rebranded MM protocol stack were chosen such
that the existing SMM based core drivers can be reused. So let's
implement MmServicesTableLib based on gEfiMmBaseProtocolGuid, which
is simply gEfiSmmBase2ProtocolGuid under the hood.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-14 09:20:36 +01:00
Jagadeesh Ujja b94aecb4ec MdePkg/Include: add MmServicesTableLib header file
SMM has been rebranded as MM, and can be implemented in traditional
mode or standalone mode, using the same prototype for the services
table. Expose this table via MmServicesTableLib, permitting the
respective implementations to expose a traditional or standalone
version.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jagadeesh Ujja <jagadeesh.ujja@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-14 09:16:39 +01:00
Feng, Bob C 4523bc82ae BaseTools: Remove unused logic for EDKI
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350
Remove gEcpSource global variable in python tool.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
2019-01-14 15:24:22 +08:00
Ashish Singhal 22b35e8bd1 NetworkPkg: Protocol Uninstallation Cleanup
Use UEFILib provided protocol uninstallation abstraction
instead of direct API for a proper cleanup.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1444

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
2019-01-14 13:12:17 +08:00
Feng, Bob C 5bc96263ea BaseTools: Enable component override functionality
https://bugzilla.tianocore.org/show_bug.cgi?id=1449
This patch enable build tools to recognize that
when two given files have the same GUID, file path and ARCH in Dsc,
The later one's definition will be used.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Carsey Jaben <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-01-14 11:14:24 +08:00