1 | /** @file
|
---|
2 | *
|
---|
3 | * PCI Internal header - Only for hiding bits of PCIDEVICE.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 innotek GmbH
|
---|
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 |
|
---|
18 | #ifndef __PCIInternal_h__
|
---|
19 | #define __PCIInternal_h__
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * PCI I/O region.
|
---|
23 | */
|
---|
24 | typedef struct PCIIOREGION
|
---|
25 | {
|
---|
26 | /** Current PCI mapping address.
|
---|
27 | * -1 means not mapped. Memory addresses are relative to pci_mem_base. */
|
---|
28 | uint32_t addr;
|
---|
29 | uint32_t size;
|
---|
30 | uint8_t type; /* PCIADDRESSSPACE */
|
---|
31 | uint8_t padding[HC_ARCH_BITS == 32 ? 3 : 7];
|
---|
32 | /** Callback called when the region is mapped. */
|
---|
33 | R3PTRTYPE(PFNPCIIOREGIONMAP) map_func;
|
---|
34 | } PCIIOREGION, PCIIORegion;
|
---|
35 | /** Pointer to PCI I/O region. */
|
---|
36 | typedef PCIIOREGION *PPCIIOREGION;
|
---|
37 |
|
---|
38 | /**
|
---|
39 | * PCI Device - Internal data.
|
---|
40 | */
|
---|
41 | typedef struct PCIDEVICEINT
|
---|
42 | {
|
---|
43 | /** I/O regions. */
|
---|
44 | PCIIOREGION aIORegions[PCI_NUM_REGIONS];
|
---|
45 | /** Pointer to the PCI bus of the device. */
|
---|
46 | R3PTRTYPE(struct PCIBus *) pBus;
|
---|
47 | /** Read config callback. */
|
---|
48 | R3PTRTYPE(PFNPCICONFIGREAD) pfnConfigRead;
|
---|
49 | /** Write config callback. */
|
---|
50 | R3PTRTYPE(PFNPCICONFIGWRITE) pfnConfigWrite;
|
---|
51 | /** The irq assigned to the device. */
|
---|
52 | int32_t iIrq;
|
---|
53 | /** Set if the specific device fun was requested by PDM.
|
---|
54 | * If clear the device and it's functions can be relocated to satisfy the slot request of another device. */
|
---|
55 | bool fRequestedDevFn;
|
---|
56 | } PCIDEVICEINT;
|
---|
57 |
|
---|
58 | /* Indicate that PCIDEVICE::Int.s can be declared. */
|
---|
59 | #define __PCIDEVICEINT_DECLARED__
|
---|
60 |
|
---|
61 | #endif
|
---|