MsiCommon.h revision 0eb8851309a7678e8ccee719ee3eead40651b5d4
af062818b47340eef15700d2f0211576ba3506eevboxsync/* $Id$ */
af062818b47340eef15700d2f0211576ba3506eevboxsync/** @file
af062818b47340eef15700d2f0211576ba3506eevboxsync * Header for MSI support routines.
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsync/*
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright (C) 2010 Oracle Corporation
af062818b47340eef15700d2f0211576ba3506eevboxsync *
af062818b47340eef15700d2f0211576ba3506eevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
af062818b47340eef15700d2f0211576ba3506eevboxsync * available from http://www.virtualbox.org. This file is free software;
af062818b47340eef15700d2f0211576ba3506eevboxsync * you can redistribute it and/or modify it under the terms of the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync * General Public License (GPL) as published by the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
af062818b47340eef15700d2f0211576ba3506eevboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
af062818b47340eef15700d2f0211576ba3506eevboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync/* Init MSI support in the device. */
af062818b47340eef15700d2f0211576ba3506eevboxsyncint MSIInit(PPCIDEVICE pDev, PPDMMSIREG pMsiReg);
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync/* If MSI is enabled, so that MSINotify() shall be used for notifications. */
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsyncbool MSIIsEnabled(PPCIDEVICE pDev);
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync/* Device notification (aka interrupt). */
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsyncvoid MSINotify(PPDMDEVINS pDevIns, PPCIDEVICE pDev, int iVector);
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync/* PCI config space accessors for MSI registers */
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsyncvoid MSIPciConfigWrite(PPDMDEVINS pDevIns, PPCIDEVICE pDev, uint32_t u32Address, uint32_t val, unsigned len);
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsyncuint32_t MSIPciConfigRead (PPDMDEVINS pDevIns, PPCIDEVICE pDev, uint32_t u32Address, unsigned len);
af062818b47340eef15700d2f0211576ba3506eevboxsync