1 | /* $Id: DevVGA.h 17297 2009-03-03 16:01:29Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * DevVGA - VBox VGA/VESA device, internal header.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
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 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | * additional information or have any questions.
|
---|
20 | * --------------------------------------------------------------------
|
---|
21 | *
|
---|
22 | * This code is based on:
|
---|
23 | *
|
---|
24 | * QEMU internal VGA defines.
|
---|
25 | *
|
---|
26 | * Copyright (c) 2003-2004 Fabrice Bellard
|
---|
27 | *
|
---|
28 | * Permission is hereby granted, free of charge, to any person obtaining a copy
|
---|
29 | * of this software and associated documentation files (the "Software"), to deal
|
---|
30 | * in the Software without restriction, including without limitation the rights
|
---|
31 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
---|
32 | * copies of the Software, and to permit persons to whom the Software is
|
---|
33 | * furnished to do so, subject to the following conditions:
|
---|
34 | *
|
---|
35 | * The above copyright notice and this permission notice shall be included in
|
---|
36 | * all copies or substantial portions of the Software.
|
---|
37 | *
|
---|
38 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
39 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
40 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
41 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
---|
42 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
---|
43 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
---|
44 | * THE SOFTWARE.
|
---|
45 | */
|
---|
46 |
|
---|
47 | #define MSR_COLOR_EMULATION 0x01
|
---|
48 | #define MSR_PAGE_SELECT 0x20
|
---|
49 |
|
---|
50 | #define ST01_V_RETRACE 0x08
|
---|
51 | #define ST01_DISP_ENABLE 0x01
|
---|
52 |
|
---|
53 | /* bochs VBE support */
|
---|
54 | #define CONFIG_BOCHS_VBE
|
---|
55 |
|
---|
56 | #ifdef VBOX
|
---|
57 | #define VBE_DISPI_MAX_XRES 16384
|
---|
58 | #define VBE_DISPI_MAX_YRES 16384
|
---|
59 | #else
|
---|
60 | #define VBE_DISPI_MAX_XRES 1600
|
---|
61 | #define VBE_DISPI_MAX_YRES 1200
|
---|
62 | #endif
|
---|
63 | #define VBE_DISPI_MAX_BPP 32
|
---|
64 |
|
---|
65 | #define VBE_DISPI_INDEX_ID 0x0
|
---|
66 | #define VBE_DISPI_INDEX_XRES 0x1
|
---|
67 | #define VBE_DISPI_INDEX_YRES 0x2
|
---|
68 | #define VBE_DISPI_INDEX_BPP 0x3
|
---|
69 | #define VBE_DISPI_INDEX_ENABLE 0x4
|
---|
70 | #define VBE_DISPI_INDEX_BANK 0x5
|
---|
71 | #define VBE_DISPI_INDEX_VIRT_WIDTH 0x6
|
---|
72 | #define VBE_DISPI_INDEX_VIRT_HEIGHT 0x7
|
---|
73 | #define VBE_DISPI_INDEX_X_OFFSET 0x8
|
---|
74 | #define VBE_DISPI_INDEX_Y_OFFSET 0x9
|
---|
75 | #define VBE_DISPI_INDEX_VBOX_VIDEO 0xa
|
---|
76 | #define VBE_DISPI_INDEX_NB 0xb
|
---|
77 |
|
---|
78 | #define VBE_DISPI_ID0 0xB0C0
|
---|
79 | #define VBE_DISPI_ID1 0xB0C1
|
---|
80 | #define VBE_DISPI_ID2 0xB0C2
|
---|
81 | #define VBE_DISPI_ID3 0xB0C3
|
---|
82 | #define VBE_DISPI_ID4 0xB0C4
|
---|
83 |
|
---|
84 | #ifdef VBOX
|
---|
85 | /* The VBOX interface id. Indicates support for VBE_DISPI_INDEX_VBOX_VIDEO. */
|
---|
86 | #define VBE_DISPI_ID_VBOX_VIDEO 0xBE00
|
---|
87 | #endif /* VBOX */
|
---|
88 |
|
---|
89 | #define VBE_DISPI_DISABLED 0x00
|
---|
90 | #define VBE_DISPI_ENABLED 0x01
|
---|
91 | #define VBE_DISPI_GETCAPS 0x02
|
---|
92 | #define VBE_DISPI_8BIT_DAC 0x20
|
---|
93 | #define VBE_DISPI_LFB_ENABLED 0x40
|
---|
94 | #define VBE_DISPI_NOCLEARMEM 0x80
|
---|
95 |
|
---|
96 | #define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000
|
---|
97 |
|
---|
98 | #ifdef CONFIG_BOCHS_VBE
|
---|
99 |
|
---|
100 | #define VGA_STATE_COMMON_BOCHS_VBE \
|
---|
101 | uint16_t vbe_index; \
|
---|
102 | uint16_t vbe_regs[VBE_DISPI_INDEX_NB]; \
|
---|
103 | uint32_t vbe_start_addr; \
|
---|
104 | uint32_t vbe_line_offset; \
|
---|
105 | uint32_t vbe_bank_max;
|
---|
106 |
|
---|
107 | #else
|
---|
108 |
|
---|
109 | #define VGA_STATE_COMMON_BOCHS_VBE
|
---|
110 |
|
---|
111 | #endif /* !CONFIG_BOCHS_VBE */
|
---|
112 |
|
---|
113 | #define CH_ATTR_SIZE (160 * 100)
|
---|
114 | #define VGA_MAX_HEIGHT VBE_DISPI_MAX_YRES
|
---|
115 |
|
---|
116 | #ifndef VBOX
|
---|
117 | #define VGA_STATE_COMMON \
|
---|
118 | uint8_t *vram_ptr; \
|
---|
119 | unsigned long vram_offset; \
|
---|
120 | unsigned int vram_size; \
|
---|
121 | uint32_t latch; \
|
---|
122 | uint8_t sr_index; \
|
---|
123 | uint8_t sr[256]; \
|
---|
124 | uint8_t gr_index; \
|
---|
125 | uint8_t gr[256]; \
|
---|
126 | uint8_t ar_index; \
|
---|
127 | uint8_t ar[21]; \
|
---|
128 | int ar_flip_flop; \
|
---|
129 | uint8_t cr_index; \
|
---|
130 | uint8_t cr[256]; /* CRT registers */ \
|
---|
131 | uint8_t msr; /* Misc Output Register */ \
|
---|
132 | uint8_t fcr; /* Feature Control Register */ \
|
---|
133 | uint8_t st00; /* status 0 */ \
|
---|
134 | uint8_t st01; /* status 1 */ \
|
---|
135 | uint8_t dac_state; \
|
---|
136 | uint8_t dac_sub_index; \
|
---|
137 | uint8_t dac_read_index; \
|
---|
138 | uint8_t dac_write_index; \
|
---|
139 | uint8_t dac_cache[3]; /* used when writing */ \
|
---|
140 | uint8_t palette[768]; \
|
---|
141 | int32_t bank_offset; \
|
---|
142 | int (*get_bpp)(struct VGAState *s); \
|
---|
143 | void (*get_offsets)(struct VGAState *s, \
|
---|
144 | uint32_t *pline_offset, \
|
---|
145 | uint32_t *pstart_addr, \
|
---|
146 | uint32_t *pline_compare); \
|
---|
147 | void (*get_resolution)(struct VGAState *s, \
|
---|
148 | int *pwidth, \
|
---|
149 | int *pheight); \
|
---|
150 | VGA_STATE_COMMON_BOCHS_VBE \
|
---|
151 | /* display refresh support */ \
|
---|
152 | DisplayState *ds; \
|
---|
153 | uint32_t font_offsets[2]; \
|
---|
154 | int graphic_mode; \
|
---|
155 | uint8_t shift_control; \
|
---|
156 | uint8_t double_scan; \
|
---|
157 | uint32_t line_offset; \
|
---|
158 | uint32_t line_compare; \
|
---|
159 | uint32_t start_addr; \
|
---|
160 | uint32_t plane_updated; \
|
---|
161 | uint8_t last_cw, last_ch; \
|
---|
162 | uint32_t last_width, last_height; /* in chars or pixels */ \
|
---|
163 | uint32_t last_scr_width, last_scr_height; /* in pixels */ \
|
---|
164 | uint8_t cursor_start, cursor_end; \
|
---|
165 | uint32_t cursor_offset; \
|
---|
166 | unsigned int (*rgb_to_pixel)(unsigned int r, \
|
---|
167 | unsigned int g, unsigned b); \
|
---|
168 | /* hardware mouse cursor support */ \
|
---|
169 | uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; \
|
---|
170 | void (*cursor_invalidate)(struct VGAState *s); \
|
---|
171 | void (*cursor_draw_line)(struct VGAState *s, uint8_t *d, int y); \
|
---|
172 | /* tell for each page if it has been updated since the last time */ \
|
---|
173 | uint32_t last_palette[256]; \
|
---|
174 | uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */
|
---|
175 |
|
---|
176 | #else /* VBOX */
|
---|
177 |
|
---|
178 | struct VGAState;
|
---|
179 | typedef int FNGETBPP(struct VGAState *s);
|
---|
180 | typedef void FNGETOFFSETS(struct VGAState *s, uint32_t *pline_offset, uint32_t *pstart_addr, uint32_t *pline_compare);
|
---|
181 | typedef void FNGETRESOLUTION(struct VGAState *s, int *pwidth, int *pheight);
|
---|
182 | typedef unsigned int FNRGBTOPIXEL(unsigned int r, unsigned int g, unsigned b);
|
---|
183 | typedef void FNCURSORINVALIDATE(struct VGAState *s);
|
---|
184 | typedef void FNCURSORDRAWLINE(struct VGAState *s, uint8_t *d, int y);
|
---|
185 |
|
---|
186 | /* bird: vram_offset have been remove, function pointers declared external,
|
---|
187 | some type changes, and some padding have been added. */
|
---|
188 | #define VGA_STATE_COMMON \
|
---|
189 | R3PTRTYPE(uint8_t *) vram_ptrR3; \
|
---|
190 | uint32_t vram_size; \
|
---|
191 | uint32_t latch; \
|
---|
192 | uint8_t sr_index; \
|
---|
193 | uint8_t sr[256]; \
|
---|
194 | uint8_t gr_index; \
|
---|
195 | uint8_t gr[256]; \
|
---|
196 | uint8_t ar_index; \
|
---|
197 | uint8_t ar[21]; \
|
---|
198 | int32_t ar_flip_flop; \
|
---|
199 | uint8_t cr_index; \
|
---|
200 | uint8_t cr[256]; /* CRT registers */ \
|
---|
201 | uint8_t msr; /* Misc Output Register */ \
|
---|
202 | uint8_t fcr; /* Feature Control Register */ \
|
---|
203 | uint8_t st00; /* status 0 */ \
|
---|
204 | uint8_t st01; /* status 1 */ \
|
---|
205 | uint8_t dac_state; \
|
---|
206 | uint8_t dac_sub_index; \
|
---|
207 | uint8_t dac_read_index; \
|
---|
208 | uint8_t dac_write_index; \
|
---|
209 | uint8_t dac_cache[3]; /* used when writing */ \
|
---|
210 | uint8_t palette[768]; \
|
---|
211 | int32_t bank_offset; \
|
---|
212 | int32_t padding0; \
|
---|
213 | R3PTRTYPE(FNGETBPP *) get_bpp; \
|
---|
214 | R3PTRTYPE(FNGETOFFSETS *) get_offsets; \
|
---|
215 | R3PTRTYPE(FNGETRESOLUTION *) get_resolution; \
|
---|
216 | VGA_STATE_COMMON_BOCHS_VBE \
|
---|
217 | /* display refresh support */ \
|
---|
218 | uint32_t font_offsets[2]; \
|
---|
219 | int32_t graphic_mode; \
|
---|
220 | uint8_t shift_control; \
|
---|
221 | uint8_t double_scan; \
|
---|
222 | uint8_t padding1[2]; \
|
---|
223 | uint32_t line_offset; \
|
---|
224 | uint32_t line_compare; \
|
---|
225 | uint32_t start_addr; \
|
---|
226 | uint32_t plane_updated; \
|
---|
227 | uint8_t last_cw, last_ch, padding2[2]; \
|
---|
228 | uint32_t last_width, last_height; /* in chars or pixels */ \
|
---|
229 | uint32_t last_scr_width, last_scr_height; /* in pixels */ \
|
---|
230 | uint32_t last_bpp; \
|
---|
231 | uint8_t cursor_start, cursor_end, padding3[2]; \
|
---|
232 | uint32_t cursor_offset; \
|
---|
233 | uint32_t padding4; \
|
---|
234 | R3PTRTYPE(FNRGBTOPIXEL *) rgb_to_pixel; \
|
---|
235 | /* hardware mouse cursor support */ \
|
---|
236 | uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; \
|
---|
237 | R3PTRTYPE(FNCURSORINVALIDATE *) cursor_invalidate; \
|
---|
238 | R3PTRTYPE(FNCURSORDRAWLINE *) cursor_draw_line; \
|
---|
239 | /* tell for each page if it has been updated since the last time */ \
|
---|
240 | uint32_t last_palette[256]; \
|
---|
241 | uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */
|
---|
242 |
|
---|
243 | #endif /* VBOX */
|
---|
244 |
|
---|
245 | typedef struct VGAState {
|
---|
246 | VGA_STATE_COMMON
|
---|
247 | #ifdef VBOX
|
---|
248 | /** end-of-common-state-marker */
|
---|
249 | uint32_t u32Marker;
|
---|
250 | /** The physical address the VRAM was assigned. */
|
---|
251 | RTGCPHYS32 GCPhysVRAM;
|
---|
252 | /** The R0 vram pointer... */
|
---|
253 | R0PTRTYPE(uint8_t *) vram_ptrR0;
|
---|
254 | /** Pointer to the GC vram mapping. */
|
---|
255 | RCPTRTYPE(uint8_t *) vram_ptrRC;
|
---|
256 | /** LFB was updated flag. */
|
---|
257 | bool fLFBUpdated;
|
---|
258 | /** Indicates if the GC extensions are enabled or not. */
|
---|
259 | bool fGCEnabled;
|
---|
260 | /** Indicates if the R0 extensions are enabled or not. */
|
---|
261 | bool fR0Enabled;
|
---|
262 | /** Flag indicating that there are dirty bits. This is used to optimize the handler resetting. */
|
---|
263 | bool fHasDirtyBits;
|
---|
264 | /** Flag indicating that the VGA memory in the 0xa0000-0xbffff region has been remapped to allow direct access. */
|
---|
265 | bool fRemappedVGA;
|
---|
266 | /** Whether to render the guest VRAM to the framebuffer memory. False only for some LFB modes. */
|
---|
267 | bool fRenderVRAM;
|
---|
268 | bool padding9[2];
|
---|
269 |
|
---|
270 | /** Current refresh timer interval. */
|
---|
271 | uint32_t cMilliesRefreshInterval;
|
---|
272 | /** Refresh timer handle - HC. */
|
---|
273 | PTMTIMERR3 RefreshTimer;
|
---|
274 |
|
---|
275 | /** Bitmap tracking dirty pages. */
|
---|
276 | uint32_t au32DirtyBitmap[VGA_VRAM_MAX / PAGE_SIZE / 32];
|
---|
277 | /** Pointer to vgaGCLFBAccessHandler(). */
|
---|
278 | RTRCPTR RCPtrLFBHandler;
|
---|
279 | /** Pointer to the device instance - RC Ptr. */
|
---|
280 | PPDMDEVINSRC pDevInsRC;
|
---|
281 | /** Pointer to the device instance - R3 Ptr. */
|
---|
282 | PPDMDEVINSR3 pDevInsR3;
|
---|
283 | /** Pointer to the device instance - R0 Ptr. */
|
---|
284 | PPDMDEVINSR0 pDevInsR0;
|
---|
285 |
|
---|
286 | /** The display port base interface. */
|
---|
287 | PDMIBASE Base;
|
---|
288 | /** The display port interface. */
|
---|
289 | PDMIDISPLAYPORT Port;
|
---|
290 | /** Pointer to base interface of the driver. */
|
---|
291 | R3PTRTYPE(PPDMIBASE) pDrvBase;
|
---|
292 | /** Pointer to display connector interface of the driver. */
|
---|
293 | R3PTRTYPE(PPDMIDISPLAYCONNECTOR) pDrv;
|
---|
294 |
|
---|
295 | /** The PCI device. */
|
---|
296 | PCIDEVICE Dev;
|
---|
297 |
|
---|
298 | STAMPROFILE StatRZMemoryRead;
|
---|
299 | STAMPROFILE StatR3MemoryRead;
|
---|
300 | STAMPROFILE StatRZMemoryWrite;
|
---|
301 | STAMPROFILE StatR3MemoryWrite;
|
---|
302 |
|
---|
303 | /* Keep track of ring 0 latched accesses to the VGA MMIO memory. */
|
---|
304 | uint64_t u64LastLatchedAccess;
|
---|
305 | uint32_t cLatchAccesses;
|
---|
306 |
|
---|
307 | #ifdef VBE_BYTEWISE_IO
|
---|
308 | /** VBE read/write data/index flags */
|
---|
309 | uint8_t fReadVBEData;
|
---|
310 | uint8_t fWriteVBEData;
|
---|
311 | uint8_t fReadVBEIndex;
|
---|
312 | uint8_t fWriteVBEIndex;
|
---|
313 | /** VBE write data/index one byte buffer */
|
---|
314 | uint8_t cbWriteVBEData;
|
---|
315 | uint8_t cbWriteVBEIndex;
|
---|
316 | # ifdef VBE_NEW_DYN_LIST
|
---|
317 | /** VBE Extra Data write address one byte buffer */
|
---|
318 | uint8_t cbWriteVBEExtraAddress;
|
---|
319 | uint8_t Padding6; /**< Alignment padding. */
|
---|
320 | # else
|
---|
321 | uint8_t Padding6[2]; /**< Alignment padding. */
|
---|
322 | # endif
|
---|
323 | #endif
|
---|
324 |
|
---|
325 | #ifdef VBE_NEW_DYN_LIST
|
---|
326 | /** The VBE BIOS extra data. */
|
---|
327 | R3PTRTYPE(uint8_t *) pu8VBEExtraData;
|
---|
328 | /** The size of the VBE BIOS extra data. */
|
---|
329 | uint16_t cbVBEExtraData;
|
---|
330 | /** The VBE BIOS current memory address. */
|
---|
331 | uint16_t u16VBEExtraAddress;
|
---|
332 | uint16_t Padding7[2]; /**< Alignment padding. */
|
---|
333 | #endif
|
---|
334 | /** Current logo data offset. */
|
---|
335 | uint32_t offLogoData;
|
---|
336 | /** The size of the BIOS logo data. */
|
---|
337 | uint32_t cbLogo;
|
---|
338 | /** The BIOS logo data. */
|
---|
339 | R3PTRTYPE(uint8_t *) pu8Logo;
|
---|
340 | /** The name of the logo file. */
|
---|
341 | R3PTRTYPE(char *) pszLogoFile;
|
---|
342 | /** Bitmap image data. */
|
---|
343 | R3PTRTYPE(uint8_t *) pu8LogoBitmap;
|
---|
344 | /** Current logo command. */
|
---|
345 | uint16_t LogoCommand;
|
---|
346 | /** Bitmap width. */
|
---|
347 | uint16_t cxLogo;
|
---|
348 | /** Bitmap height. */
|
---|
349 | uint16_t cyLogo;
|
---|
350 | /** Bitmap planes. */
|
---|
351 | uint16_t cLogoPlanes;
|
---|
352 | /** Bitmap depth. */
|
---|
353 | uint16_t cLogoBits;
|
---|
354 | /** Bitmap compression. */
|
---|
355 | uint16_t LogoCompression;
|
---|
356 | /** Bitmap colors used. */
|
---|
357 | uint16_t cLogoUsedColors;
|
---|
358 | /** Palette size. */
|
---|
359 | uint16_t cLogoPalEntries;
|
---|
360 | /** Clear screen flag. */
|
---|
361 | uint8_t fLogoClearScreen;
|
---|
362 | uint8_t Padding8[7]; /**< Alignment padding. */
|
---|
363 | /** Palette data. */
|
---|
364 | uint32_t au32LogoPalette[256];
|
---|
365 | #endif /* VBOX */
|
---|
366 | } VGAState;
|
---|
367 | #ifdef VBOX
|
---|
368 | /** VGA state. */
|
---|
369 | typedef VGAState VGASTATE;
|
---|
370 | /** Pointer to the VGA state. */
|
---|
371 | typedef VGASTATE *PVGASTATE;
|
---|
372 | #endif
|
---|
373 |
|
---|
374 | #ifdef VBE_NEW_DYN_LIST
|
---|
375 | /**
|
---|
376 | * VBE Bios Extra Data structure.
|
---|
377 | * @remark duplicated in vbe.h.
|
---|
378 | */
|
---|
379 | typedef struct VBEHeader
|
---|
380 | {
|
---|
381 | /** Signature (VBEHEADER_MAGIC). */
|
---|
382 | uint16_t u16Signature;
|
---|
383 | /** Data size. */
|
---|
384 | uint16_t cbData;
|
---|
385 | } VBEHeader;
|
---|
386 |
|
---|
387 | /** VBE Extra Data. */
|
---|
388 | typedef VBEHeader VBEHEADER;
|
---|
389 | /** Pointer to the VBE Extra Data. */
|
---|
390 | typedef VBEHEADER *PVBEHEADER;
|
---|
391 |
|
---|
392 | /** The value of the VBEHEADER::u16Signature field.
|
---|
393 | * @remark duplicated in vbe.h. */
|
---|
394 | #define VBEHEADER_MAGIC 0x77CC
|
---|
395 |
|
---|
396 | /** The extra port which is used to read the mode list.
|
---|
397 | * @remark duplicated in vbe.h. */
|
---|
398 | #define VBE_EXTRA_PORT 0x3b6
|
---|
399 |
|
---|
400 | /** The extra port which is used for debug printf.
|
---|
401 | * @remark duplicated in vbe.h. */
|
---|
402 | #define VBE_PRINTF_PORT 0x3b7
|
---|
403 |
|
---|
404 | #endif /* VBE_NEW_DYN_LIST */
|
---|
405 |
|
---|
406 | #if !defined(VBOX) || defined(IN_RING3)
|
---|
407 | static inline int c6_to_8(int v)
|
---|
408 | {
|
---|
409 | int b;
|
---|
410 | v &= 0x3f;
|
---|
411 | b = v & 1;
|
---|
412 | return (v << 2) | (b << 1) | b;
|
---|
413 | }
|
---|
414 | #endif /* !VBOX || IN_RING3 */
|
---|
415 |
|
---|
416 | #ifndef VBOX
|
---|
417 | void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
|
---|
418 | unsigned long vga_ram_offset, int vga_ram_size);
|
---|
419 | uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr);
|
---|
420 | void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val);
|
---|
421 | void vga_invalidate_scanlines(VGAState *s, int y1, int y2);
|
---|
422 |
|
---|
423 | void vga_draw_cursor_line_8(uint8_t *d1, const uint8_t *src1,
|
---|
424 | int poffset, int w,
|
---|
425 | unsigned int color0, unsigned int color1,
|
---|
426 | unsigned int color_xor);
|
---|
427 | void vga_draw_cursor_line_16(uint8_t *d1, const uint8_t *src1,
|
---|
428 | int poffset, int w,
|
---|
429 | unsigned int color0, unsigned int color1,
|
---|
430 | unsigned int color_xor);
|
---|
431 | void vga_draw_cursor_line_32(uint8_t *d1, const uint8_t *src1,
|
---|
432 | int poffset, int w,
|
---|
433 | unsigned int color0, unsigned int color1,
|
---|
434 | unsigned int color_xor);
|
---|
435 |
|
---|
436 | extern const uint8_t sr_mask[8];
|
---|
437 | extern const uint8_t gr_mask[16];
|
---|
438 | #endif /* !VBOX */
|
---|
439 |
|
---|