MsiCommon.cpp revision ea0316554d23852601ee840c4a856339501411a4
/* $Id$ */
/** @file
* MSI support routines
*/
/*
* Copyright (C) 2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#define LOG_GROUP LOG_GROUP_DEV_PCI
/* Hack to get PCIDEVICEINT declare at the right point - include "PCIInternal.h". */
#define PCI_INCLUDE_PRIVATE
#include "MsiCommon.h"
{
}
{
}
{
}
{
}
{
if (msiIs64Bit(pDev))
{
}
else
{
}
}
{
/// @todo: vector encoding into lower bits of message data, for Multiple Message Enable
return RT_MAKE_U32(lo, 0);
}
{
{
switch (i + iOff)
{
case 0: /* Capability ID, ro */
case 1: /* Next pointer, ro */
break;
case 2:
/* don't change read-only bits: 1-3,7 */
break;
case 3:
/* don't change read-only bit 8, and reserved 9-15 */
break;
default:
}
uAddr++;
val >>= 8;
}
}
{
switch (len)
{
case 1:
case 2:
default:
case 4:
}
}
{
if (cVectors > VBOX_MSI_MAX_ENTRIES)
return VERR_TOO_MUCH_DATA;
return VINF_SUCCESS;
}
{
}
{
}