efifb (EFI frame buffer) doesn't work in RHEL-6.3 guests on RHEL-6.3
qemu-kvm without the "pci=nocrs" guest kernel parameter. This is because
dynamic MMIO range allocation places the emulated Cirrus card's frame
buffer much lower than specified in the _CRS. Try to sync the related
bits.

v1->v2:
- dropped most of v1 and started from scratch
- ASL / AML heavily based on SeaBIOS commit 2062f2ba by Gerd Hoffmann
  <[email protected]>
- to be applied on top of:
  - (svn rev 13538)
  - Bei Guan's patch in
    <caeqjb-tt0fxup3fjnd+cn7clk5jdjpgjpqpbc+amt+28ohd...@mail.gmail.com>
  - my first two patches in <[email protected]>

v2 testing (pci=nocrs never passed, efifb working):

  2 GB guest, OVMF debug output
  -----------------------------
  PopulateBfld(): base=0x0000000000000000 length=0x00000000000A0000 
top=0x00000000000A0000 type=system
  PopulateBfld(): base=0x00000000000A0000 length=0x0000000000060000 
top=0x0000000000100000 type=mmio
  PopulateBfld(): base=0x0000000000100000 length=0x000000007FEE0000 
top=0x000000007FFE0000 type=system
  PopulateBfld(): base=0x000000007FFE0000 length=0x000000000000C000 
top=0x000000007FFEC000 type=system
  PopulateBfld(): base=0x000000007FFEC000 length=0x0000000000014000 
top=0x0000000080000000 type=system
  PopulateBfld(): base=0x0000000080000000 length=0x000000007EC01000 
top=0x00000000FEC01000 type=mmio
  PopulateBfld(): base=0x00000000FEC01000 length=0x00000000000FF000 
top=0x00000000FED00000 type=nonexistent
  PopulateBfld(): base=0x00000000FED00000 length=0x0000000000000400 
top=0x00000000FED00400 type=mmio
  PopulateBfld(): base=0x00000000FED00400 length=0x00000000000FFC00 
top=0x00000000FEE00000 type=nonexistent
  PopulateBfld(): base=0x00000000FEE00000 length=0x0000000000100000 
top=0x00000000FEF00000 type=mmio
  PopulateBfld(): base=0x00000000FEF00000 length=0x0000000F01100000 
top=0x0000001000000000 type=nonexistent
  PopulateBfld(): Mmio32MinBase=0x000A0000 Mmio32MaxExclTop=0xFEF00000 
NonMmio32MaxExclTop=0x80000000
  PopulateBfld(): P0S=0x80000000 P0E=0xFEEFFFFF P0L=0x7EF00000

  2 GB guest, dumped & decompiled SSDT
  ------------------------------------
  /*
   * Intel ACPI Component Architecture
   * AML Disassembler version 20090123
   *
   * Disassembly of SSDT.aml, Wed Jul 18 12:41:51 2012
   *
   *
   * Original Table Header:
   *     Signature        "SSDT"
   *     Length           0x00000035 (53)
   *     Revision         0x01
   *     Checksum         0x1C
   *     OEM ID           "REDHAT"
   *     OEM Table ID     "OVMF    "
   *     OEM Revision     0x00000001 (1)
   *     Compiler ID      "INTL"
   *     Compiler Version 0x20090123 (537461027)
   */
  DefinitionBlock ("SSDT.aml", "SSDT", 1, "REDHAT", "OVMF    ", 0x00000001)
  {
      OperationRegion (BDAT, SystemMemory, 0x7FB76F98, 0x00000030)
  }

  2 GB guest, dmesg extract
  -------------------------
  BIOS-e820: 000000007fb21000 - 000000007fb79000 (reserved)
  pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff]
  pci_root PNP0A03:00: host bridge window [mem 0x80000000-0xfeefffff]


  3 GB guest, OVMF debug output
  -----------------------------
  PopulateBfld(): base=0x0000000000000000 length=0x00000000000A0000 
top=0x00000000000A0000 type=system
  PopulateBfld(): base=0x00000000000A0000 length=0x0000000000060000 
top=0x0000000000100000 type=mmio
  PopulateBfld(): base=0x0000000000100000 length=0x00000000BFEE0000 
top=0x00000000BFFE0000 type=system
  PopulateBfld(): base=0x00000000BFFE0000 length=0x000000000000C000 
top=0x00000000BFFEC000 type=system
  PopulateBfld(): base=0x00000000BFFEC000 length=0x0000000000014000 
top=0x00000000C0000000 type=system
  PopulateBfld(): base=0x00000000C0000000 length=0x000000003EC01000 
top=0x00000000FEC01000 type=mmio
  PopulateBfld(): base=0x00000000FEC01000 length=0x00000000000FF000 
top=0x00000000FED00000 type=nonexistent
  PopulateBfld(): base=0x00000000FED00000 length=0x0000000000000400 
top=0x00000000FED00400 type=mmio
  PopulateBfld(): base=0x00000000FED00400 length=0x00000000000FFC00 
top=0x00000000FEE00000 type=nonexistent
  PopulateBfld(): base=0x00000000FEE00000 length=0x0000000000100000 
top=0x00000000FEF00000 type=mmio
  PopulateBfld(): base=0x00000000FEF00000 length=0x0000000F01100000 
top=0x0000001000000000 type=nonexistent
  PopulateBfld(): Mmio32MinBase=0x000A0000 Mmio32MaxExclTop=0xFEF00000 
NonMmio32MaxExclTop=0xC0000000
  PopulateBfld(): P0S=0xC0000000 P0E=0xFEEFFFFF P0L=0x3EF00000

  3 GB guest, dumped & decompiled SSDT
  ------------------------------------
  /*
   * Intel ACPI Component Architecture
   * AML Disassembler version 20090123
   *
   * Disassembly of SSDT.aml, Wed Jul 18 12:38:53 2012
   *
   *
   * Original Table Header:
   *     Signature        "SSDT"
   *     Length           0x00000035 (53)
   *     Revision         0x01
   *     Checksum         0xDC
   *     OEM ID           "REDHAT"
   *     OEM Table ID     "OVMF    "
   *     OEM Revision     0x00000001 (1)
   *     Compiler ID      "INTL"
   *     Compiler Version 0x20090123 (537461027)
   */
  DefinitionBlock ("SSDT.aml", "SSDT", 1, "REDHAT", "OVMF    ", 0x00000001)
  {
      OperationRegion (BDAT, SystemMemory, 0xBFB76F98, 0x00000030)
  }

  3 GB guest, dmesg extract
  -------------------------
  BIOS-e820: 00000000bfb21000 - 00000000bfb79000 (reserved)
  pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff]
  pci_root PNP0A03:00: host bridge window [mem 0xc0000000-0xfeefffff]


  6 GB guest, OVMF debug output
  -----------------------------
  PopulateBfld(): base=0x0000000000000000 length=0x00000000000A0000 
top=0x00000000000A0000 type=system
  PopulateBfld(): base=0x00000000000A0000 length=0x0000000000060000 
top=0x0000000000100000 type=mmio
  PopulateBfld(): base=0x0000000000100000 length=0x00000000DFEE0000 
top=0x00000000DFFE0000 type=system
  PopulateBfld(): base=0x00000000DFFE0000 length=0x000000000000C000 
top=0x00000000DFFEC000 type=system
  PopulateBfld(): base=0x00000000DFFEC000 length=0x0000000000014000 
top=0x00000000E0000000 type=system
  PopulateBfld(): base=0x00000000E0000000 length=0x000000001EC01000 
top=0x00000000FEC01000 type=mmio
  PopulateBfld(): base=0x00000000FEC01000 length=0x00000000000FF000 
top=0x00000000FED00000 type=nonexistent
  PopulateBfld(): base=0x00000000FED00000 length=0x0000000000000400 
top=0x00000000FED00400 type=mmio
  PopulateBfld(): base=0x00000000FED00400 length=0x00000000000FFC00 
top=0x00000000FEE00000 type=nonexistent
  PopulateBfld(): base=0x00000000FEE00000 length=0x0000000000100000 
top=0x00000000FEF00000 type=mmio
  PopulateBfld(): base=0x00000000FEF00000 length=0x0000000001100000 
top=0x0000000100000000 type=nonexistent
  PopulateBfld(): base=0x0000000100000000 length=0x00000000A0000000 
top=0x00000001A0000000 type=reserved
  PopulateBfld(): base=0x00000001A0000000 length=0x0000000E60000000 
top=0x0000001000000000 type=nonexistent
  PopulateBfld(): Mmio32MinBase=0x000A0000 Mmio32MaxExclTop=0xFEF00000 
NonMmio32MaxExclTop=0xE0000000
  PopulateBfld(): P0S=0xE0000000 P0E=0xFEEFFFFF P0L=0x1EF00000

  6 GB guest, dumped & decompiled SSDT
  ------------------------------------
  /*
   * Intel ACPI Component Architecture
   * AML Disassembler version 20090123
   *
   * Disassembly of SSDT.aml, Wed Jul 18 12:30:51 2012
   *
   *
   * Original Table Header:
   *     Signature        "SSDT"
   *     Length           0x00000035 (53)
   *     Revision         0x01
   *     Checksum         0xBC
   *     OEM ID           "REDHAT"
   *     OEM Table ID     "OVMF    "
   *     OEM Revision     0x00000001 (1)
   *     Compiler ID      "INTL"
   *     Compiler Version 0x20090123 (537461027)
   */
  DefinitionBlock ("SSDT.aml", "SSDT", 1, "REDHAT", "OVMF    ", 0x00000001)
  {
      OperationRegion (BDAT, SystemMemory, 0xDFB76F98, 0x00000030)
  }

  6 GB guest, dmesg extract
  -------------------------
  BIOS-e820: 00000000dfb21000 - 00000000dfb79000 (reserved)
  pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff]
  pci_root PNP0A03:00: host bridge window [mem 0xe0000000-0xfeefffff]

Laszlo Ersek (5):
  OvmfPkg: clean up memory map
  OvmfPkg: install an SSDT with a dynamic OperationRegion called BDAT
  OvmfPkg: scan memory space map and populate BDAT (32-bit fields only)
  OvmfPkg/AcpiTables/Dsdt.asl: strip trailing whitespace
  OvmfPkg/AcpiTables/Dsdt.asl: report the PCI IO ranges set in BDAT

 OvmfPkg/AcpiPlatformDxe/Qemu.c              |  207 ++++++++++++++++++++++++++-
 OvmfPkg/PlatformPei/Platform.c              |   32 ++---
 OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf |    1 +
 OvmfPkg/AcpiTables/AcpiTables.inf           |    1 +
 OvmfPkg/AcpiTables/Dsdt.asl                 |  117 +++++++++++++---
 OvmfPkg/AcpiTables/Ssdt.asl                 |   15 ++
 OvmfPkg/PlatformPei/PlatformPei.inf         |    2 +
 7 files changed, 338 insertions(+), 37 deletions(-)
 create mode 100644 OvmfPkg/AcpiTables/Ssdt.asl


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to