1 | /* $Id: PCIInternal.h 11230 2008-08-08 02:25:34Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * DevPCI - PCI Internal header - Only for hiding bits of PCIDEVICE.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | * additional information or have any questions.
|
---|
20 | */
|
---|
21 |
|
---|
22 | #ifndef __PCIInternal_h__
|
---|
23 | #define __PCIInternal_h__
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * PCI I/O region.
|
---|
27 | */
|
---|
28 | typedef struct PCIIOREGION
|
---|
29 | {
|
---|
30 | /** Current PCI mapping address.
|
---|
31 | * -1 means not mapped. Memory addresses are relative to pci_mem_base. */
|
---|
32 | uint32_t addr;
|
---|
33 | uint32_t size;
|
---|
34 | uint8_t type; /* PCIADDRESSSPACE */
|
---|
35 | uint8_t padding[HC_ARCH_BITS == 32 ? 3 : 7];
|
---|
36 | /** Callback called when the region is mapped. */
|
---|
37 | R3PTRTYPE(PFNPCIIOREGIONMAP) map_func;
|
---|
38 | } PCIIOREGION, PCIIORegion;
|
---|
39 | /** Pointer to PCI I/O region. */
|
---|
40 | typedef PCIIOREGION *PPCIIOREGION;
|
---|
41 |
|
---|
42 | /**
|
---|
43 | * PCI Device - Internal data.
|
---|
44 | */
|
---|
45 | typedef struct PCIDEVICEINT
|
---|
46 | {
|
---|
47 | /** I/O regions. */
|
---|
48 | PCIIOREGION aIORegions[PCI_NUM_REGIONS];
|
---|
49 | /** Pointer to the PCI bus of the device. */
|
---|
50 | R3PTRTYPE(struct PCIBus *) pBus;
|
---|
51 | /** Read config callback. */
|
---|
52 | R3PTRTYPE(PFNPCICONFIGREAD) pfnConfigRead;
|
---|
53 | /** Write config callback. */
|
---|
54 | R3PTRTYPE(PFNPCICONFIGWRITE) pfnConfigWrite;
|
---|
55 | /** The irq assigned to the device. */
|
---|
56 | int32_t iIrq;
|
---|
57 | /** Set if the specific device fun was requested by PDM.
|
---|
58 | * If clear the device and it's functions can be relocated to satisfy the slot request of another device. */
|
---|
59 | bool fRequestedDevFn;
|
---|
60 | } PCIDEVICEINT;
|
---|
61 |
|
---|
62 | /* Indicate that PCIDEVICE::Int.s can be declared. */
|
---|
63 | #define __PCIDEVICEINT_DECLARED__
|
---|
64 |
|
---|
65 | #endif
|
---|