1. Add defines for MAX values for UEFI data types.
2. Remove the #defines and add the extern declarations for gEfiDebugPortVariableGuid and gEfiDebugPortDevicePathGuid.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: michael.d.kinney@intel.com
Reviewed-by: Star Zeng <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14465 6f19259b-4bc3-4df7-8a09-765794883524
Update PeiMemoryAllocationLib instance to support AllocateReservedPages() API.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: michael.d.kinney@intel.com

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14466 6f19259b-4bc3-4df7-8a09-765794883524
Refine the validation for the input attribute before return.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14467 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg: Fix UncachedFreeAlignedPages in UncachedMemoryAllocationLib

Route both the setting and restoring of cacheability through DXE Services/GCD
and stop using the CPU AP directly.
The patch also removes all references to the CPU AP which eliminates the need
for a library constructor.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Senthil Ramakrishnan <senthil.ramakrishnan@hp.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14468 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/UncachedMemoryAllocationLib: Removed unused header (Protocol/Cpu.h)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14469 6f19259b-4bc3-4df7-8a09-765794883524
Fixes the GCC build 'Unused variable' warning (raised an error when warnings are treated as errors).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14470 6f19259b-4bc3-4df7-8a09-765794883524
Change the PcdSrIovSystemPageSize from type of [PcdFixedAtBuild] to [PcdFixedAtBuild, PcdDynamic, PcdDynamicEx] so that it’s runtime configurable.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14471 6f19259b-4bc3-4df7-8a09-765794883524
Fix IA32 build failure.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14472 6f19259b-4bc3-4df7-8a09-765794883524
Rollback patch 14470, because it error check in some extra ending code.

Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14473 6f19259b-4bc3-4df7-8a09-765794883524
Fixes the GCC build 'Unused variable' warning (raised an error when warnings are treated as errors).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14474 6f19259b-4bc3-4df7-8a09-765794883524
ShellPkg: Update error to be SHELL_STATUS and not EFI_STATUS.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14475 6f19259b-4bc3-4df7-8a09-765794883524
Expand the PcdSrIovSystemPageSize type to PcdsPatchableInModule.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Kinney Michael <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14476 6f19259b-4bc3-4df7-8a09-765794883524
ArmPlatformPkg: Removed the check on the CpuId to release the secondary cores from their mailbox spinning

The idea is to remove the PCD PcdGicPrimaryCoreId to make the port easier (and also to allow changing
the primary boot CPU without adding more platform specific code to UEFI).

There is a risk the mailboxes contain garbage at boot time. But it should be easy enough to clear the
mailboxes when starting UEFI to workaround this limitation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14477 6f19259b-4bc3-4df7-8a09-765794883524
EmbeddedPkg/PrePiMemoryAllocationLib: Added dummy FreePages()

This function is exposed by the MemoryAllocationLib header.
A dummy FreePages() function has been added to fix modules depending on
this library and this function.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14478 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/PL390Gic: Populate the GIC Distributor Target Register with the GIC CPU ID retrieved from the GIC

The GIC CPU Id (the GIC CPU interface the CPU is connected to) can be retrieved by reading the first
registers of the GIC CPU Target Registers.
The first GIC Distributor Target registers correspond to the SGIs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14479 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg: Removed the non-used PCD PcdGicPrimaryCoreId

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14480 6f19259b-4bc3-4df7-8a09-765794883524
Per gmtime manpage, tm_mon is the number of months since January 
while MonthNo is the month of the year, so tm_mon should be MonthNo-1.

Similarly, tm_mday is the day of the month, and DayNo is the number 
of days since the first day of the month. Assigning DayNo+1 to 
tm_mday to fit the definition.

This commit also corrected miscalculated MonthNo and DayNo for the 
first day of the month. (Thanks to Laszlo Ersek!)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Long Qin <qin.long@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14481 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/CpuDxe: Moved memory mapping functions that are not architecture specific to 'CpuMmuCommon.c'

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14482 6f19259b-4bc3-4df7-8a09-765794883524
The PCI host bridge can signal failures in its initialization to
the PCI Bus driver through the function call NotifyPhase().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14483 6f19259b-4bc3-4df7-8a09-765794883524
ShellPkg: remove high bit to change a EFI_STATUS to a SHELL_STATUS

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14484 6f19259b-4bc3-4df7-8a09-765794883524