Add pci_is_vga_ioport_range() and pci_is_vga_memory_range() as inline
functions. These functions centralize the details of which I/O port and memory ranges belong to VGA. Reviewed by: imp@, jhb@
This commit is contained in:
parent
d1ee178775
commit
9929ff6b5b
@ -287,6 +287,24 @@ pci_disable_io(device_t dev, int space)
|
|||||||
return(PCI_DISABLE_IO(device_get_parent(dev), dev, space));
|
return(PCI_DISABLE_IO(device_get_parent(dev), dev, space));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if the address range falls within the VGA defined address range(s)
|
||||||
|
*/
|
||||||
|
static __inline int
|
||||||
|
pci_is_vga_ioport_range(u_long start, u_long end)
|
||||||
|
{
|
||||||
|
|
||||||
|
return (((start >= 0x3b0 && end <= 0x3bb) ||
|
||||||
|
(start >= 0x3c0 && end <= 0x3df)) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline int
|
||||||
|
pci_is_vga_memory_range(u_long start, u_long end)
|
||||||
|
{
|
||||||
|
|
||||||
|
return ((start >= 0xa0000 && end <= 0xbffff) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PCI power states are as defined by ACPI:
|
* PCI power states are as defined by ACPI:
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user