1 Subject: [PATCH] bios: Use the correct mask to size the PCI option ROM BAR
2 From: Alex Williamson <alex.williamson@hp.com>
4 Bit 0 is the enable bit, which we not only don't want to set, but
5 it will stick and make us think it's an I/O port resource.
7 Signed-off-by: Alex Williamson <alex.williamson@hp.com>
8 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 diff --git a/bios/rombios32.c b/bios/rombios32.c
12 index d7e18e9..f861f81 100644
13 --- a/bios/rombios32.c
14 +++ b/bios/rombios32.c
15 @@ -985,11 +985,13 @@ static void pci_bios_init_device(PCIDevice *d)
19 - if (i == PCI_ROM_SLOT)
20 + if (i == PCI_ROM_SLOT) {
23 + pci_config_writel(d, ofs, 0xfffffffe);
26 - pci_config_writel(d, ofs, 0xffffffff);
27 + pci_config_writel(d, ofs, 0xffffffff);
29 val = pci_config_readl(d, ofs);
31 size = (~(val & ~0xf)) + 1;