VBoxGuest_Internal.h revision 45c93a3f9bde721a585c4d33ccf8636d4c5cfee0
/** @file
*
* VBoxGuest -- VirtualBox Win32 guest support driver
*
* Copyright (C) 2006-2007 Sun Microsystems, Inc.
*
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#ifndef __VBOXGUESTINTERNAL_h__
#define __VBOXGUESTINTERNAL_h__
/*******************************************************************************
* Header Files *
*******************************************************************************/
#ifdef IN_RING0
# include <ntddk.h>
# else
# include <ntddk.h>
# endif
#endif
#include <iprt/spinlock.h>
#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 {
typedef struct
{
/**
* 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
/////
// the driver name
// 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 */
#ifdef VBOX_WITH_HGCM
/** Spinlock various items in the VBOXGUESTSESSION. */
#endif
struct
{
} MemBalloon;
/* Preallocated generic request for shutdown. */
/* Bugcheck context. */
// Windows version identifier
typedef enum
{
WINNT4 = 1,
WIN2K = 2,
WINXP = 3,
WIN2K3 = 4,
WINVISTA = 5
} winVersion_t;
extern winVersion_t winVersion;
#ifdef VBOX_WITH_HGCM
/**
* The VBoxGuest per session data.
*
* @remark Just to store hgcm ID's, perhaps could combine with one from common/VBoxGuest/vboxguestinternal.h?
*/
typedef struct VBOXGUESTSESSION
{
/** Array containing HGCM client IDs associated with this session.
* This will be automatically disconnected when the session is closed.
* Note that array size also affects/is maximum number of supported opengl threads per guest process.
*/
#endif
extern "C"
{
}
#endif
#endif // __H_VBOXGUESTINTERNAL