2 // QEMU Cirrus CLGD 54xx VGABIOS Extension.
4 // Copyright (c) 2004 Makoto Suzuki (suzu)
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 //#define CIRRUS_VESA3_PMINFO
23 #undef CIRRUS_VESA3_PMINFO
26 #define PM_BIOSMEM_CURRENT_MODE 0x449
27 #define PM_BIOSMEM_CRTC_ADDRESS 0x463
28 #define PM_BIOSMEM_VBE_MODE 0x4BA
35 unsigned short height
;
38 unsigned short hidden_dac
; /* 0x3c6 */
39 unsigned short *seq
; /* 0x3c4 */
40 unsigned short *graph
; /* 0x3ce */
41 unsigned short *crtc
; /* 0x3d4 */
43 unsigned char bitsperpixel
;
44 unsigned char vesacolortype
;
45 unsigned char vesaredmask
;
46 unsigned char vesaredpos
;
47 unsigned char vesagreenmask
;
48 unsigned char vesagreenpos
;
49 unsigned char vesabluemask
;
50 unsigned char vesabluepos
;
52 unsigned char vesareservedmask
;
53 unsigned char vesareservedpos
;
55 #define CIRRUS_MODE_SIZE 26
58 /* For VESA BIOS 3.0 */
59 #define CIRRUS_PM16INFO_SIZE 20
62 unsigned short cseq_vga
[] = {0x0007,0xffff};
63 unsigned short cgraph_vga
[] = {0x0009,0x000a,0x200b,0xffff};
64 unsigned short ccrtc_vga
[] = {0x001a,0x001b,0x001d,0xffff};
67 unsigned short cgraph_svgacolor
[] = {
68 0x0000,0x0001,0x0002,0x0003,0x0004,0x4005,0x0506,0x0f07,0xff08,
73 unsigned short cseq_640x480x8
[] = {
74 0x0100,0x2101,0x0f02,0x0003,0x0e04,0x1107,
75 0x580b,0x580c,0x580d,0x580e,
77 0x331b,0x331c,0x331d,0x331e,
80 unsigned short ccrtc_640x480x8
[] = {
82 0x5f00,0x4f01,0x4f02,0x8003,0x5204,0x1e05,0x0b06,0x3e07,
84 0xea10,0xdf12,0x5013,0x4014,0xdf15,0x0b16,0xc317,0xff18,
89 unsigned short cseq_640x480x16
[] = {
90 0x0100,0x2101,0x0f02,0x0003,0x0e04,0x1707,
91 0x580b,0x580c,0x580d,0x580e,
93 0x331b,0x331c,0x331d,0x331e,
96 unsigned short ccrtc_640x480x16
[] = {
98 0x5f00,0x4f01,0x4f02,0x8003,0x5204,0x1e05,0x0b06,0x3e07,
100 0xea10,0xdf12,0xa013,0x4014,0xdf15,0x0b16,0xc317,0xff18,
101 0x001a,0x221b,0x001d,
105 unsigned short cseq_640x480x24
[] = {
106 0x0100,0x2101,0x0f02,0x0003,0x0e04,0x1507,
107 0x580b,0x580c,0x580d,0x580e,
108 0x0412,0x0013,0x2017,
109 0x331b,0x331c,0x331d,0x331e,
112 unsigned short ccrtc_640x480x24
[] = {
114 0x5f00,0x4f01,0x4f02,0x8003,0x5204,0x1e05,0x0b06,0x3e07,
115 0x4009,0x000c,0x000d,
116 0xea10,0xdf12,0x0013,0x4014,0xdf15,0x0b16,0xc317,0xff18,
117 0x001a,0x321b,0x001d,
121 unsigned short cseq_800x600x8
[] = {
122 0x0100,0x2101,0x0f02,0x0003,0x0e04,0x1107,
123 0x230b,0x230c,0x230d,0x230e,
124 0x0412,0x0013,0x2017,
125 0x141b,0x141c,0x141d,0x141e,
128 unsigned short ccrtc_800x600x8
[] = {
129 0x2311,0x7d00,0x6301,0x6302,0x8003,0x6b04,0x1a05,0x9806,0xf007,
130 0x6009,0x000c,0x000d,
131 0x7d10,0x5712,0x6413,0x4014,0x5715,0x9816,0xc317,0xff18,
132 0x001a,0x221b,0x001d,
136 unsigned short cseq_800x600x16
[] = {
137 0x0100,0x2101,0x0f02,0x0003,0x0e04,0x1707,
138 0x230b,0x230c,0x230d,0x230e,
139 0x0412,0x0013,0x2017,
140 0x141b,0x141c,0x141d,0x141e,
143 unsigned short ccrtc_800x600x16
[] = {
144 0x2311,0x7d00,0x6301,0x6302,0x8003,0x6b04,0x1a05,0x9806,0xf007,
145 0x6009,0x000c,0x000d,
146 0x7d10,0x5712,0xc813,0x4014,0x5715,0x9816,0xc317,0xff18,
147 0x001a,0x221b,0x001d,
151 unsigned short cseq_800x600x24
[] = {
152 0x0100,0x2101,0x0f02,0x0003,0x0e04,0x1507,
153 0x230b,0x230c,0x230d,0x230e,
154 0x0412,0x0013,0x2017,
155 0x141b,0x141c,0x141d,0x141e,
158 unsigned short ccrtc_800x600x24
[] = {
159 0x2311,0x7d00,0x6301,0x6302,0x8003,0x6b04,0x1a05,0x9806,0xf007,
160 0x6009,0x000c,0x000d,
161 0x7d10,0x5712,0x2c13,0x4014,0x5715,0x9816,0xc317,0xff18,
162 0x001a,0x321b,0x001d,
166 unsigned short cseq_1024x768x8
[] = {
167 0x0100,0x2101,0x0f02,0x0003,0x0e04,0x1107,
168 0x760b,0x760c,0x760d,0x760e,
169 0x0412,0x0013,0x2017,
170 0x341b,0x341c,0x341d,0x341e,
173 unsigned short ccrtc_1024x768x8
[] = {
174 0x2911,0xa300,0x7f01,0x7f02,0x8603,0x8304,0x9405,0x2406,0xf507,
175 0x6009,0x000c,0x000d,
176 0x0310,0xff12,0x8013,0x4014,0xff15,0x2416,0xc317,0xff18,
177 0x001a,0x221b,0x001d,
181 unsigned short cseq_1024x768x16
[] = {
182 0x0100,0x2101,0x0f02,0x0003,0x0e04,0x1707,
183 0x760b,0x760c,0x760d,0x760e,
184 0x0412,0x0013,0x2017,
185 0x341b,0x341c,0x341d,0x341e,
188 unsigned short ccrtc_1024x768x16
[] = {
189 0x2911,0xa300,0x7f01,0x7f02,0x8603,0x8304,0x9405,0x2406,0xf507,
190 0x6009,0x000c,0x000d,
191 0x0310,0xff12,0x0013,0x4014,0xff15,0x2416,0xc317,0xff18,
192 0x001a,0x321b,0x001d,
196 unsigned short cseq_1024x768x24
[] = {
197 0x0100,0x2101,0x0f02,0x0003,0x0e04,0x1507,
198 0x760b,0x760c,0x760d,0x760e,
199 0x0412,0x0013,0x2017,
200 0x341b,0x341c,0x341d,0x341e,
203 unsigned short ccrtc_1024x768x24
[] = {
204 0x2911,0xa300,0x7f01,0x7f02,0x8603,0x8304,0x9405,0x2406,0xf507,
205 0x6009,0x000c,0x000d,
206 0x0310,0xff12,0x8013,0x4014,0xff15,0x2416,0xc317,0xff18,
207 0x001a,0x321b,0x001d,
212 cirrus_mode_t cirrus_modes
[] =
214 {0x5f,640,480,8,0x00,
215 cseq_640x480x8
,cgraph_svgacolor
,ccrtc_640x480x8
,8,
217 {0x64,640,480,16,0xe1,
218 cseq_640x480x16
,cgraph_svgacolor
,ccrtc_640x480x16
,16,
220 {0x66,640,480,15,0xf0,
221 cseq_640x480x16
,cgraph_svgacolor
,ccrtc_640x480x16
,16,
222 6,5,10,5,5,5,0,1,15},
223 {0x71,640,480,24,0xe5,
224 cseq_640x480x24
,cgraph_svgacolor
,ccrtc_640x480x24
,24,
227 {0x5c,800,600,8,0x00,
228 cseq_800x600x8
,cgraph_svgacolor
,ccrtc_800x600x8
,8,
230 {0x65,800,600,16,0xe1,
231 cseq_800x600x16
,cgraph_svgacolor
,ccrtc_800x600x16
,16,
233 {0x67,800,600,15,0xf0,
234 cseq_800x600x16
,cgraph_svgacolor
,ccrtc_800x600x16
,16,
235 6,5,10,5,5,5,0,1,15},
237 {0x60,1024,768,8,0x00,
238 cseq_1024x768x8
,cgraph_svgacolor
,ccrtc_1024x768x8
,8,
240 {0x74,1024,768,16,0xe1,
241 cseq_1024x768x16
,cgraph_svgacolor
,ccrtc_1024x768x16
,16,
243 {0x68,1024,768,15,0xf0,
244 cseq_1024x768x16
,cgraph_svgacolor
,ccrtc_1024x768x16
,16,
245 6,5,10,5,5,5,0,1,15},
247 {0xe0,800,600,24,0xe5,
248 cseq_800x600x24
,cgraph_svgacolor
,ccrtc_800x600x24
,24,
250 {0xe1,1024,768,24,0xe5,
251 cseq_1024x768x24
,cgraph_svgacolor
,ccrtc_1024x768x24
,24,
254 {0xfe,0,0,0,0,cseq_vga
,cgraph_vga
,ccrtc_vga
,0,
255 0xff,0,0,0,0,0,0,0,0},
256 {0xff,0,0,0,0,0,0,0,0,
257 0xff,0,0,0,0,0,0,0,0},
260 unsigned char cirrus_id_table
[] = {
270 unsigned short cirrus_vesa_modelist
[] = {
303 .ascii
"cirrus-compatible VGA is detected"
307 cirrus_not_installed
:
308 .ascii
"cirrus-compatible VGA is not detected"
312 cirrus_vesa_vendorname
:
313 cirrus_vesa_productname
:
315 .ascii
"VGABIOS Cirrus extension"
317 cirrus_vesa_productrevision
:
324 SET_INT_VECTOR(0x10, #0xC000, #cirrus_int10_handler)
344 mov si
, #cirrus_not_installed
345 jnz cirrus_msgnotinstalled
346 mov si
, #cirrus_installed
348 cirrus_msgnotinstalled
:
368 cirrus_int10_handler
:
371 cmp ah
, #0x00 ;; set video mode
372 jz cirrus_set_video_mode
373 cmp ah
, #0x12 ;; cirrus extension
375 cmp ah
, #0x4F ;; VESA extension
381 jmp vgabios_int10_handler
385 call cirrus_debug_dump
391 cirrus_set_video_mode
:
393 call cirrus_debug_dump
399 #ifdef CIRRUS_VESA3_PMINFO
401 mov si
, [cirrus_vesa_sel0000_data
]
407 mov
[PM_BIOSMEM_VBE_MODE
], bx
410 call cirrus_get_modeentry
411 jnc cirrus_set_video_mode_extended
413 call cirrus_get_modeentry_nomask
414 call cirrus_switch_mode
421 call cirrus_debug_dump
431 mov bp
, cirrus_extbios_handlers
[bx
]
439 call cirrus_debug_dump
442 ja cirrus_vesa_not_handled
448 mov bp
, cirrus_vesa_handlers
[bx
]
454 cirrus_vesa_not_handled
:
455 mov ax
, #0x014F ;; not implemented
465 call _cirrus_debugmsg
472 cirrus_set_video_mode_extended
:
473 call cirrus_switch_mode
478 #ifdef CIRRUS_VESA3_PMINFO
480 mov si
, [cirrus_vesa_sel0000_data
]
485 mov
[PM_BIOSMEM_CURRENT_MODE
], al
493 cirrus_vesa_pmbios_init
:
495 cirrus_vesa_pmbios_entry
:
499 jnz cirrus_vesa_pmbios_unimplemented
501 ja cirrus_vesa_pmbios_unimplemented
507 mov bp
, cirrus_vesa_handlers
[bx
]
509 push
#cirrus_vesa_pmbios_return
512 cirrus_vesa_pmbios_unimplemented
:
514 cirrus_vesa_pmbios_return
:
527 mov bx
, [si
+10] ;; seq
530 out dx
, ax
;; Unlock cirrus special
531 call cirrus_switch_mode_setregs
533 mov bx
, [si
+12] ;; graph
535 call cirrus_switch_mode_setregs
537 mov bx
, [si
+14] ;; crtc
539 call cirrus_switch_mode_setregs
548 mov al
, [si
+8] ;; hidden dac
554 mov bl
, [si
+17] ;; memory model
563 call biosfn_get_single_palette_reg
566 call biosfn_set_single_palette_reg
573 cirrus_enable_dualbank
:
581 or al
, #0x21 ;; enable dual bank
587 cirrus_switch_mode_setregs
:
605 mov bx
, #_cirrus_id_table
625 mov ax
, #0x100 ;; XXX
644 mov al
, #0x0f ;; get DRAM band width
648 ;; al
= 4 << bandwidth
664 call cirrus_get_modeentry
667 mov bx
, cirrus_extbios_A0h_callback
674 cirrus_extbios_A0h_callback
:
675 ;; fatal
: not implemented yet
681 mov bx
, #0x0E00 ;; IBM 8512/8513, color
685 mov al
, #0x07 ;; HSync 31.5 - 64.0 kHz
689 mov al
, #0x01 ;; High Refresh 75Hz
692 cirrus_extbios_unimplemented
:
703 cmp ax
, #0x4256 ;; VB
706 cmp ax
, #0x3245 ;; E2
710 mov ax
, #0x0100 ;; soft ver.
712 mov ax
, # cirrus_vesa_vendorname
716 mov ax
, # cirrus_vesa_productname
720 mov ax
, # cirrus_vesa_productrevision
726 mov ax
, #0x4556 ;; VE
728 mov ax
, #0x4153 ;; SA
730 mov ax
, #0x0200 ;; v2.00
732 mov ax
, # cirrus_vesa_oemname
743 call cirrus_extbios_85h
;; vram in
64k
750 mov si
, #_cirrus_vesa_modelist
767 call cirrus_vesamode_to_mode
769 jnz cirrus_vesa_01h_1
770 jmp cirrus_vesa_unimplemented
781 call cirrus_get_modeentry_nomask
787 stosw
;; clear buffer
790 mov ax
, #0x003b ;; mode
792 mov ax
, #0x0707 ;; attr
794 mov ax
, #0x0010 ;; granularity =16K
796 mov ax
, #0x0020 ;; size =32K
798 mov ax
, #0xA000 ;; segment A
800 mov ax
, #0xA800 ;; segment B
802 mov ax
, #cirrus_vesa_05h_farentry
806 call cirrus_get_line_offset_entry
807 stosw
;; bytes per scan line
808 mov ax
, [si
+2] ;; width
810 mov ax
, [si
+4] ;; height
816 mov al
, #1 ;; count of planes
818 mov al
, [si
+6] ;; bpp
820 mov al
, #0x1 ;; XXX number of banks
823 stosb
;; memory model
824 mov al
, #0x0 ;; XXX size of bank in K
826 call cirrus_get_line_offset_entry
828 mul bx
;; dx
:ax
=vramdisp
833 call cirrus_extbios_85h
;; al
=vram in
64k
839 stosb
;; number of image pages
= vramtotal
/vramdisp
-1
855 rcl al
, #1 ; bit 0=palette flag
856 stosb
;; direct screen mode info
859 ;; 32-bit LFB address
862 call cirrus_get_lfb_addr
870 or ax
, #0x0080 ;; mode bit 7:LFB
888 test cx
, #0x4000 ;; LFB flag
893 cmp cx
, #0x0080 ;; is LFB supported?
894 jnz cirrus_vesa_01h_6
895 mov ax
, #0x014F ;; error - no LFB
902 ;; XXX support CRTC registers
904 jnz cirrus_vesa_02h_2
;; unknown flags
906 and ax
, #0x1ff ;; bit 8-0 mode
907 cmp ax
, #0x100 ;; legacy VGA mode
908 jb cirrus_vesa_02h_legacy
909 call cirrus_vesamode_to_mode
911 jnz cirrus_vesa_02h_1
913 jmp cirrus_vesa_unimplemented
914 cirrus_vesa_02h_legacy
:
915 #ifdef CIRRUS_VESA3_PMINFO
917 cmp byte ptr
[cirrus_vesa_is_protected_mode
], #0
918 jnz cirrus_vesa_02h_2
919 #endif // CIRRUS_VESA3_PMINFO
926 call cirrus_get_modeentry_nomask
927 call cirrus_switch_mode
928 test bx
, #0x4000 ;; LFB
930 call cirrus_enable_dualbank
934 #ifdef CIRRUS_VESA3_PMINFO
936 mov si
, [cirrus_vesa_sel0000_data
]
941 mov
[PM_BIOSMEM_CURRENT_MODE
], al
942 mov
[PM_BIOSMEM_VBE_MODE
], bx
950 #ifdef CIRRUS_VESA3_PMINFO
952 mov ax
, [cirrus_vesa_sel0000_data
]
957 mov bx
, # PM_BIOSMEM_VBE_MODE
961 jnz cirrus_vesa_03h_1
962 mov bx
, # PM_BIOSMEM_CURRENT_MODE
971 cirrus_vesa_05h_farentry
:
979 jz cirrus_vesa_05h_setmempage
981 jz cirrus_vesa_05h_getmempage
983 jmp cirrus_vesa_unimplemented
984 cirrus_vesa_05h_setmempage
:
985 or dh
, dh
; address must be
< 0x100
986 jnz cirrus_vesa_05h_1
988 mov al
, bl
;; bl
=bank number
990 mov ah
, dl
;; dx
=window address in granularity
996 cirrus_vesa_05h_getmempage
:
997 mov al
, bl
;; bl
=bank number
1004 mov dl
, al
;; dx
=window address in granularity
1011 je cirrus_vesa_06h_3
1013 je cirrus_vesa_06h_2
1014 jb cirrus_vesa_06h_1
1018 call cirrus_get_bpp_bytes
1024 call cirrus_set_line_offset
1026 call cirrus_get_bpp_bytes
1030 call cirrus_get_line_offset
1035 call cirrus_extbios_85h
;; al
=vram in
64k
1046 je cirrus_vesa_07h_1
1048 je cirrus_vesa_07h_2
1049 jb cirrus_vesa_07h_1
1054 call cirrus_get_bpp_bytes
1061 call cirrus_get_line_offset
1065 jnc cirrus_vesa_07h_3
1073 call cirrus_set_start_addr
1077 call cirrus_get_start_addr
1085 call cirrus_get_line_offset
1091 call cirrus_get_bpp_bytes
1102 cirrus_vesa_unimplemented
:
1103 mov ax
, #0x014F ;; not implemented
1107 ;; in ax
:vesamode
, out ax
:cirrusmode
1108 cirrus_vesamode_to_mode
:
1115 mov si
, #_cirrus_vesa_modelist
1131 ;; NOTE
- may be called in
protected mode
1145 ;; in
- al
:mode
, out
- cflag
:result
, si
:table
, ax
:destroyed
1146 cirrus_get_modeentry
:
1148 cirrus_get_modeentry_nomask
:
1149 mov si
, #_cirrus_modes
1157 add si
, # CIRRUS_MODE_SIZE
1161 stc
;; video mode is
not supported
1164 clc
;; video mode is supported
1169 ; out
- ax
:LFB
address (high
16 bit
)
1170 ;; NOTE
- may be called in
protected mode
1171 cirrus_get_lfb_addr
:
1177 call cirrus_pci_read
1179 jz cirrus_get_lfb_addr_5
1180 cirrus_get_lfb_addr_3
:
1182 call cirrus_pci_read
1183 cmp ax
, #0x1013 ;; cirrus
1184 jz cirrus_get_lfb_addr_4
1186 cmp cx
, #0x200 ;; search bus #0 and #1
1187 jb cirrus_get_lfb_addr_3
1188 cirrus_get_lfb_addr_5
:
1189 xor dx
, dx
;; no LFB
1190 jmp cirrus_get_lfb_addr_6
1191 cirrus_get_lfb_addr_4
:
1192 mov dl
, #0x10 ;; I/O space #0
1193 call cirrus_pci_read
1195 jnz cirrus_get_lfb_addr_5
1197 mov dx
, ax
;; LFB address
1198 cirrus_get_lfb_addr_6
:
1206 mov eax
, #0x00800000
1216 ;; out
- al
:bytes per pixel
1217 cirrus_get_bpp_bytes
:
1226 jne cirrus_get_bpp_bytes_1
1228 cirrus_get_bpp_bytes_1
:
1231 je cirrus_get_bpp_bytes_2
1233 cirrus_get_bpp_bytes_2
:
1237 ;; in
- ax
: new line offset
1238 cirrus_set_line_offset
:
1241 call cirrus_get_crtc
1258 ;; out
- ax
: active line offset
1259 cirrus_get_line_offset
:
1262 call cirrus_get_crtc
1283 ;; out
- ax
: line offset
for mode
1284 cirrus_get_line_offset_entry
:
1286 mov bx
, [si
+14] ;; crtc table
1315 ;; in
- new address in DX
:AX
1316 cirrus_set_start_addr
:
1320 call cirrus_get_crtc
1360 ;; out
- current address in DX
:AX
1361 cirrus_get_start_addr
:
1363 call cirrus_get_crtc
1399 cirrus_extbios_handlers
:
1401 dw cirrus_extbios_80h
1402 dw cirrus_extbios_81h
1403 dw cirrus_extbios_82h
1404 dw cirrus_extbios_unimplemented
1406 dw cirrus_extbios_unimplemented
1407 dw cirrus_extbios_85h
1408 dw cirrus_extbios_unimplemented
1409 dw cirrus_extbios_unimplemented
1411 dw cirrus_extbios_unimplemented
1412 dw cirrus_extbios_unimplemented
1413 dw cirrus_extbios_unimplemented
1414 dw cirrus_extbios_unimplemented
1416 dw cirrus_extbios_unimplemented
1417 dw cirrus_extbios_unimplemented
1418 dw cirrus_extbios_unimplemented
1419 dw cirrus_extbios_unimplemented
1421 dw cirrus_extbios_unimplemented
1422 dw cirrus_extbios_unimplemented
1423 dw cirrus_extbios_unimplemented
1424 dw cirrus_extbios_unimplemented
1426 dw cirrus_extbios_unimplemented
1427 dw cirrus_extbios_unimplemented
1428 dw cirrus_extbios_unimplemented
1429 dw cirrus_extbios_unimplemented
1431 dw cirrus_extbios_unimplemented
1432 dw cirrus_extbios_unimplemented
1433 dw cirrus_extbios_9Ah
1434 dw cirrus_extbios_unimplemented
1436 dw cirrus_extbios_unimplemented
1437 dw cirrus_extbios_unimplemented
1438 dw cirrus_extbios_unimplemented
1439 dw cirrus_extbios_unimplemented
1441 dw cirrus_extbios_A0h
1442 dw cirrus_extbios_A1h
1443 dw cirrus_extbios_A2h
1444 dw cirrus_extbios_unimplemented
1446 dw cirrus_extbios_unimplemented
1447 dw cirrus_extbios_unimplemented
1448 dw cirrus_extbios_unimplemented
1449 dw cirrus_extbios_unimplemented
1451 dw cirrus_extbios_unimplemented
1452 dw cirrus_extbios_unimplemented
1453 dw cirrus_extbios_unimplemented
1454 dw cirrus_extbios_unimplemented
1456 dw cirrus_extbios_unimplemented
1457 dw cirrus_extbios_unimplemented
1458 dw cirrus_extbios_AEh
1459 dw cirrus_extbios_unimplemented
1461 cirrus_vesa_handlers
:
1468 dw cirrus_vesa_unimplemented
1473 dw cirrus_vesa_unimplemented
1474 dw cirrus_vesa_unimplemented
1475 dw cirrus_vesa_unimplemented
1476 dw cirrus_vesa_unimplemented
1478 dw cirrus_vesa_unimplemented
1479 dw cirrus_vesa_unimplemented
1480 dw cirrus_vesa_unimplemented
1481 dw cirrus_vesa_unimplemented
1487 #ifdef CIRRUS_VESA3_PMINFO
1491 .byte
0x50,0x4d,0x49,0x44 ;; signature
[4]
1493 dw cirrus_vesa_pmbios_entry
;; entry_bios
1494 dw cirrus_vesa_pmbios_init
;; entry_init
1496 cirrus_vesa_sel0000_data
:
1497 dw
0x0000 ;; sel_00000
1498 cirrus_vesa_selA000_data
:
1499 dw
0xA000 ;; sel_A0000
1501 cirrus_vesa_selB000_data
:
1502 dw
0xB000 ;; sel_B0000
1503 cirrus_vesa_selB800_data
:
1504 dw
0xB800 ;; sel_B8000
1506 cirrus_vesa_selC000_data
:
1507 dw
0xC000 ;; sel_C0000
1508 cirrus_vesa_is_protected_mode
:
1509 db
0x00 ;; is_protected_mode
1510 db
0x00 ;; check_sum
1512 #endif // CIRRUS_VESA3_PMINFO
1516 static void cirrus_debugmsg(DI
, SI
, BP
, SP
, BX
, DX
, CX
, AX
, DS
, ES
, FLAGS
)
1517 Bit16u DI
, SI
, BP
, SP
, BX
, DX
, CX
, AX
, ES
, DS
, FLAGS
;
1519 if((GET_AH()!=0x0E)&&(GET_AH()!=0x02)&&(GET_AH()!=0x09)&&(AX
!=0x4F05))
1520 printf("vgabios call ah%02x al%02x bx%04x cx%04x dx%04x\n",GET_AH(),GET_AL(),BX
,CX
,DX
);