MdeModulePkg Pcd DXE: Handle the case gPcdDataBaseHobGuid HOB is not present.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15027 6f19259b-4bc3-4df7-8a09-765794883524
Clean up hard-coded offsets and other utter bogosity in Thunk16.S

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15028 6f19259b-4bc3-4df7-8a09-765794883524
MdePkg: First instruction after clearing CR0.PE must be a far jmp.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15029 6f19259b-4bc3-4df7-8a09-765794883524
Rollback the change 15021.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15030 6f19259b-4bc3-4df7-8a09-765794883524
Set the type of variable 'StatusCode' as SHELL_STATUS to match the parameter type of function 'SetLastError'.

Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15031 6f19259b-4bc3-4df7-8a09-765794883524
Keep consistent about the return value between the caller and callee.

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@15032 6f19259b-4bc3-4df7-8a09-765794883524
Update MemoryAllocationLib.AllocateAlignedPages API comments for memory overflow ASSERT case.

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


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15033 6f19259b-4bc3-4df7-8a09-765794883524
Update MemoryAllocationLib AllocateAlignedPages API comments for memory overflow ASSERT case.

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


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15034 6f19259b-4bc3-4df7-8a09-765794883524
Correct the RemainingPages calculation in PEI AllocatePages service.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15035 6f19259b-4bc3-4df7-8a09-765794883524
Update the heap migration logic to avoid memory overflow. 

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15036 6f19259b-4bc3-4df7-8a09-765794883524
Correct function comments of S3BootScriptSaveDispatch2().

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15037 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg/README: Update information about running OVMF

The new instructions document -pflash & -bios options
for running OVMF on QEMU.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15038 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg/README: Update OVMF status

Remove 'Alpha' status tag. Let's just refer to the OVMF
releases by their revision control version.

Remove 'stabilize UEFI Linux' to-do item.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15039 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg/create-release.py: Remove '-alpha' from filename

The source control revision is still the produced filename.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15040 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg/create-release.py: Support GCC44 through GCC47

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15041 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg/create-release.py: Support git hash versions

Previously we would run 'git svn info' if a .svn directory
wasn't found. This would fail if the current local commit
was not from git-svn.

Now we look for the svn info in the output from git log.
If the svn version is not in a git-svn-id tag from
git log, then we use the git commit hash.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15042 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg/create-release.py: Read License.txt files

Rather than embedding the License information in this script,
we now read the License.txt files from MdePkg & FatBinPkg.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15043 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: QemuFwCfgLib: introduce InternalQemuFwCfgIsAvailable()

This internal function allows separation of library-internal and
for-clients external availability of fw_cfg.

The interface contract of QemuFwCfgIsAvailable() is changed so that now it
may modify fw_cfg state. All current users are compliant with the new
contract.

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@15044 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: QemuFwCfgLib: extract stateful implementation

The current implementation of QemuFwCfgLib is:
- stateful
- implicitly initialized in the library constructor.

OVMF's SEC runs from read-only memory/flash. When the library is linked
into a SEC binary (which currently never happens), the
"mQemuFwCfgSupported" global variable becomes read-only, making the
library non-functional.

Extract the stateful, implicitly initialized library implementation into a
separate file, making room for a stateless, explicitly queried
implementation that's usable in SEC. Restrict the stateful implementation
to the current, non-SEC clients.

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@15045 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: QemuFwCfgLib: implement for SEC

The QemuFwCfgSecLib library instance
- is stateless,
- has no library constructor,
- is available to SEC client code,
- must be queried with QemuFwCfgIsAvailable() before use,
- is restricted to SEC in order to limit the explicit querying
  requirement. (There is no current user.)

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@15046 6f19259b-4bc3-4df7-8a09-765794883524