Commit Graph

15 Commits

Author SHA1 Message Date
jljusten 3d80db51f4 OvmfPkg/AcpiPlatformDxe: split S3/S4 package into bytes
This should be more compatible with AML parsers in practice
since older versions of ACPICA's OS support would not accept
the previous OVMF format (despite being spec compliant).
(For example, on OpenBSD 5.2 it caused a kernel crash)

ACPICA has fixed this issue in:
https://github.com/otcshare/acpica/commit/5869690a

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

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14130 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-14 19:20:57 +00:00
jljusten 14430c55c8 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
2012-12-17 02:13:14 +00:00
jljusten ff8dd312dd OvmfPkg/AcpiPlatformDxe: Fix Visual Studio build issues
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13634 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-15 00:03:35 +00:00
jljusten 498f7d8ddd OvmfPkg: generate full MADT dynamically, synchronize contents with qemu
Represent the set of possible PCI link target IRQs with
Pcd8259LegacyModeEdgeLevel. This ensures that the 8259 Interrupt
Controller code in PcAtChipsetPkg will treat them as level-triggered too.

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@13628 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-13 15:42:07 +00:00
jljusten 26af9aca92 OvmfPkg/AcpiPlatformDxe: Fix Visual Studio build issues
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@13602 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-09 23:27:05 +00:00
jljusten 57c0beb609 OvmfPkg: scan memory space map and populate FWDT (32-bit fields only)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
[jordan.l.justen@intel.com: minor cleanup]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13574 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-31 18:18:01 +00:00
jljusten 253a2ea73f OvmfPkg: install an SSDT with a dynamic OperationRegion called FWDT
"FWDT" ("firmware data") is allocated as EfiReservedMemoryType, with
AllocateReservedPool(). <MdePkg/Include/Library/MemoryAllocationLib.h>
doesn't seem to provide direct access to EfiACPIReclaimMemory, but at this
point the former seems sufficient.

Based on SeaBIOS commit 2062f2ba by Gerd Hoffmann <kraxel@redhat.com>.

v3:
- coding style fixes:
  - BDAT     -> FWDT
  - __packed -> #pragma pack(1)
  - BFLD     -> FIRMWARE_DATA, PCI_WINDOW
  - Bfld     -> FwData
- Ssdt.asl: changed license to 2-clause BSDL, paraphrasing Dsdt.asl

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@13573 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-31 18:17:51 +00:00
jljusten b5c91f01d2 OvmfPkg/AcpiPlatformDxe: rely on built-in checksumming
Implementation in
"MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c":

  InstallAcpiTable()
    SetAcpiTable(... Checksum=TRUE ...)
      AddTableToList(... Checksum=TRUE ...)
        AcpiPlatformChecksum()

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@13543 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-18 22:34:01 +00:00
jljusten 4804ef4943 OvmfPkg/AcpiPlatformDxe/Xen.c: reuse CalculateSum8
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@13542 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-18 22:33:48 +00:00
jljusten 377e758c3f OvmfPkg/AcpiPlatformDxe: Add Xen ACPI tables support
This patch adds Xen ACPI tables support to OVMF.
Use EFI_ACPI_TABLE_PROTOCOL to publish all Xen ACPI tables in OVMF,
while keeping the Qemu and KVM support.

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

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13541 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-18 22:33:33 +00:00
ydong10 917ab9077d Fix file guid conflict.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13430 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-07 03:21:17 +00:00
jljusten 75ccc2b211 OvmfPkg/AcpiPlatformDxe: Fix VS2010 build issue
Reported-by: Liming Gao <liming.gao@intel.com>
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@13425 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-01 17:55:00 +00:00
jljusten 255b418415 OvmfPkg/AcpiPlatformDxe: Dynamically add Local APIC entries in MADT
Update MADT processing for QEMU to add additional Local APIC
entries to the MADT.

The MADT is still built with a single Local APIC entry.
If the AcpiPlatformDxe driver determines that more processors
are available, then additional Local APIC entries are added
to the MADT at runtime.

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13387 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-30 23:15:59 +00:00
jljusten 522203de37 OvmfPkg/AcpiPlatformDxe: Detect QEMU & Xen
Detect QEMU & Xen, and allow each to choose how to publish
the individual ACPI tables.

Currently both paths simply publish the tables unmodified.

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13385 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-30 23:15:27 +00:00
jljusten 7d2bd1505b OvmfPkg: Add AcpiPlatformDxe
This driver is currently a direct copy of
MdeModulePkg/Universal/Acpi/AcpiPlatformDxe.

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13384 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-30 23:15:00 +00:00