VBoxVideo.h revision ef02e70838019ff30c2e4fe909ca98029ace0f94
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * VirtualBox Video interface.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Copyright (C) 2006 Sun Microsystems, Inc.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * available from http://www.virtualbox.org. This file is free software;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * you can redistribute it and/or modify it under the terms of the GNU
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * General Public License (GPL) as published by the Free Software
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The contents of this file may alternatively be used under the terms
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * of the Common Development and Distribution License Version 1.0
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * VirtualBox OSE distribution, in which case the provisions of the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * CDDL are applicable instead of those of the GPL.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * You may elect to license modified versions of this file under the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * terms and conditions of either the GPL or the CDDL or both.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * additional information or have any questions.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#endif /* VBOX_WITH_HGSMI */
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The last 4096 bytes of the guest VRAM contains the generic info for all
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * DualView chunks: sizes and offsets of chunks. This is filled by miniport.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Last 4096 bytes of each chunk contain chunk specific data: framebuffer info,
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * etc. This is used exclusively by the corresponding instance of a display driver.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The VRAM layout:
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Last 4096 bytes - Adapter information area.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * 4096 bytes aligned miniport heap (value specified in the config rouded up).
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Slack - what left after dividing the VRAM.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * 4096 bytes aligned framebuffers:
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * last 4096 bytes of each framebuffer is the display information area.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The Virtual Graphics Adapter information in the guest VRAM is stored by the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * guest video driver using structures prepended by VBOXVIDEOINFOHDR.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * When the guest driver writes dword 0 to the VBE_DISPI_INDEX_VBOX_VIDEO
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * the host starts to process the info. The first element at the start of
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * the 4096 bytes region should be normally be a LINK that points to
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * actual information chain. That way the guest driver can have some
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * fixed layout of the information memory block and just rewrite
612ab06c3d17ed10137724a3745004d09566f53avboxsync * the link to point to relevant memory chain.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The processing stops at the END element.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The host can access the memory only when the port IO is processed.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * All data that will be needed later must be copied from these 4096 bytes.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * But other VRAM can be used by host until the mode is disabled.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The guest driver writes dword 0xffffffff to the VBE_DISPI_INDEX_VBOX_VIDEO
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * to disable the mode.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * VBE_DISPI_INDEX_VBOX_VIDEO is used to read the configuration information
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * from the host and issue commands to the host.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The guest writes the VBE_DISPI_INDEX_VBOX_VIDEO index register, the the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * following operations with the VBE data register can be performed:
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Operation Result
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * write 16 bit value NOP
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * read 16 bit value count of monitors
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * write 32 bit value sets the vbox command value and the command processed by the host
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * read 32 bit value result of the last vbox command is returned
#ifndef VBOX_WITH_HGSMI
#define VBOX_VIDEO_INFO_TYPE_END 0
typedef struct _VBOXVIDEOINFOHDR
typedef struct _VBOXVIDEOINFOLINK
typedef struct _VBOXVIDEOINFODISPLAY
typedef struct _VBOXVIDEOINFOSCREEN
typedef struct _VBOXVIDEOINFOHOSTEVENTS
typedef struct _VBOXVIDEOINFONVHEAP
typedef struct _VBOXVIDEOINFOVBVASTATUS
typedef struct _VBOXVIDEOINFOVBVAFLUSH
#define VBOX_VIDEO_QCI32_MONITOR_COUNT 0
typedef struct _VBOXVIDEOINFOQUERYCONF32
#pragma pack()
# ifdef VBOX_WITH_VIDEOHWACCEL
#define VBOXVHWA_VERSION_MAJ 0
#define VBOXVHWA_VERSION_MIN 0
#define VBOXVHWA_VERSION_RSV 0
* must not be cleared once set, the command completion is performed by issuing a host->guest completion command
/* guest does not do any op on completion of this command, the host may copy the command and indicate that it does not need the command anymore
/* the host has copied the VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION command and returned it to the guest */
/* this is the host->host cmd, i.e. a configuration command posted by the host to the framebuffer */
typedef struct _VBOXVHWACMD
uint64_t GuestVBVAReserved1; /* field internally used by the guest VBVA cmd handling, must NOT be modified by clients */
uint64_t GuestVBVAReserved2; /* field internally used by the guest VBVA cmd handling, must NOT be modified by clients */
} VBOXVHWACMD;
typedef unsigned int VBOXVHWACMD_LENGTH;
#define VBOXVHWA_SURFHANDLE_INVALID 0
typedef struct _VBOXVHWA_RECTL
typedef struct _VBOXVHWA_COLORKEY
typedef struct _VBOXVHWA_PIXELFORMAT
} m1;
} m2;
} m3;
} m4;
typedef struct _VBOXVHWA_SURFACEDESC
typedef struct _VBOXVHWA_BLTFX
typedef struct _VBOXVHWA_OVERLAYFX
typedef struct _VBOXVHWA_VERSION
typedef struct _VBOXVHWACMD_QUERYINFO1
} in;
} out;
typedef struct _VBOXVHWACMD_QUERYINFO2
typedef struct _VBOXVHWACMD_SURF_CANCREATE
} in;
} out;
typedef struct _VBOXVHWACMD_SURF_CREATE
typedef struct _VBOXVHWACMD_SURF_DESTROY
} in;
typedef struct _VBOXVHWACMD_SURF_LOCK
} in;
typedef struct _VBOXVHWACMD_SURF_UNLOCK
} in;
typedef struct _VBOXVHWACMD_SURF_BLT
} in;
typedef struct _VBOXVHWACMD_SURF_FLIP
} in;
typedef struct _VBOXVHWACMD_SURF_COLORKEY_SET
} in;
typedef struct _VBOXVHWACMD_SURF_OVERLAY_UPDATE
} in;
typedef struct _VBOXVHWACMD_SURF_OVERLAY_SETPOSITION
} in;
typedef struct _VBOXVHWACMD_HH_CONSTRUCT
void * pVM;
#pragma pack()
#ifdef VBOX_WITH_HGSMI
typedef struct _VBVABUFFER
} VBVABUFFER;
#ifdef VBOX_WITH_VIDEOHWACCEL
# ifdef VBOX_WITH_VIDEOHWACCEL
typedef struct _VBVAHOSTCMDVHWACMDCOMPLETE
#pragma pack()
typedef struct _VBVAHOSTCMDEVENT
typedef struct _VBVAHOSTCMD
/* destination ID if >=0 specifies display index, otherwize the command is directed to the miniport */
#define VBVAHOSTCMD_HDR(_pBody) ((VBVAHOSTCMD*)(((uint8_t*)_pBody) - RT_OFFSETOF(VBVAHOSTCMD, body)))
#pragma pack()
#define VBOX_VBVA_CONF32_MONITOR_COUNT 0
typedef struct _VBVACONF32
} VBVACONF32;
typedef struct VBVAINFOVIEW
} VBVAINFOVIEW;
typedef struct _VBVAINFOHEAP
} VBVAINFOHEAP;
typedef struct _VBVAFLUSH
} VBVAFLUSH;
typedef struct VBVAINFOSCREEN
typedef struct _VBVAENABLE
} VBVAENABLE;
typedef struct _VBVAMOUSEPOINTERSHAPE
#pragma pack()