1 | /* $Id: HGSMIBase.h 69015 2017-10-09 12:50:34Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Host Guest Shared Memory Interface (HGSMI) - buffer management.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2017 Oracle Corporation
|
---|
8 | *
|
---|
9 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
10 | * copy of this software and associated documentation files (the "Software"),
|
---|
11 | * to deal in the Software without restriction, including without limitation
|
---|
12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
13 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
14 | * Software is furnished to do so, subject to the following conditions:
|
---|
15 | *
|
---|
16 | * The above copyright notice and this permission notice shall be included in
|
---|
17 | * all copies or substantial portions of the Software.
|
---|
18 | *
|
---|
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
---|
22 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
---|
23 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
---|
24 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
---|
25 | * USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
26 | */
|
---|
27 |
|
---|
28 |
|
---|
29 | #ifndef ___VBox_Graphics_HGSMIBase_h___
|
---|
30 | #define ___VBox_Graphics_HGSMIBase_h___
|
---|
31 |
|
---|
32 | #include "HGSMI.h"
|
---|
33 | #include "HGSMIContext.h"
|
---|
34 | #include "VBoxVideoIPRT.h"
|
---|
35 |
|
---|
36 | RT_C_DECLS_BEGIN
|
---|
37 |
|
---|
38 | /** @name Base HGSMI Buffer APIs
|
---|
39 | * @{ */
|
---|
40 |
|
---|
41 | /** Acknowlege an IRQ. */
|
---|
42 | DECLINLINE(void) VBoxHGSMIClearIrq(PHGSMIHOSTCOMMANDCONTEXT pCtx)
|
---|
43 | {
|
---|
44 | VBVO_PORT_WRITE_U32(pCtx->port, HGSMIOFFSET_VOID);
|
---|
45 | }
|
---|
46 |
|
---|
47 | DECLHIDDEN(void *) VBoxHGSMIBufferAlloc(PHGSMIGUESTCOMMANDCONTEXT pCtx,
|
---|
48 | HGSMISIZE cbData,
|
---|
49 | uint8_t u8Ch,
|
---|
50 | uint16_t u16Op);
|
---|
51 | DECLHIDDEN(void) VBoxHGSMIBufferFree(PHGSMIGUESTCOMMANDCONTEXT pCtx,
|
---|
52 | void *pvBuffer);
|
---|
53 | DECLHIDDEN(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,
|
---|
54 | void *pvBuffer);
|
---|
55 | /** @} */
|
---|
56 |
|
---|
57 | RT_C_DECLS_END
|
---|
58 |
|
---|
59 | #endif
|
---|