MdeModulePkg/AtaAtapiPassThru: Correct the algo of calculating PRDT number to avoid beyond the boundary of 32 bit.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tian, Feng <feng.tian@intel.com>
Reviewed-by: Zeng, Star <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15667 6f19259b-4bc3-4df7-8a09-765794883524
EmulatorPkg/MpService: modify AP state should hold a mutex

Add mutex when change AP state.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15668 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: extract varstore-related FD Layout Regions to an include file

This saves code duplication between the Ia32, Ia32X64, and X64 flavors,
and enables the next patch to include the varstore in new FD files by
reference.

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@15669 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: build OVMF_VARS.fd, OVMF_CODE.fd, OVMF.fd

OVMF_VARS.fd and OVMF_CODE.fd split the variable store and the firmware
code in separate files.

The PCDs' values continue to depend only on FD_SIZE_1MB vs. FD_SIZE_2MB.
With the split files, it must be ensured on the QEMU command line that
OVMF_VARS.fd and OVMF_CODE.fd be contiguously mapped so that they end
exactly at 4GB. See QEMU commit 637a5acb (first released in v2.0.0).

In this patch we must take care to assign each PCD only once.

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@15670 6f19259b-4bc3-4df7-8a09-765794883524
Fix memory leak issues in BiosSnp module.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15671 6f19259b-4bc3-4df7-8a09-765794883524
Fix wrong usage sizeof(SIZE).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Sergey Isakov <isakov-sl@bk.ru>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni<ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15672 6f19259b-4bc3-4df7-8a09-765794883524
Fixed one possible array  out of bounds issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by:  isakov-sl@bk.ru
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15673 6f19259b-4bc3-4df7-8a09-765794883524
Fix one memory leak.

Contributed-under: TianoCore Contribution Agreement 1.0
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@15674 6f19259b-4bc3-4df7-8a09-765794883524
Clear the whole EFI_PHYSICAL_ADDRESS CapsuleDataPtr64 to 0 at first to avoid rubbish data in high 32 bits.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Review-by: Feng Tian <feng.tian@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15675 6f19259b-4bc3-4df7-8a09-765794883524
Add IntelFspWrapper to support boot EDKII on FSP bin.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed off by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed by: Ravi Rangarajan <ravi.p.rangarajan@intel.com>
Reviewed by: Maurice Ma <maurice.ma@intel.com>
Reviewed by: Giri Mudusuru <giri.p.mudusuru@intel.com>
Reviewed by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15676 6f19259b-4bc3-4df7-8a09-765794883524
StdLib/LibC/StdLib/Malloc.c: Revert cast removal to fix GCC build breakage.
 
The cast to (void**) is needed for the last parameter of the AllocatePool call in malloc().  This is because type CPOOL_HEAD** is not automatically promoted to void**, as required by AllocatePool().
 
This was originally addressed in SVN revision 15474 but removed again in 15664.
 
 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed by: Stefan Kaeser <stefankaeser@hotmail.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15677 6f19259b-4bc3-4df7-8a09-765794883524
CodeModule: BaseTools - Removing Win32 binaries to be replaced with an svn:external to the https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32
This change allows users to checkout the edk2 project ignoring the svn:externals.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lhauch <larry.hauch@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15678 6f19259b-4bc3-4df7-8a09-765794883524
CodeModule: BaseTools - Adding the svn:external to the https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32
This change allows users to checkout the edk2 project ignoring the svn:externals.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lhauch <larry.hauch@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15679 6f19259b-4bc3-4df7-8a09-765794883524
MdeModulePkg: Fix parameter verification for SetAttribute

Check for 8th bit being reserved as per UEFI spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15680 6f19259b-4bc3-4df7-8a09-765794883524
ShellPkg: Fix calls to SimpleTextOut->SetAttribute to not use reserved bits

As the shell inverts foreground and background it needs to be sure that it properly masks off the reserved bits and this is important since the foreground and background are not the same numbers of bits.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15681 6f19259b-4bc3-4df7-8a09-765794883524
Report warning info if an action opcode has text two statement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15682 6f19259b-4bc3-4df7-8a09-765794883524
Clean 1 build error and 1 warning for VfrCompiler.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15683 6f19259b-4bc3-4df7-8a09-765794883524
Report warning info if vfr file use the flags used for framework code only.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15684 6f19259b-4bc3-4df7-8a09-765794883524
Update GenFv tool to handle the file path with space.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming liming.gao@intel.com
Review-by: Kinney, Michael D michael.d.kinney@intel.com

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15685 6f19259b-4bc3-4df7-8a09-765794883524
BaseTools: Clear build versions to sync with buildtools/BaseTools

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

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