VBoxGuest_Internal.h revision a9548d19b3c4982f701f70a2c1df35764c4841b8
/** @file
*
* VBoxGuest -- VirtualBox Win32 guest support driver
*
* Copyright (C) 2006-2007 innotek GmbH
*
* 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 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 __VBOXGUESTINTERNAL_h__
#define __VBOXGUESTINTERNAL_h__
/*******************************************************************************
* Header Files *
*******************************************************************************/
#ifdef IN_RING0
# include <ntddk.h>
# else
# include <ntddk.h>
# endif
#endif
#include <VBox/VBoxGuest.h>
/*******************************************************************************
* Defined Constants And Macros *
*******************************************************************************/
/* debug printf */
# define OSDBGPRINT(a) DbgPrint a
/* dprintf */
# ifdef LOG_TO_BACKDOOR
# define dprintf(a) RTLogBackdoorPrintf a
# else
# define dprintf(a) OSDBGPRINT(a)
# endif
#else
# define dprintf(a) do {} while (0)
#endif
/* dprintf2 - extended logging. */
#if 0
#else
# define dprintf2(a) do { } while (0)
#endif
#define PCI_MAX_BUSES 256
/*
* Error codes.
*/
/*******************************************************************************
* Structures and Typedefs *
*******************************************************************************/
// possible device states for our state machine
enum DEVSTATE
{
};
// undocumented API to set the system time
extern "C"
{
NTSYSAPI NTSTATUS NTAPI ZwSetSystemTime(IN PLARGE_INTEGER NewTime, OUT PLARGE_INTEGER OldTime OPTIONAL);
}
#ifdef IN_RING0
typedef struct _BASE_ADDRESS {
/**
* Device extension.
*/
typedef struct VBOXGUESTDEVEXT
{
//// legacy stuff
// 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
// adapter object pointer, returned by HalGetAdapter
// interrupt object pointer
/////
// our functional driver object
// the top of the stack
// currently active Irp
// device state
// start port address
// start of hypervisor mapping
// size in bytes of the hypervisor mapping
/* Physical address and length of VMMDev memory */
/* Virtual address of VMMDev memory */
/* Pending event flags signalled by host */
/* Notification semaphore */
/* Old Windows session id */
/* VRDP hook state */
/* Preallocated VMMDevEvents for IRQ handler */
// Windows version identifier
typedef enum
{
WINNT4 = 1,
WIN2K = 2,
WINXP = 3,
WIN2K3 = 4,
WINVISTA = 5
} winVersion_t;
extern winVersion_t winVersion;
extern "C"
{
}
#endif
#endif // __H_VBOXGUESTINTERNAL