VirtualBox

source: vbox/trunk/src/VBox/Devices/Bus/MsiCommon.h@ 69498

Last change on this file since 69498 was 69124, checked in by vboxsync, 7 years ago

Devices/Bus: (C) year + keywords

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: MsiCommon.h 69124 2017-10-17 19:17:23Z vboxsync $ */
2/** @file
3 * Header for MSI/MSI-X support routines.
4 */
5/*
6 * Copyright (C) 2010-2017 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17/* Maybe belongs to types.h */
18#ifdef IN_RING3
19typedef PCPDMPCIHLPR3 PCPDMPCIHLP;
20#endif
21
22#ifdef IN_RING0
23typedef PCPDMPCIHLPR0 PCPDMPCIHLP;
24#endif
25
26#ifdef IN_RC
27typedef PCPDMPCIHLPRC PCPDMPCIHLP;
28#endif
29
30#ifdef IN_RING3
31/* Init MSI support in the device. */
32int MsiInit(PPDMPCIDEV pDev, PPDMMSIREG pMsiReg);
33#endif
34
35/* If MSI is enabled, so that MSINotify() shall be used for notifications. */
36bool MsiIsEnabled(PPDMPCIDEV pDev);
37
38/* Device notification (aka interrupt). */
39void MsiNotify(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPDMPCIDEV pDev, int iVector, int iLevel, uint32_t uTagSrc);
40
41#ifdef IN_RING3
42/* PCI config space accessors for MSI registers */
43void MsiPciConfigWrite(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPDMPCIDEV pDev, uint32_t u32Address, uint32_t val, unsigned len);
44#endif
45
46#ifdef IN_RING3
47/* Init MSI-X support in the device. */
48int MsixInit(PCPDMPCIHLP pPciHlp, PPDMPCIDEV pDev, PPDMMSIREG pMsiReg);
49#endif
50
51/* If MSI-X is enabled, so that MSIXNotify() shall be used for notifications. */
52bool MsixIsEnabled(PPDMPCIDEV pDev);
53
54/* Device notification (aka interrupt). */
55void MsixNotify(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPDMPCIDEV pDev, int iVector, int iLevel, uint32_t uTagSrc);
56
57#ifdef IN_RING3
58/* PCI config space accessors for MSI-X */
59void MsixPciConfigWrite(PPDMDEVINS pDevIns, PCPDMPCIHLP pPciHlp, PPDMPCIDEV pDev, uint32_t u32Address, uint32_t val, unsigned len);
60#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