pci.h revision 5c85b3c44a1183799f6cd41665aed33310dfa26b
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * PCI - The PCI Controller And Devices.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * Copyright (C) 2006 InnoTek Systemberatung GmbH
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * available from http://www.virtualbox.org. This file is free software;
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * you can redistribute it and/or modify it under the terms of the GNU
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * General Public License as published by the Free Software Foundation,
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * distribution. VirtualBox OSE is distributed in the hope that it will
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * be useful, but WITHOUT ANY WARRANTY of any kind.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * If you received this file as part of a commercial VirtualBox
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * distribution, then only the terms of your commercial VirtualBox
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * license agreement apply instead of the previous paragraph.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync/** @defgroup grp_pci PCI - The PCI Controller.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync/** Pointer to a PCI device. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * PCI configuration word 4 (command) and word 6 (status).
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** Supports/uses memory accesses. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * PCI Address space specification.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * This is used when registering a I/O region.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** Memory. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** I/O space. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** Prefetch memory. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * Callback function for mapping an PCI I/O region.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @return VBox status code.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param pPciDev Pointer to PCI device. Use pPciDev->pDevIns to get the device instance.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param iRegion The region number.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param GCPhysAddress Physical address of the region. If iType is PCI_ADDRESS_SPACE_IO, this is an
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * I/O port, else it's a physical address.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * This address is *NOT* relative to pci_mem_base like earlier!
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param enmType One of the PCI_ADDRESS_SPACE_* values.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsynctypedef DECLCALLBACK(int) FNPCIIOREGIONMAP(PPCIDEVICE pPciDev, /*unsigned*/ int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType);
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync/** Pointer to a FNPCIIOREGIONMAP() function. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * Callback function for reading from the PCI configuration space.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @returns The register value.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param pPciDev Pointer to PCI device. Use pPciDev->pDevIns to get the device instance.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param Address The configuration space register address. [0..255]
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param cb The register size. [1,2,4]
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsynctypedef DECLCALLBACK(uint32_t) FNPCICONFIGREAD(PPCIDEVICE pPciDev, uint32_t Address, unsigned cb);
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync/** Pointer to a FNPCICONFIGREAD() function. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync/** Pointer to a PFNPCICONFIGREAD. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * Callback function for writing to the PCI configuration space.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param pPciDev Pointer to PCI device. Use pPciDev->pDevIns to get the device instance.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param Address The configuration space register address. [0..255]
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param u32Value The value that's being written. The number of bits actually used from
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * this value is determined by the cb parameter.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * @param cb The register size. [1,2,4]
254365851c06fac7efeae0a0bf727ed6c6940611vboxsynctypedef DECLCALLBACK(void) FNPCICONFIGWRITE(PPCIDEVICE pPciDev, uint32_t Address, uint32_t u32Value, unsigned cb);
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync/** Pointer to a FNPCICONFIGWRITE() function. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync/** Pointer to a PFNPCICONFIGWRITE. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync/** Fixed I/O region number for ROM. */
254365851c06fac7efeae0a0bf727ed6c6940611vboxsync/** Max number of I/O regions. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * Hack to include the PCIDEVICEINT structure at the right place
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * to avoid duplications of FNPCIIOREGIONMAP and PCI_NUM_REGIONS.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync * PCI Device structure.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsynctypedef struct PCIDevice
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** PCI config space. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** Internal data. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** Read only data.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** PCI device number on the pci bus. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** Device name. */
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync /** Pointer to the device instance which registered the device. */