* [Qemu-devel] [PATCH] bios: Use a different mask to size the option ROM BAR
@ 2009-05-07 16:16 Alex Williamson
0 siblings, 0 replies; only message in thread
From: Alex Williamson @ 2009-05-07 16:16 UTC (permalink / raw)
To: bochs-developers; +Cc: alex.williamson, qemu-devel, kvm
Bit 0 is the enable bit, which we not only don't want to set, but
it will stick and make us think it's an I/O port resource.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
---
bios/rombios32.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/bios/rombios32.c b/bios/rombios32.c
index 269f175..616e70a 100644
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -948,11 +948,13 @@ static void pci_bios_init_device(PCIDevice *d)
int ofs;
uint32_t val, size ;
- if (i == PCI_ROM_SLOT)
+ if (i == PCI_ROM_SLOT) {
ofs = 0x30;
- else
+ pci_config_writel(d, ofs, 0xfffffffe);
+ } else {
ofs = 0x10 + i * 4;
- pci_config_writel(d, ofs, 0xffffffff);
+ pci_config_writel(d, ofs, 0xffffffff);
+ }
val = pci_config_readl(d, ofs);
if (val != 0) {
size = (~(val & ~0xf)) + 1;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-07 16:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-07 16:16 [Qemu-devel] [PATCH] bios: Use a different mask to size the option ROM BAR Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).