VBoxGuest-win.h revision e1ed9baf425f4c757302ec417a815aab945fdbf0
/* $Id$ */
/** @file
* VBoxGuest - Windows specifics.
*/
/*
* Copyright (C) 2010-2015 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 ___VBoxGuest_win_h
#define ___VBoxGuest_win_h
#ifdef RT_ARCH_X86
#endif
#include <ntddk.h>
#ifdef RT_ARCH_X86
#endif
#include <iprt/spinlock.h>
#include <VBox/VBoxGuest.h>
#include "VBoxGuestInternal.h"
/** Possible device states for our state machine. */
enum DEVSTATE
{
};
typedef struct VBOXGUESTWINBASEADDRESS
{
/** Original device physical address. */
/** Length of I/O or memory range. */
/** Flag: Unmapped range is I/O or memory range. */
/** Mapped I/O or memory range. */
/** Flag: mapped range is I/O or memory range. */
/** Flag: resource is mapped (i.e. MmMapIoSpace called). */
/** Windows-specific device extension bits. */
typedef struct VBOXGUESTDEVEXTWIN
{
/** Our functional driver object. */
/** Top of the stack. */
/** Currently active Irp. */
/** Interrupt object pointer. */
/** Bus number where the device is located. */
/** Slot number where the device is located. */
/** Device interrupt level. */
/** Device interrupt vector. */
/** Affinity mask. */
/** LevelSensitive or Latched. */
/** PCI base address information. */
/** Physical address and length of VMMDev memory. */
/** Device state. */
/** Last system power action set (see VBoxGuestPower). */
/** Preallocated generic request for shutdown. */
/** Preallocated VMMDevEvents for IRQ handler. */
/** Pre-allocated kernel session data. This is needed
* for handling kernel IOCtls. */
struct VBOXGUESTSESSION *pKernelSession;
/** Spinlock protecting MouseNotifyCallback. Required since the consumer is
* in a DPC callback and not the ISR. */
/** NT (windows) version identifier. */
typedef enum VBGDNTVER
{
VBGDNTVER_INVALID = 0,
} VBGDNTVER;
extern VBGDNTVER g_enmVbgdNtVer;
do { \
} while (0)
/** CM_RESOURCE_MEMORY_* flags which were used on XP or earlier. */
#define VBOX_CM_PRE_VISTA_MASK (0x3f)
#ifdef TARGET_NT4
NTSTATUS vbgdNt4CreateDevice(PDRIVER_OBJECT pDrvObj, PDEVICE_OBJECT pDevObj, PUNICODE_STRING pRegPath);
#else
#endif
/** @name Common routines used in both (PnP and legacy) driver versions.
* @{
*/
#ifdef TARGET_NT4
#else
#endif
NTSTATUS vbgdNtMapVMMDevMemory(PVBOXGUESTDEVEXTWIN pDevExt, PHYSICAL_ADDRESS PhysAddr, ULONG cbToMap,
/** @} */
#ifdef TARGET_NT4
/*
* XP DDK #defines ExFreePool to ExFreePoolWithTag. The latter does not exist
* on NT4, so... The same for ExAllocatePool.
*/
#endif
#endif /* !___VBoxGuest_win_h */