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