OvmfPkg/README: Update required QEMU & OS boot status

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

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13999 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: add comments to existing \_Sx packages in DSDT

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14000 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: fix PIIX4 SUS_TYP value in \_S4 package

The ACPI 5.0 specification says:

  7.3.4.5 System \_S4 State

  [...]
  * DRAM context is not maintained.
  [...]

This corresponds to the following in the PIIX4 spec:

  PMCNTRL -- POWER MANAGEMENT CONTROL REGISTER (IO)
  [...]
  Bits[12:10]  Suspend Type
  [...]
          010  POSCL (Powered On Suspend, Context Lost)

Also, this (ie. decimal 2) is the default suspend type value that qemu
recognizes as an S4 (suspend to disk) request.

Only the value for PM1a_CNT.SLP_TYP is corrected (PM1b_CNT.SLP_TYP is left
at zero), since in OVMF we don't report the optional PM1b_EVT_BLK register
block to OSPM. (PM1b_EVT_BLK is defined as 0 in "Platform.h"; see "4.8.1.1
PM1 Event Registers" in the ACPI 5.0 specification.)

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14001 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: report S3 state in DSDT

The ACPI 5.0 specification says:

  7.3.4.4 System \_S3 State

  [...]
  * Dynamic RAM context is maintained.
  [...]

This corresponds to the following in the PIIX4 spec:

  PMCNTRL -- POWER MANAGEMENT CONTROL REGISTER (IO)
  [...]
  Bits[12:10]  Suspend Type
  [...]
          001  STR (Suspend To RAM)

Also, this (ie. decimal 1) is the suspend type value that qemu recognizes
as an S3 (suspend to ram) request.

Only the value for PM1a_CNT.SLP_TYP is set (PM1b_CNT.SLP_TYP is left at
zero), since in OVMF we don't report the optional PM1b_EVT_BLK register
block to OSPM. (PM1b_EVT_BLK is defined as 0 in "Platform.h"; see "4.8.1.1
PM1 Event Registers" in the ACPI 5.0 specification.)

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14002 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: create \_S3 and \_S4 packages dynamically

Move these states from the DSDT to the SSDT. Override the default
configuration if the host has the following qemu commit:

    commit 459ae5ea5ad682c2b3220beb244d4102c1a4e332
    Author: Gleb Natapov <gleb@redhat.com>
    Date:   Mon Jun 4 14:31:55 2012 +0300

        Add PIIX4 properties to control PM system states.

        This patch adds two things. First it allows QEMU to distinguish
        between regular powerdown and S4 powerdown. Later separate QMP
        notification will be added for S4 powerdown. Second it allows
        S3/S4 states to be disabled from QEMU command line. Some guests
        known to be broken with regards to power management, but allow to
        use it anyway. Using new properties management will be able to
        disable S3/S4 for such guests.

        Supported system state are passed to a firmware using new fw_cfg
        file. The file contains  6 byte array. Each byte represents one
        system state. If byte at offset X has its MSB set it means that
        system state X is supported and to enter it guest should use the
        value from lowest 3 bits.

        Signed-off-by: Gleb Natapov <gleb@redhat.com>
        Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14003 6f19259b-4bc3-4df7-8a09-765794883524
Add boot mode BOOT_WITH_MFG_MODE_SETTINGS.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14004 6f19259b-4bc3-4df7-8a09-765794883524
Reclaim work space when the remaining space size is even not enough to contain one header + one record.

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

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14005 6f19259b-4bc3-4df7-8a09-765794883524
Base on the value type to get the value for default opcode.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14006 6f19259b-4bc3-4df7-8a09-765794883524
Fix GCC build fail issue for MdeModulePkg and NetworkPkg.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14007 6f19259b-4bc3-4df7-8a09-765794883524