VBoxMPHGSMI.cpp revision c58f1213e628a545081c70e26c6b67a841cff880
/* $Id$ */
/** @file
* VBox Miniport HGSMI related functions
*/
/*
* Copyright (C) 2012 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.
*/
#include "VBoxMPHGSMI.h"
#include "VBoxMPCommon.h"
/**
* Helper function to register secondary displays (DualView). Note that this will not
* be available on pre-XP versions, and some editions on XP will fail because they are
* intentionally crippled.
*
* HGSMI variant is a bit different because it uses only HGSMI interface (VBVA channel)
* to talk to the host.
*/
void VBoxSetupDisplaysHGSMI(PVBOXMP_COMMON pCommon, PHYSICAL_ADDRESS phVRAM, uint32_t ulApertureSize,
{
/** @todo I simply converted this from Windows error codes. That is wrong,
* but we currently freely mix and match those (failure == rc > 0) and iprt
* ones (failure == rc < 0) anyway. This needs to be fully reviewed and
* fixed. */
int rc = VINF_SUCCESS;
LOGF_ENTER();
{
/* Map the adapter information. It will be needed for HGSMI IO. */
rc = VBoxMPCmnMapAdapterMemory(pCommon, &pCommon->pvAdapterInformation, offVRAMBaseMapping, cbMapping);
if (RT_FAILURE(rc))
{
}
else
{
/* Setup an HGSMI heap within the adapter information area. */
if (RT_FAILURE(rc))
{
}
}
}
/* Setup the host heap and the adapter memory. */
{
&cbHostArea);
if (cbHostArea)
{
/* Map the heap region.
*
* Note: the heap will be used for the host buffers submitted to the guest.
* The miniport driver is responsible for reading FIFO and notifying
* display drivers.
*/
if (RT_FAILURE(rc))
{
pCommon->cbMiniportHeap = 0;
}
else
}
else
{
/* Host has not requested a heap. */
pCommon->cbMiniportHeap = 0;
}
}
{
/* Setup the information for the host. */
if (RT_FAILURE(rc))
{
}
}
/* Check whether the guest supports multimonitors. */
{
/* Query the configured number of displays. */
}
else
{
}
LOGF_LEAVE();
}
static bool VBoxUnmapAdpInfoCallback(void *pvCommon)
{
return true;
}
{
#ifdef VBOX_WDDM_MINIPORT
#else
#endif
/* Unmap the adapter information needed for HGSMI IO. */
}