VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/DevVGA.h@ 33644

Last change on this file since 33644 was 33644, checked in by vboxsync, 14 years ago

dev/vga: fix VGAState inconsistency across different .cpp files

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 24.2 KB
Line 
1/* $Id: DevVGA.h 33644 2010-11-01 12:03:53Z vboxsync $ */
2/** @file
3 * DevVGA - VBox VGA/VESA device, internal header.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 * --------------------------------------------------------------------
17 *
18 * This code is based on:
19 *
20 * QEMU internal VGA defines.
21 *
22 * Copyright (c) 2003-2004 Fabrice Bellard
23 *
24 * Permission is hereby granted, free of charge, to any person obtaining a copy
25 * of this software and associated documentation files (the "Software"), to deal
26 * in the Software without restriction, including without limitation the rights
27 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28 * copies of the Software, and to permit persons to whom the Software is
29 * furnished to do so, subject to the following conditions:
30 *
31 * The above copyright notice and this permission notice shall be included in
32 * all copies or substantial portions of the Software.
33 *
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
37 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
40 * THE SOFTWARE.
41 */
42
43/** Use VBE bytewise I/O. Only needed for Windows Longhorn/Vista betas and backwards compatibility. */
44#define VBE_BYTEWISE_IO
45
46/** Use VBE new dynamic mode list.
47 * If this is not defined, no checks are carried out to see if the modes all
48 * fit into the framebuffer! See the VRAM_SIZE_FIX define. */
49#define VBE_NEW_DYN_LIST
50
51#ifdef VBOX
52/** The default amount of VRAM. */
53# define VGA_VRAM_DEFAULT (_4M)
54/** The maximum amount of VRAM. Limited by VBOX_MAX_ALLOC_PAGE_COUNT. */
55# define VGA_VRAM_MAX (256 * _1M)
56/** The minimum amount of VRAM. */
57# define VGA_VRAM_MIN (_1M)
58#endif
59
60#ifdef VBOX_WITH_HGSMI
61# include "HGSMI/HGSMIHost.h"
62#endif /* VBOX_WITH_HGSMI */
63#include "DevVGASavedState.h"
64
65#define MSR_COLOR_EMULATION 0x01
66#define MSR_PAGE_SELECT 0x20
67
68#define ST01_V_RETRACE 0x08
69#define ST01_DISP_ENABLE 0x01
70
71/* bochs VBE support */
72#define CONFIG_BOCHS_VBE
73
74#ifdef VBOX
75#define VBE_DISPI_MAX_XRES 16384
76#define VBE_DISPI_MAX_YRES 16384
77#else
78#define VBE_DISPI_MAX_XRES 1600
79#define VBE_DISPI_MAX_YRES 1200
80#endif
81#define VBE_DISPI_MAX_BPP 32
82
83#define VBE_DISPI_INDEX_ID 0x0
84#define VBE_DISPI_INDEX_XRES 0x1
85#define VBE_DISPI_INDEX_YRES 0x2
86#define VBE_DISPI_INDEX_BPP 0x3
87#define VBE_DISPI_INDEX_ENABLE 0x4
88#define VBE_DISPI_INDEX_BANK 0x5
89#define VBE_DISPI_INDEX_VIRT_WIDTH 0x6
90#define VBE_DISPI_INDEX_VIRT_HEIGHT 0x7
91#define VBE_DISPI_INDEX_X_OFFSET 0x8
92#define VBE_DISPI_INDEX_Y_OFFSET 0x9
93#define VBE_DISPI_INDEX_VBOX_VIDEO 0xa
94#define VBE_DISPI_INDEX_NB_SAVED 0xb /* Number of saved registers (vbe_regs array) */
95#define VBE_DISPI_INDEX_NB 0xb /* Total number of VBE registers */
96
97#define VBE_DISPI_ID0 0xB0C0
98#define VBE_DISPI_ID1 0xB0C1
99#define VBE_DISPI_ID2 0xB0C2
100#define VBE_DISPI_ID3 0xB0C3
101#define VBE_DISPI_ID4 0xB0C4
102
103#ifdef VBOX
104/* The VBOX interface id. Indicates support for VBE_DISPI_INDEX_VBOX_VIDEO. */
105#define VBE_DISPI_ID_VBOX_VIDEO 0xBE00
106#ifdef VBOX_WITH_HGSMI
107/* The VBOX interface id. Indicates support for VBVA shared memory interface. */
108#define VBE_DISPI_ID_HGSMI 0xBE01
109#endif /* VBOX_WITH_HGSMI */
110/* Indicates support for unrestricted horizontal resolutions (not multiple of 8). */
111#define VBE_DISPI_ID_ANYX 0xBE02
112#endif /* VBOX */
113
114#define VBE_DISPI_DISABLED 0x00
115#define VBE_DISPI_ENABLED 0x01
116#define VBE_DISPI_GETCAPS 0x02
117#define VBE_DISPI_8BIT_DAC 0x20
118#define VBE_DISPI_LFB_ENABLED 0x40
119#define VBE_DISPI_NOCLEARMEM 0x80
120
121#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000
122
123#ifdef CONFIG_BOCHS_VBE
124
125#define VGA_STATE_COMMON_BOCHS_VBE \
126 uint16_t vbe_index; \
127 uint16_t vbe_regs[VBE_DISPI_INDEX_NB_SAVED];\
128 uint32_t vbe_start_addr; \
129 uint32_t vbe_line_offset; \
130 uint32_t vbe_bank_max;
131
132#else
133
134#define VGA_STATE_COMMON_BOCHS_VBE
135
136#endif /* !CONFIG_BOCHS_VBE */
137
138#define CH_ATTR_SIZE (160 * 100)
139#define VGA_MAX_HEIGHT VBE_DISPI_MAX_YRES
140
141#ifndef VBOX
142#define VGA_STATE_COMMON \
143 uint8_t *vram_ptr; \
144 unsigned long vram_offset; \
145 unsigned int vram_size; \
146 uint32_t latch; \
147 uint8_t sr_index; \
148 uint8_t sr[256]; \
149 uint8_t gr_index; \
150 uint8_t gr[256]; \
151 uint8_t ar_index; \
152 uint8_t ar[21]; \
153 int ar_flip_flop; \
154 uint8_t cr_index; \
155 uint8_t cr[256]; /* CRT registers */ \
156 uint8_t msr; /* Misc Output Register */ \
157 uint8_t fcr; /* Feature Control Register */ \
158 uint8_t st00; /* status 0 */ \
159 uint8_t st01; /* status 1 */ \
160 uint8_t dac_state; \
161 uint8_t dac_sub_index; \
162 uint8_t dac_read_index; \
163 uint8_t dac_write_index; \
164 uint8_t dac_cache[3]; /* used when writing */ \
165 uint8_t palette[768]; \
166 int32_t bank_offset; \
167 int (*get_bpp)(struct VGAState *s); \
168 void (*get_offsets)(struct VGAState *s, \
169 uint32_t *pline_offset, \
170 uint32_t *pstart_addr, \
171 uint32_t *pline_compare); \
172 void (*get_resolution)(struct VGAState *s, \
173 int *pwidth, \
174 int *pheight); \
175 VGA_STATE_COMMON_BOCHS_VBE \
176 /* display refresh support */ \
177 DisplayState *ds; \
178 uint32_t font_offsets[2]; \
179 int graphic_mode; \
180 uint8_t shift_control; \
181 uint8_t double_scan; \
182 uint32_t line_offset; \
183 uint32_t line_compare; \
184 uint32_t start_addr; \
185 uint32_t plane_updated; \
186 uint8_t last_cw, last_ch; \
187 uint32_t last_width, last_height; /* in chars or pixels */ \
188 uint32_t last_scr_width, last_scr_height; /* in pixels */ \
189 uint8_t cursor_start, cursor_end; \
190 uint32_t cursor_offset; \
191 unsigned int (*rgb_to_pixel)(unsigned int r, \
192 unsigned int g, unsigned b); \
193 /* hardware mouse cursor support */ \
194 uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; \
195 void (*cursor_invalidate)(struct VGAState *s); \
196 void (*cursor_draw_line)(struct VGAState *s, uint8_t *d, int y); \
197 /* tell for each page if it has been updated since the last time */ \
198 uint32_t last_palette[256]; \
199 uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */
200
201#else /* VBOX */
202
203struct VGAState;
204typedef int FNGETBPP(struct VGAState *s);
205typedef void FNGETOFFSETS(struct VGAState *s, uint32_t *pline_offset, uint32_t *pstart_addr, uint32_t *pline_compare);
206typedef void FNGETRESOLUTION(struct VGAState *s, int *pwidth, int *pheight);
207typedef unsigned int FNRGBTOPIXEL(unsigned int r, unsigned int g, unsigned b);
208typedef void FNCURSORINVALIDATE(struct VGAState *s);
209typedef void FNCURSORDRAWLINE(struct VGAState *s, uint8_t *d, int y);
210
211/* bird: vram_offset have been remove, function pointers declared external,
212 some type changes, and some padding have been added. */
213#define VGA_STATE_COMMON \
214 R3PTRTYPE(uint8_t *) vram_ptrR3; \
215 uint32_t vram_size; \
216 uint32_t latch; \
217 uint8_t sr_index; \
218 uint8_t sr[256]; \
219 uint8_t gr_index; \
220 uint8_t gr[256]; \
221 uint8_t ar_index; \
222 uint8_t ar[21]; \
223 int32_t ar_flip_flop; \
224 uint8_t cr_index; \
225 uint8_t cr[256]; /* CRT registers */ \
226 uint8_t msr; /* Misc Output Register */ \
227 uint8_t fcr; /* Feature Control Register */ \
228 uint8_t st00; /* status 0 */ \
229 uint8_t st01; /* status 1 */ \
230 uint8_t dac_state; \
231 uint8_t dac_sub_index; \
232 uint8_t dac_read_index; \
233 uint8_t dac_write_index; \
234 uint8_t dac_cache[3]; /* used when writing */ \
235 uint8_t palette[768]; \
236 int32_t bank_offset; \
237 int32_t padding0; \
238 R3PTRTYPE(FNGETBPP *) get_bpp; \
239 R3PTRTYPE(FNGETOFFSETS *) get_offsets; \
240 R3PTRTYPE(FNGETRESOLUTION *) get_resolution; \
241 VGA_STATE_COMMON_BOCHS_VBE \
242 /* display refresh support */ \
243 uint32_t font_offsets[2]; \
244 int32_t graphic_mode; \
245 uint8_t shift_control; \
246 uint8_t double_scan; \
247 uint8_t padding1[2]; \
248 uint32_t line_offset; \
249 uint32_t line_compare; \
250 uint32_t start_addr; \
251 uint32_t plane_updated; \
252 uint8_t last_cw, last_ch, padding2[2]; \
253 uint32_t last_width, last_height; /* in chars or pixels */ \
254 uint32_t last_scr_width, last_scr_height; /* in pixels */ \
255 uint32_t last_bpp; \
256 uint8_t cursor_start, cursor_end, padding3[2]; \
257 uint32_t cursor_offset; \
258 uint32_t padding4; \
259 R3PTRTYPE(FNRGBTOPIXEL *) rgb_to_pixel; \
260 /* hardware mouse cursor support */ \
261 uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; \
262 R3PTRTYPE(FNCURSORINVALIDATE *) cursor_invalidate; \
263 R3PTRTYPE(FNCURSORDRAWLINE *) cursor_draw_line; \
264 /* tell for each page if it has been updated since the last time */ \
265 uint32_t last_palette[256]; \
266 uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */
267
268#endif /* VBOX */
269
270#ifdef VBOX_WITH_VDMA
271typedef struct VBOXVDMAHOST *PVBOXVDMAHOST;
272#endif
273
274typedef struct VGAState {
275 VGA_STATE_COMMON
276#ifdef VBOX
277 /** end-of-common-state-marker */
278 uint32_t u32Marker;
279 /** The physical address the VRAM was assigned. */
280 RTGCPHYS32 GCPhysVRAM;
281 /** The R0 vram pointer... */
282 R0PTRTYPE(uint8_t *) vram_ptrR0;
283 /** Pointer to the GC vram mapping. */
284 RCPTRTYPE(uint8_t *) vram_ptrRC;
285 /** LFB was updated flag. */
286 bool fLFBUpdated;
287 /** Indicates if the GC extensions are enabled or not. */
288 bool fGCEnabled;
289 /** Indicates if the R0 extensions are enabled or not. */
290 bool fR0Enabled;
291 /** Flag indicating that there are dirty bits. This is used to optimize the handler resetting. */
292 bool fHasDirtyBits;
293 /** Flag indicating that the VGA memory in the 0xa0000-0xbffff region has been remapped to allow direct access. */
294 bool fRemappedVGA;
295 /** Whether to render the guest VRAM to the framebuffer memory. False only for some LFB modes. */
296 bool fRenderVRAM;
297 bool Padding1[2];
298
299#ifdef VBOX_WITH_HGSMI
300 R3PTRTYPE(PHGSMIINSTANCE) pHGSMI;
301#endif /* VBOX_WITH_HGSMI */
302#ifdef VBOX_WITH_VDMA
303 R3PTRTYPE(PVBOXVDMAHOST) pVdma;
304#endif
305
306 uint32_t cMonitors;
307 /** Current refresh timer interval. */
308 uint32_t cMilliesRefreshInterval;
309 /** Refresh timer handle - HC. */
310 PTMTIMERR3 RefreshTimer;
311
312 /** Bitmap tracking dirty pages. */
313 uint32_t au32DirtyBitmap[VGA_VRAM_MAX / PAGE_SIZE / 32];
314 /** Pointer to vgaGCLFBAccessHandler(). */
315 RTRCPTR RCPtrLFBHandler;
316 /** Pointer to the device instance - RC Ptr. */
317 PPDMDEVINSRC pDevInsRC;
318 /** Pointer to the device instance - R3 Ptr. */
319 PPDMDEVINSR3 pDevInsR3;
320 /** Pointer to the device instance - R0 Ptr. */
321 PPDMDEVINSR0 pDevInsR0;
322
323 /** The critical section. */
324 PDMCRITSECT lock;
325
326 /** LUN\#0: The display port base interface. */
327 PDMIBASE IBase;
328 /** LUN\#0: The display port interface. */
329 PDMIDISPLAYPORT IPort;
330#if defined(VBOX_WITH_HGSMI) && (defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_CRHGSMI))
331 /** LUN\#0: VBVA callbacks interface */
332 PDMIDISPLAYVBVACALLBACKS IVBVACallbacks;
333#else
334# if HC_ARCH_BITS == 32
335 uint32_t Padding3;
336# endif
337#endif
338 /** Pointer to base interface of the driver. */
339 R3PTRTYPE(PPDMIBASE) pDrvBase;
340 /** Pointer to display connector interface of the driver. */
341 R3PTRTYPE(PPDMIDISPLAYCONNECTOR) pDrv;
342
343 /** The PCI device. */
344 PCIDEVICE Dev;
345
346 STAMPROFILE StatRZMemoryRead;
347 STAMPROFILE StatR3MemoryRead;
348 STAMPROFILE StatRZMemoryWrite;
349 STAMPROFILE StatR3MemoryWrite;
350 STAMCOUNTER StatMapPage; /**< Counts IOMMMIOMapMMIO2Page calls. */
351 STAMCOUNTER StatUpdateDisp; /**< Counts vgaPortUpdateDisplay calls. */
352
353 /* Keep track of ring 0 latched accesses to the VGA MMIO memory. */
354 uint64_t u64LastLatchedAccess;
355 uint32_t cLatchAccesses;
356 uint16_t uMaskLatchAccess;
357 uint16_t iMask;
358
359#ifdef VBE_BYTEWISE_IO
360 /** VBE read/write data/index flags */
361 uint8_t fReadVBEData;
362 uint8_t fWriteVBEData;
363 uint8_t fReadVBEIndex;
364 uint8_t fWriteVBEIndex;
365 /** VBE write data/index one byte buffer */
366 uint8_t cbWriteVBEData;
367 uint8_t cbWriteVBEIndex;
368# ifdef VBE_NEW_DYN_LIST
369 /** VBE Extra Data write address one byte buffer */
370 uint8_t cbWriteVBEExtraAddress;
371 uint8_t Padding4;
372# else
373 uint8_t Padding4[2];
374# endif
375#endif
376
377#ifdef VBE_NEW_DYN_LIST
378 /** The VBE BIOS extra data. */
379 R3PTRTYPE(uint8_t *) pu8VBEExtraData;
380 /** The size of the VBE BIOS extra data. */
381 uint16_t cbVBEExtraData;
382 /** The VBE BIOS current memory address. */
383 uint16_t u16VBEExtraAddress;
384 uint16_t Padding5[2];
385#endif
386 /** Current logo data offset. */
387 uint32_t offLogoData;
388 /** The size of the BIOS logo data. */
389 uint32_t cbLogo;
390 /** The BIOS logo data. */
391 R3PTRTYPE(uint8_t *) pu8Logo;
392 /** The name of the logo file. */
393 R3PTRTYPE(char *) pszLogoFile;
394 /** Bitmap image data. */
395 R3PTRTYPE(uint8_t *) pu8LogoBitmap;
396 /** Current logo command. */
397 uint16_t LogoCommand;
398 /** Bitmap width. */
399 uint16_t cxLogo;
400 /** Bitmap height. */
401 uint16_t cyLogo;
402 /** Bitmap planes. */
403 uint16_t cLogoPlanes;
404 /** Bitmap depth. */
405 uint16_t cLogoBits;
406 /** Bitmap compression. */
407 uint16_t LogoCompression;
408 /** Bitmap colors used. */
409 uint16_t cLogoUsedColors;
410 /** Palette size. */
411 uint16_t cLogoPalEntries;
412 /** Clear screen flag. */
413 uint8_t fLogoClearScreen;
414 uint8_t Padding6[7];
415 /** Palette data. */
416 uint32_t au32LogoPalette[256];
417 /** The VGA BIOS ROM data. */
418 R3PTRTYPE(uint8_t *) pu8VgaBios;
419 /** The size of the VGA BIOS ROM. */
420 uint64_t cbVgaBios;
421 /** The name of the VGA BIOS ROM file. */
422 R3PTRTYPE(char *) pszVgaBiosFile;
423#endif /* VBOX */
424#ifdef VBOX_WITH_HGSMI
425 /** Base port in the assigned PCI I/O space. */
426 RTIOPORT IOPortBase;
427#ifdef VBOX_WITH_WDDM
428 uint8_t Padding7[2];
429 /* specifies guest driver caps, i.e. whether it can handle IRQs from the adapter,
430 * the way it can handle async HGSMI command completion, etc. */
431 uint32_t fGuestCaps;
432#else
433 uint8_t Padding7[6];
434#endif
435#endif /* VBOX_WITH_HGSMI */
436} VGAState;
437#ifdef VBOX
438/** VGA state. */
439typedef VGAState VGASTATE;
440/** Pointer to the VGA state. */
441typedef VGASTATE *PVGASTATE;
442#endif
443
444#ifdef VBE_NEW_DYN_LIST
445/**
446 * VBE Bios Extra Data structure.
447 * @remark duplicated in vbe.h.
448 */
449typedef struct VBEHeader
450{
451 /** Signature (VBEHEADER_MAGIC). */
452 uint16_t u16Signature;
453 /** Data size. */
454 uint16_t cbData;
455} VBEHeader;
456
457/** VBE Extra Data. */
458typedef VBEHeader VBEHEADER;
459/** Pointer to the VBE Extra Data. */
460typedef VBEHEADER *PVBEHEADER;
461
462/** The value of the VBEHEADER::u16Signature field.
463 * @remark duplicated in vbe.h. */
464#define VBEHEADER_MAGIC 0x77CC
465
466/** The extra port which is used to read the mode list.
467 * @remark duplicated in vbe.h. */
468#define VBE_EXTRA_PORT 0x3b6
469
470/** The extra port which is used for debug printf.
471 * @remark duplicated in vbe.h. */
472#define VBE_PRINTF_PORT 0x3b7
473
474#endif /* VBE_NEW_DYN_LIST */
475
476#if !defined(VBOX) || defined(IN_RING3)
477static inline int c6_to_8(int v)
478{
479 int b;
480 v &= 0x3f;
481 b = v & 1;
482 return (v << 2) | (b << 1) | b;
483}
484#endif /* !VBOX || IN_RING3 */
485
486
487#ifdef VBOX_WITH_HGSMI
488int VBVAInit (PVGASTATE pVGAState);
489void VBVADestroy (PVGASTATE pVGAState);
490int VBVAUpdateDisplay (PVGASTATE pVGAState);
491void VBVAReset (PVGASTATE pVGAState);
492
493bool VBVAIsEnabled(PVGASTATE pVGAState);
494
495/* @return host-guest flags that were set on reset
496 * this allows the caller to make further cleaning when needed,
497 * e.g. reset the IRQ */
498uint32_t HGSMIReset (PHGSMIINSTANCE pIns);
499
500# ifdef VBOX_WITH_VIDEOHWACCEL
501int vbvaVHWACommandCompleteAsynch(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd);
502int vbvaVHWAConstruct (PVGASTATE pVGAState);
503int vbvaVHWADisable (PVGASTATE pVGAState);
504int vbvaVHWAReset (PVGASTATE pVGAState);
505
506int vboxVBVASaveStatePrep (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
507# endif
508
509#ifdef VBOX_WITH_HGSMI
510#define PPDMIDISPLAYVBVACALLBACKS_2_PVGASTATE(_pcb) ( (PVGASTATE)((uint8_t *)(_pcb) - RT_OFFSETOF(VGASTATE, IVBVACallbacks)) )
511#endif
512
513# ifdef VBOX_WITH_CRHGSMI
514int vboxVDMACrHgsmiCommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, int rc);
515int vboxVDMACrHgsmiControlCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCmd, int rc);
516# endif
517
518int vboxVBVASaveStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
519int vboxVBVALoadStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t u32Version);
520int vboxVBVALoadStateDone (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
521
522# ifdef VBOX_WITH_VDMA
523typedef struct VBOXVDMAHOST *PVBOXVDMAHOST;
524int vboxVDMAConstruct(PVGASTATE pVGAState, struct VBOXVDMAHOST **ppVdma, uint32_t cPipeElements);
525int vboxVDMADestruct(PVBOXVDMAHOST pVdma);
526void vboxVDMAControl(PVBOXVDMAHOST pVdma, PVBOXVDMA_CTL pCmd);
527void vboxVDMACommand(PVBOXVDMAHOST pVdma, PVBOXVDMACBUF_DR pCmd);
528bool vboxVDMAIsEnabled(PVBOXVDMAHOST pVdma);
529# endif /* VBOX_WITH_VDMA */
530
531#endif /* VBOX_WITH_HGSMI */
532
533#ifndef VBOX
534void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
535 unsigned long vga_ram_offset, int vga_ram_size);
536uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr);
537void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val);
538void vga_invalidate_scanlines(VGAState *s, int y1, int y2);
539
540void vga_draw_cursor_line_8(uint8_t *d1, const uint8_t *src1,
541 int poffset, int w,
542 unsigned int color0, unsigned int color1,
543 unsigned int color_xor);
544void vga_draw_cursor_line_16(uint8_t *d1, const uint8_t *src1,
545 int poffset, int w,
546 unsigned int color0, unsigned int color1,
547 unsigned int color_xor);
548void vga_draw_cursor_line_32(uint8_t *d1, const uint8_t *src1,
549 int poffset, int w,
550 unsigned int color0, unsigned int color1,
551 unsigned int color_xor);
552
553extern const uint8_t sr_mask[8];
554extern const uint8_t gr_mask[16];
555#endif /* !VBOX */
556
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette