VirtualBox

source: vbox/trunk/src/VBox/Devices/Bus/PCIInternal.h@ 2597

Last change on this file since 2597 was 2596, checked in by vboxsync, 18 years ago

Moved PFNPCICONFIGREAD and PFNPCICONFIGWRITE out in the open.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/** @file
2 *
3 * PCI Internal header - Only for hiding bits of PCIDEVICE.
4 */
5
6/*
7 * Copyright (C) 2006 InnoTek Systemberatung 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 as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#ifndef __PCIInternal_h__
23#define __PCIInternal_h__
24
25/**
26 * PCI I/O region.
27 */
28typedef 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 HCPTRTYPE(PFNPCIIOREGIONMAP) map_func;
38} PCIIOREGION, PCIIORegion;
39/** Pointer to PCI I/O region. */
40typedef PCIIOREGION *PPCIIOREGION;
41
42/**
43 * PCI Device - Internal data.
44 */
45typedef 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
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette