VBoxGuest-win.h revision b2640405e06105d868b5fc8f7b676bb680884380
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * VBoxGuest - Windows specifics.
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * Copyright (C) 2010 Oracle Corporation
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * available from http://www.virtualbox.org. This file is free software;
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * you can redistribute it and/or modify it under the terms of the GNU
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * General Public License (GPL) as published by the Free Software
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/*******************************************************************************
b2640405e06105d868b5fc8f7b676bb680884380vboxsync* Header Files *
b2640405e06105d868b5fc8f7b676bb680884380vboxsync*******************************************************************************/
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/*******************************************************************************
b2640405e06105d868b5fc8f7b676bb680884380vboxsync* Structures and Typedefs *
b2640405e06105d868b5fc8f7b676bb680884380vboxsync*******************************************************************************/
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/** Pointer to the VBoxGuest per session data. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/** Possible device states for our state machine. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Original device physical address. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Length of I/O or memory range. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Flag: Unmapped range is I/O or memory range. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Mapped I/O or memory range. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Flag: mapped range is I/O or memory range. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Flag: resource is mapped (i.e. MmMapIoSpace called). */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync} VBOXGUESTWINBASEADDRESS, *PVBOXGUESTWINBASEADDRESS;
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/** Windows-specific HGCM device extension bits. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** The callback wait timeout. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Notification semaphore. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/** Windows-specific device extension bits. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Our functional driver object. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Top of the stack. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Currently active Irp. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Interrupt object pointer. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Bus number where the device is located. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Slot number where the device is located. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Device interrupt level. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Device interrupt vector. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Affinity mask. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** LevelSensitive or Latched. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** PCI base address information. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync VBOXGUESTWINBASEADDRESS pciBaseAddress[PCI_TYPE0_ADDRESSES];
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Physical address and length of VMMDev memory. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Device state. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Last system power action set (see VBoxGuestPower). */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Preallocated generic request for shutdown. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Preallocated VMMDevEvents for IRQ handler. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Pre-allocated kernel session data. This is needed
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * for handling kernel IOCtls. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** Align the next bit on a 64-byte boundary and make sure it starts at the same
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * offset in both 64-bit and 32-bit builds.
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * @remarks The aligments of the members that are larger than 48 bytes should be
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * 64-byte for cache line reasons. structs containing small amounts of
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * data could be lumped together at the end with a < 64 byte padding
b2640405e06105d868b5fc8f7b676bb680884380vboxsync * following it (to grow into and align the struct size).
b2640405e06105d868b5fc8f7b676bb680884380vboxsync /** HGCM stuff. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync uint8_t padding[256]; /* Multiple of 64; fix me! */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/*******************************************************************************
b2640405e06105d868b5fc8f7b676bb680884380vboxsync* Defined Constants And Macros *
b2640405e06105d868b5fc8f7b676bb680884380vboxsync*******************************************************************************/
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/** CM_RESOURCE_MEMORY_* flags which were used on XP or earlier. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/** Windows version identifier. */
b2640405e06105d868b5fc8f7b676bb680884380vboxsynctypedef enum
b2640405e06105d868b5fc8f7b676bb680884380vboxsync/*******************************************************************************
b2640405e06105d868b5fc8f7b676bb680884380vboxsync* Declared prototypes for helper routines used in both (PnP and legacy) *
b2640405e06105d868b5fc8f7b676bb680884380vboxsync* driver versions. *
b2640405e06105d868b5fc8f7b676bb680884380vboxsync*******************************************************************************/
b2640405e06105d868b5fc8f7b676bb680884380vboxsyncNTSTATUS vboxguestwinPnP(PDEVICE_OBJECT pDevObj, PIRP pIrp);
b2640405e06105d868b5fc8f7b676bb680884380vboxsyncVOID vboxguestwinDpcHandler(PKDPC pDPC, PDEVICE_OBJECT pDevObj, PIRP pIrp, PVOID pContext);
b2640405e06105d868b5fc8f7b676bb680884380vboxsyncBOOLEAN vboxguestwinIsrHandler(PKINTERRUPT interrupt, PVOID serviceContext);
b2640405e06105d868b5fc8f7b676bb680884380vboxsyncNTSTATUS vboxguestwinScanPCIResourceList(PCM_RESOURCE_LIST pResList, PVBOXGUESTDEVEXT pDevExt);
b2640405e06105d868b5fc8f7b676bb680884380vboxsyncNTSTATUS vboxguestwinMapVMMDevMemory(PVBOXGUESTDEVEXT pDevExt, PHYSICAL_ADDRESS physicalAdr, ULONG ulLength,
b2640405e06105d868b5fc8f7b676bb680884380vboxsyncvoid vboxguestwinUnmapVMMDevMemory(PVBOXGUESTDEVEXT pDevExt);
b2640405e06105d868b5fc8f7b676bb680884380vboxsyncVBOXOSTYPE vboxguestwinVersionToOSType(winVersion_t winVer);
b2640405e06105d868b5fc8f7b676bb680884380vboxsyncNTSTATUS vboxguestwinPower(PDEVICE_OBJECT pDevObj, PIRP pIrp);
b2640405e06105d868b5fc8f7b676bb680884380vboxsync#endif /* ___VBoxGuest_win_h */