Comment 21 for bug 1715700

Revision history for this message
Laszlo Ersek (Red Hat) (lersek) wrote : Re: [Bug 1715700] Re: Windows 7 guest won't boot on qemu 2.10 (works on 2.9)

On 09/19/17 13:49, Gerd Hoffmann wrote:
> ovmf seems to not touch pam configuration, so rom remains mapped.

I don't understand; the code that I quoted above -- and that LaunchPad
messed up -- explicitly changes the PAM registers:

  //
  // Put the shim in place first.
  //
  Pam1Address = PCI_LIB_ADDRESS (0, 0, 0, 0x5A);
  //
  // low nibble covers 0xC0000 to 0xC3FFF
  // high nibble covers 0xC4000 to 0xC7FFF
  // bit1 in each nibble is Write Enable
  // bit0 in each nibble is Read Enable
  //
  Pam1 = PciRead8 (Pam1Address);
  PciWrite8 (Pam1Address, Pam1 | (BIT1 | BIT0));

...

  //
  // Clear Write Enable (bit1), keep Read Enable (bit0) set
  //
  PciWrite8 (Pam1Address, (Pam1 & ~BIT1) | BIT0);

> seabios in contrast maps the address range to ram instead.
> IIRC ovmf does that too in CSM mode.
> So, yes, probably this is fixable in ovmf.

I don't see how.

Thanks
Laszlo