mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
VGA adapters need to claim memory and i/o
transactions even if they do not have any
i/o or memory bars. E.g. PCI spec, page 297,
gives an example of such a device:
Programming interface 0000 0000b
VGA-compatible controller. Memory
addresses 0A 0000h through 0B
FFFFh. I/O addresses 3B0h to 3BBh
and 3C0h to 3DFh and all aliases of
these addresses.
While bios could check for these devices and special-case them, it is
easier to fix this by enabling i/o and memory space unconditionally:
devices that do not support it will just ignore this setting.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@643 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Laurent Vivier
parent
3ef33eb736
commit
1f94ed5998
@@ -732,10 +732,6 @@ static void ob_pci_configure_bar(pci_addr addr, pci_config_t *config,
|
||||
base = *io_base;
|
||||
min_align = 1 << 7;
|
||||
amask = 0x00000001;
|
||||
pci_config_write16(addr, PCI_COMMAND,
|
||||
pci_config_read16(addr,
|
||||
PCI_COMMAND) |
|
||||
PCI_COMMAND_IO);
|
||||
} else {
|
||||
/* Memory Space */
|
||||
base = *mem_base;
|
||||
@@ -744,10 +740,6 @@ static void ob_pci_configure_bar(pci_addr addr, pci_config_t *config,
|
||||
if (reg == 6) {
|
||||
smask |= 1; /* ROM */
|
||||
}
|
||||
pci_config_write16(addr, PCI_COMMAND,
|
||||
pci_config_read16(addr,
|
||||
PCI_COMMAND) |
|
||||
PCI_COMMAND_MEMORY);
|
||||
}
|
||||
*p_omask = smask & amask;
|
||||
smask &= ~amask;
|
||||
@@ -788,6 +780,7 @@ ob_pci_configure(pci_addr addr, pci_config_t *config, int num_regs, int rom_bar,
|
||||
|
||||
{
|
||||
uint32_t omask;
|
||||
uint16_t cmd;
|
||||
int reg;
|
||||
pci_addr config_addr;
|
||||
|
||||
@@ -807,6 +800,9 @@ ob_pci_configure(pci_addr addr, pci_config_t *config, int num_regs, int rom_bar,
|
||||
ob_pci_configure_bar(addr, config, reg, config_addr,
|
||||
&omask, mem_base, io_base);
|
||||
}
|
||||
cmd = pci_config_read16(addr, PCI_COMMAND);
|
||||
cmd |= PCI_COMMAND_IO | PCI_COMMAND_MEMORY;
|
||||
pci_config_write16(addr, PCI_COMMAND, cmd);
|
||||
}
|
||||
|
||||
static void ob_scan_pci_bus(int bus, unsigned long *mem_base,
|
||||
|
||||
Reference in New Issue
Block a user