VBoxVideo.h revision 9a3faa0b7c1afced2e57bc05acfe3f232f855bd4
/** @file
* VirtualBox Video miniport driver
*
* Copyright (C) 2006-2007 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.
*/
#ifndef VBOXVIDEO_H
#define VBOXVIDEO_H
#include <VBox/VBoxVideoGuest.h>
#include <VBox/VBoxVideo.h>
#include "VBoxHGSMI.h"
/* This looks absolutely unnecessary to me, but harmless. */
#define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 4
typedef struct VBOXVIDEO_COMMON
{
int cDisplays; /* Number of displays. */
* It is at offset:
* cbAdapterMemorySize - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE - cbMiniportHeap
*/
void *pvMiniportHeap; /* The pointer to the miniport heap VRAM.
* This is mapped by miniport separately.
*/
void *pvAdapterInformation; /* The pointer to the last 4K of VRAM.
* This is mapped by miniport separately.
*/
/** Whether HGSMI is enabled. */
bool bHGSMI;
/** Context information needed to receive commands from the host. */
/** Context information needed to submit commands to the host. */
extern "C"
{
/** Signal an event in a guest-OS-specific way. pvEvent will be re-cast to
* something OS-specific. */
/** Allocate memory to be used in normal driver operation (dispatch level in
* Windows) but not necessarily in IRQ context. */
/** Free memory allocated by @a VBoxVideoCmnMemAllocDriver */
/** Write an 8-bit value to an I/O port. */
/** Write a 16-bit value to an I/O port. */
/** Write a 32-bit value to an I/O port. */
/** Read an 8-bit value from an I/O port. */
/** Read a 16-bit value from an I/O port. */
/** Read a 32-bit value from an I/O port. */
void **ppv,
typedef bool(*PFNVIDEOIRQSYNC)(void *);
void *pvUser);
bool VBoxHGSMIIsSupported (void);
typedef FNHGSMIFILLVIEWINFO *PFNHGSMIFILLVIEWINFO;
int VBoxHGSMISendViewInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx, uint32_t u32Count, PFNHGSMIFILLVIEWINFO pfnFill, void *pvData);
#ifndef VBOX_WITH_WDDM
DECLCALLBACK(int) hgsmiHostCmdRequest (HVBOXVIDEOHGSMI hHGSMI, uint8_t u8Channel, uint32_t iDisplay, struct _VBVAHOSTCMD ** ppCmd);
#endif
int iDisplay, /* negative would mean this is a miniport handler */
} /* extern "C" */
#endif /* VBOXVIDEO_H */