/*
* (C) Copyright IBM Corporation 2006
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/**
* \file pciaccess_private.h
* Functions and datastructures that are private to the pciaccess library.
*
* \author Ian Romanick <idr@us.ibm.com>
*/
#else /* not gcc >= 4 and not Sun Studio >= 8 */
# define _pci_hidden
#endif /* GNUC >= 4 */
struct pci_device_mapping;
struct pci_device_mapping *map);
struct pci_system_methods {
void (*destroy)( void );
struct pci_device_mapping *map);
};
struct pci_device_mapping {
unsigned region;
unsigned flags;
void *memory;
};
struct pci_device_private {
const char * device_string;
/**
* \name PCI Capabilities
*/
/*@{*/
/*@}*/
/**
* Base address of the device's expansion ROM.
*/
/**
* \name Bridge information.
*/
/*@{*/
union {
} bridge;
/*@}*/
/**
* \name Mappings active on this device.
*/
/*@{*/
unsigned num_mappings;
/*@}*/
};
/**
* Base type for tracking PCI subsystem information.
*/
struct pci_system {
/**
* Platform dependent implementations of specific API routines.
*/
/**
* Number of known devices in the system.
*/
/**
* Array of known devices.
*/
#ifdef HAVE_MTRR
int mtrr_fd;
#endif
int vgaarb_fd;
int vga_count;
};
extern struct pci_system * pci_sys;
extern int pci_system_linux_sysfs_create( void );
extern int pci_system_freebsd_create( void );
extern int pci_system_netbsd_create( void );
extern int pci_system_openbsd_create( void );
extern void pci_system_openbsd_init_dev_mem( int );
extern int pci_system_solx_devfs_create( void );