mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145651
@ -287,6 +287,24 @@ pci_disable_io(device_t dev, int 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:
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user