VirtualBox

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

最後變更 在這個檔案從33360是 33263,由 vboxsync 提交於 14 年 前

VGA: Advertise unrestricted horizontal resolutions.

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

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