VirtualBox

source: vbox/trunk/include/VBox/Graphics/VBoxVideoVBEPrivate.h@ 69052

最後變更 在這個檔案從69052是 69052,由 vboxsync 提交於 7 年 前

DevVGA+VGABIOS: Eliminate the redundant header file parts, using one file for DevVGA and the VGA BIOS. The new central header contains more than just private defines right now, but since no one else but the device and firmware wants to use this, there's no point in splitting this up further.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 10.0 KB
 
1/** @file
2 * VirtualBox graphics card definitions, private interface for firmware
3 */
4
5/*
6 * Copyright (C) 2006-2017 Oracle Corporation
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
22 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 * OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27#ifndef ___VBox_Graphics_VBoxVideoVBEPrivate_h
28#define ___VBox_Graphics_VBoxVideoVBEPrivate_h
29
30/* VBE Mode Numbers */
31#define VBE_MODE_VESA_DEFINED 0x0100
32#define VBE_MODE_REFRESH_RATE_USE_CRTC 0x0800
33#define VBE_MODE_LINEAR_FRAME_BUFFER 0x4000
34#define VBE_MODE_PRESERVE_DISPLAY_MEMORY 0x8000
35
36/* VBE GFX Mode Number */
37#define VBE_VESA_MODE_640X400X8 0x100
38#define VBE_VESA_MODE_640X480X8 0x101
39#define VBE_VESA_MODE_800X600X4 0x102
40#define VBE_VESA_MODE_800X600X8 0x103
41#define VBE_VESA_MODE_1024X768X4 0x104
42#define VBE_VESA_MODE_1024X768X8 0x105
43#define VBE_VESA_MODE_1280X1024X4 0x106
44#define VBE_VESA_MODE_1280X1024X8 0x107
45#define VBE_VESA_MODE_320X200X1555 0x10D
46#define VBE_VESA_MODE_320X200X565 0x10E
47#define VBE_VESA_MODE_320X200X888 0x10F
48#define VBE_VESA_MODE_640X480X1555 0x110
49#define VBE_VESA_MODE_640X480X565 0x111
50#define VBE_VESA_MODE_640X480X888 0x112
51#define VBE_VESA_MODE_800X600X1555 0x113
52#define VBE_VESA_MODE_800X600X565 0x114
53#define VBE_VESA_MODE_800X600X888 0x115
54#define VBE_VESA_MODE_1024X768X1555 0x116
55#define VBE_VESA_MODE_1024X768X565 0x117
56#define VBE_VESA_MODE_1024X768X888 0x118
57#define VBE_VESA_MODE_1280X1024X1555 0x119
58#define VBE_VESA_MODE_1280X1024X565 0x11A
59#define VBE_VESA_MODE_1280X1024X888 0x11B
60#define VBE_VESA_MODE_1600X1200X8 0x11C
61#define VBE_VESA_MODE_1600X1200X1555 0x11D
62#define VBE_VESA_MODE_1600X1200X565 0x11E
63#define VBE_VESA_MODE_1600X1200X888 0x11F
64
65/* BOCHS/PLEX86 'own' mode numbers */
66#define VBE_OWN_MODE_320X200X8888 0x140
67#define VBE_OWN_MODE_640X400X8888 0x141
68#define VBE_OWN_MODE_640X480X8888 0x142
69#define VBE_OWN_MODE_800X600X8888 0x143
70#define VBE_OWN_MODE_1024X768X8888 0x144
71#define VBE_OWN_MODE_1280X1024X8888 0x145
72#define VBE_OWN_MODE_320X200X8 0x146
73#define VBE_OWN_MODE_1600X1200X8888 0x147
74#define VBE_OWN_MODE_1152X864X8 0x148
75#define VBE_OWN_MODE_1152X864X1555 0x149
76#define VBE_OWN_MODE_1152X864X565 0x14a
77#define VBE_OWN_MODE_1152X864X888 0x14b
78#define VBE_OWN_MODE_1152X864X8888 0x14c
79
80/* VirtualBox 'own' mode numbers */
81#define VBE_VBOX_MODE_CUSTOM1 0x160
82#define VBE_VBOX_MODE_CUSTOM2 0x161
83#define VBE_VBOX_MODE_CUSTOM3 0x162
84#define VBE_VBOX_MODE_CUSTOM4 0x163
85#define VBE_VBOX_MODE_CUSTOM5 0x164
86#define VBE_VBOX_MODE_CUSTOM6 0x165
87#define VBE_VBOX_MODE_CUSTOM7 0x166
88#define VBE_VBOX_MODE_CUSTOM8 0x167
89#define VBE_VBOX_MODE_CUSTOM9 0x168
90#define VBE_VBOX_MODE_CUSTOM10 0x169
91#define VBE_VBOX_MODE_CUSTOM11 0x16a
92#define VBE_VBOX_MODE_CUSTOM12 0x16b
93#define VBE_VBOX_MODE_CUSTOM13 0x16c
94#define VBE_VBOX_MODE_CUSTOM14 0x16d
95#define VBE_VBOX_MODE_CUSTOM15 0x16e
96#define VBE_VBOX_MODE_CUSTOM16 0x16f
97
98#define VBE_VESA_MODE_END_OF_LIST 0xFFFF
99
100/* Capabilities */
101#define VBE_CAPABILITY_8BIT_DAC 0x0001
102#define VBE_CAPABILITY_NOT_VGA_COMPATIBLE 0x0002
103#define VBE_CAPABILITY_RAMDAC_USE_BLANK_BIT 0x0004
104#define VBE_CAPABILITY_STEREOSCOPIC_SUPPORT 0x0008
105#define VBE_CAPABILITY_STEREO_VIA_VESA_EVC 0x0010
106
107/* Mode Attributes */
108#define VBE_MODE_ATTRIBUTE_SUPPORTED 0x0001
109#define VBE_MODE_ATTRIBUTE_EXTENDED_INFORMATION_AVAILABLE 0x0002
110#define VBE_MODE_ATTRIBUTE_TTY_BIOS_SUPPORT 0x0004
111#define VBE_MODE_ATTRIBUTE_COLOR_MODE 0x0008
112#define VBE_MODE_ATTRIBUTE_GRAPHICS_MODE 0x0010
113#define VBE_MODE_ATTRIBUTE_NOT_VGA_COMPATIBLE 0x0020
114#define VBE_MODE_ATTRIBUTE_NO_VGA_COMPATIBLE_WINDOW 0x0040
115#define VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE 0x0080
116#define VBE_MODE_ATTRIBUTE_DOUBLE_SCAN_MODE 0x0100
117#define VBE_MODE_ATTRIBUTE_INTERLACE_MODE 0x0200
118#define VBE_MODE_ATTRIBUTE_HARDWARE_TRIPLE_BUFFER 0x0400
119#define VBE_MODE_ATTRIBUTE_HARDWARE_STEREOSCOPIC_DISPLAY 0x0800
120#define VBE_MODE_ATTRIBUTE_DUAL_DISPLAY_START_ADDRESS 0x1000
121
122#define VBE_MODE_ATTTRIBUTE_LFB_ONLY ( VBE_MODE_ATTRIBUTE_NO_VGA_COMPATIBLE_WINDOW | VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE )
123
124/* Window attributes */
125#define VBE_WINDOW_ATTRIBUTE_RELOCATABLE 0x01
126#define VBE_WINDOW_ATTRIBUTE_READABLE 0x02
127#define VBE_WINDOW_ATTRIBUTE_WRITEABLE 0x04
128
129/* Memory model */
130#define VBE_MEMORYMODEL_TEXT_MODE 0x00
131#define VBE_MEMORYMODEL_CGA_GRAPHICS 0x01
132#define VBE_MEMORYMODEL_HERCULES_GRAPHICS 0x02
133#define VBE_MEMORYMODEL_PLANAR 0x03
134#define VBE_MEMORYMODEL_PACKED_PIXEL 0x04
135#define VBE_MEMORYMODEL_NON_CHAIN_4_256 0x05
136#define VBE_MEMORYMODEL_DIRECT_COLOR 0x06
137#define VBE_MEMORYMODEL_YUV 0x07
138
139/* DirectColorModeInfo */
140#define VBE_DIRECTCOLOR_COLOR_RAMP_PROGRAMMABLE 0x01
141#define VBE_DIRECTCOLOR_RESERVED_BITS_AVAILABLE 0x02
142
143/* Video memory */
144#define VGAMEM_GRAPH 0xA000
145
146/**
147 * VBE Bios Extra Data structure.
148 */
149typedef struct VBEHeader
150{
151 /** Signature (VBEHEADER_MAGIC). */
152 uint16_t u16Signature;
153 /** Data size. */
154 uint16_t cbData;
155} VBEHeader;
156
157/** The value of the VBEHeader::u16Signature field. */
158#define VBEHEADER_MAGIC 0x77CC
159
160/** The extra port which is used to read the mode list. */
161#define VBE_EXTRA_PORT 0x3b6
162
163/** The extra port which is used for debug printf. */
164#define VBE_PRINTF_PORT 0x3b7
165
166/*
167 * This one is for compactly storing a list of mode info blocks
168 */
169#pragma pack(1) /* pack(1) is important! (you'll get a byte extra for each of the u8 fields elsewise...) */
170typedef struct ModeInfoBlockCompact
171{
172 /* Mandatory information for all VBE revisions */
173 uint16_t ModeAttributes;
174 uint8_t WinAAttributes;
175 uint8_t WinBAttributes;
176 uint16_t WinGranularity;
177 uint16_t WinSize;
178 uint16_t WinASegment;
179 uint16_t WinBSegment;
180 uint32_t WinFuncPtr;
181 uint16_t BytesPerScanLine;
182 /* Mandatory information for VBE 1.2 and above */
183 uint16_t XResolution;
184 uint16_t YResolution;
185 uint8_t XCharSize;
186 uint8_t YCharSize;
187 uint8_t NumberOfPlanes;
188 uint8_t BitsPerPixel;
189 uint8_t NumberOfBanks;
190 uint8_t MemoryModel;
191 uint8_t BankSize;
192 uint8_t NumberOfImagePages;
193 uint8_t Reserved_page;
194 /* Direct Color fields (required for direct/6 and YUV/7 memory models) */
195 uint8_t RedMaskSize;
196 uint8_t RedFieldPosition;
197 uint8_t GreenMaskSize;
198 uint8_t GreenFieldPosition;
199 uint8_t BlueMaskSize;
200 uint8_t BlueFieldPosition;
201 uint8_t RsvdMaskSize;
202 uint8_t RsvdFieldPosition;
203 uint8_t DirectColorModeInfo;
204 /* Mandatory information for VBE 2.0 and above */
205 uint32_t PhysBasePtr;
206 uint32_t OffScreenMemOffset;
207 uint16_t OffScreenMemSize;
208 /* Mandatory information for VBE 3.0 and above */
209 uint16_t LinBytesPerScanLine;
210 uint8_t BnkNumberOfPages;
211 uint8_t LinNumberOfPages;
212 uint8_t LinRedMaskSize;
213 uint8_t LinRedFieldPosition;
214 uint8_t LinGreenMaskSize;
215 uint8_t LinGreenFieldPosition;
216 uint8_t LinBlueMaskSize;
217 uint8_t LinBlueFieldPosition;
218 uint8_t LinRsvdMaskSize;
219 uint8_t LinRsvdFieldPosition;
220 uint32_t MaxPixelClock;
221} ModeInfoBlockCompact;
222#pragma pack()
223
224typedef struct ModeInfoListItem
225{
226 uint16_t mode;
227 ModeInfoBlockCompact info;
228} ModeInfoListItem;
229
230
231#endif /* !___VBox_Graphics_VBoxVideoVBEPrivate_h */
232
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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