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,0x000b,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 0x0300,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 0x0300,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 0x0300,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 0x0300,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 0x0300,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 0x0300,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 0x0300,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 0x0300,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 0x0300,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,
211 unsigned short cseq_1280x1024x8
[] = {
212 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1107,
213 0x760b,0x760c,0x760d,0x760e,
214 0x0412,0x0013,0x2017,
215 0x341b,0x341c,0x341d,0x341e,
218 unsigned short ccrtc_1280x1024x8
[] = {
219 0x2911,0xc300,0x9f01,0x9f02,0x8603,0x8304,0x9405,0x2406,0xf707,
220 0x6009,0x000c,0x000d,
221 0x0310,0xff12,0xa013,0x4014,0xff15,0x2416,0xc317,0xff18,
222 0x001a,0x221b,0x001d,
226 unsigned short cseq_1280x1024x16
[] = {
227 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1707,
228 0x760b,0x760c,0x760d,0x760e,
229 0x0412,0x0013,0x2017,
230 0x341b,0x341c,0x341d,0x341e,
233 unsigned short ccrtc_1280x1024x16
[] = {
234 0x2911,0xc300,0x9f01,0x9f02,0x8603,0x8304,0x9405,0x2406,0xf707,
235 0x6009,0x000c,0x000d,
236 0x0310,0xff12,0x4013,0x4014,0xff15,0x2416,0xc317,0xff18,
237 0x001a,0x321b,0x001d,
242 cirrus_mode_t cirrus_modes
[] =
244 {0x5f,640,480,8,0x00,
245 cseq_640x480x8
,cgraph_svgacolor
,ccrtc_640x480x8
,8,
247 {0x64,640,480,16,0xe1,
248 cseq_640x480x16
,cgraph_svgacolor
,ccrtc_640x480x16
,16,
250 {0x66,640,480,15,0xf0,
251 cseq_640x480x16
,cgraph_svgacolor
,ccrtc_640x480x16
,16,
252 6,5,10,5,5,5,0,1,15},
253 {0x71,640,480,24,0xe5,
254 cseq_640x480x24
,cgraph_svgacolor
,ccrtc_640x480x24
,24,
257 {0x5c,800,600,8,0x00,
258 cseq_800x600x8
,cgraph_svgacolor
,ccrtc_800x600x8
,8,
260 {0x65,800,600,16,0xe1,
261 cseq_800x600x16
,cgraph_svgacolor
,ccrtc_800x600x16
,16,
263 {0x67,800,600,15,0xf0,
264 cseq_800x600x16
,cgraph_svgacolor
,ccrtc_800x600x16
,16,
265 6,5,10,5,5,5,0,1,15},
267 {0x60,1024,768,8,0x00,
268 cseq_1024x768x8
,cgraph_svgacolor
,ccrtc_1024x768x8
,8,
270 {0x74,1024,768,16,0xe1,
271 cseq_1024x768x16
,cgraph_svgacolor
,ccrtc_1024x768x16
,16,
273 {0x68,1024,768,15,0xf0,
274 cseq_1024x768x16
,cgraph_svgacolor
,ccrtc_1024x768x16
,16,
275 6,5,10,5,5,5,0,1,15},
277 {0x78,800,600,24,0xe5,
278 cseq_800x600x24
,cgraph_svgacolor
,ccrtc_800x600x24
,24,
280 {0x79,1024,768,24,0xe5,
281 cseq_1024x768x24
,cgraph_svgacolor
,ccrtc_1024x768x24
,24,
284 {0x6d,1280,1024,8,0x00,
285 cseq_1280x1024x8
,cgraph_svgacolor
,ccrtc_1280x1024x8
,8,
287 {0x69,1280,1024,15,0xf0,
288 cseq_1280x1024x16
,cgraph_svgacolor
,ccrtc_1280x1024x16
,16,
289 6,5,10,5,5,5,0,1,15},
290 {0x75,1280,1024,16,0xe1,
291 cseq_1280x1024x16
,cgraph_svgacolor
,ccrtc_1280x1024x16
,16,
294 {0xfe,0,0,0,0,cseq_vga
,cgraph_vga
,ccrtc_vga
,0,
295 0xff,0,0,0,0,0,0,0,0},
296 {0xff,0,0,0,0,0,0,0,0,
297 0xff,0,0,0,0,0,0,0,0},
300 unsigned char cirrus_id_table
[] = {
310 unsigned short cirrus_vesa_modelist
[] = {
349 .ascii
"cirrus-compatible VGA is detected"
353 cirrus_not_installed
:
354 .ascii
"cirrus-compatible VGA is not detected"
358 cirrus_vesa_vendorname
:
359 cirrus_vesa_productname
:
361 .ascii
"VGABIOS Cirrus extension"
363 cirrus_vesa_productrevision
:
370 SET_INT_VECTOR(0x10, #0xC000, #cirrus_int10_handler)
371 mov al
, #0x0f ; memory setup
381 mov ax
, #0x0007 ; set vga mode
383 mov ax
, #0x0431 ; reset bitblt
397 mov si
, #cirrus_not_installed
398 jnz cirrus_msgnotinstalled
399 mov si
, #cirrus_installed
401 cirrus_msgnotinstalled
:
421 cirrus_int10_handler
:
424 cmp ah
, #0x00 ;; set video mode
425 jz cirrus_set_video_mode
426 cmp ah
, #0x12 ;; cirrus extension
428 cmp ah
, #0x4F ;; VESA extension
434 jmp vgabios_int10_handler
438 call cirrus_debug_dump
444 cirrus_set_video_mode
:
446 call cirrus_debug_dump
452 #ifdef CIRRUS_VESA3_PMINFO
454 mov si
, [cirrus_vesa_sel0000_data
]
460 mov
[PM_BIOSMEM_VBE_MODE
], bx
463 call cirrus_get_modeentry
464 jnc cirrus_set_video_mode_extended
466 call cirrus_get_modeentry_nomask
467 call cirrus_switch_mode
474 call cirrus_debug_dump
484 mov bp
, cirrus_extbios_handlers
[bx
]
492 call cirrus_debug_dump
495 ja cirrus_vesa_not_handled
501 mov bp
, cirrus_vesa_handlers
[bx
]
507 cirrus_vesa_not_handled
:
508 mov ax
, #0x014F ;; not implemented
518 call _cirrus_debugmsg
525 cirrus_set_video_mode_extended
:
526 call cirrus_switch_mode
531 #ifdef CIRRUS_VESA3_PMINFO
533 mov si
, [cirrus_vesa_sel0000_data
]
538 mov
[PM_BIOSMEM_CURRENT_MODE
], al
546 cirrus_vesa_pmbios_init
:
548 cirrus_vesa_pmbios_entry
:
552 jnz cirrus_vesa_pmbios_unimplemented
554 ja cirrus_vesa_pmbios_unimplemented
560 mov bp
, cirrus_vesa_handlers
[bx
]
562 push
#cirrus_vesa_pmbios_return
565 cirrus_vesa_pmbios_unimplemented
:
567 cirrus_vesa_pmbios_return
:
580 mov bx
, [si
+10] ;; seq
583 out dx
, ax
;; Unlock cirrus special
584 call cirrus_switch_mode_setregs
586 mov bx
, [si
+12] ;; graph
588 call cirrus_switch_mode_setregs
590 mov bx
, [si
+14] ;; crtc
592 call cirrus_switch_mode_setregs
601 mov al
, [si
+8] ;; hidden dac
607 mov bl
, [si
+17] ;; memory model
616 call biosfn_get_single_palette_reg
619 call biosfn_set_single_palette_reg
626 cirrus_enable_16k_granularity
:
634 or al
, #0x20 ;; enable 16k
640 cirrus_switch_mode_setregs
:
658 mov bx
, #_cirrus_id_table
678 mov ax
, #0x100 ;; XXX
697 mov al
, #0x0f ;; get DRAM band width
701 ;; al
= 4 << bandwidth
713 mov al
, #0x20 ;; 2 MB
715 mov al
, #0x40 ;; 4 MB
727 call cirrus_get_modeentry
730 mov bx
, cirrus_extbios_A0h_callback
737 cirrus_extbios_A0h_callback
:
738 ;; fatal
: not implemented yet
744 mov bx
, #0x0E00 ;; IBM 8512/8513, color
748 mov al
, #0x07 ;; HSync 31.5 - 64.0 kHz
752 mov al
, #0x01 ;; High Refresh 75Hz
755 cirrus_extbios_unimplemented
:
766 cmp ax
, #0x4256 ;; VB
769 cmp ax
, #0x3245 ;; E2
773 mov ax
, #0x0100 ;; soft ver.
775 mov ax
, # cirrus_vesa_vendorname
779 mov ax
, # cirrus_vesa_productname
783 mov ax
, # cirrus_vesa_productrevision
789 mov ax
, #0x4556 ;; VE
791 mov ax
, #0x4153 ;; SA
793 mov ax
, #0x0200 ;; v2.00
795 mov ax
, # cirrus_vesa_oemname
806 call cirrus_extbios_85h
;; vram in
64k
813 mov si
, #_cirrus_vesa_modelist
830 call cirrus_vesamode_to_mode
832 jnz cirrus_vesa_01h_1
833 jmp cirrus_vesa_unimplemented
844 call cirrus_get_modeentry_nomask
850 stosw
;; clear buffer
853 mov ax
, #0x003b ;; mode
855 mov ax
, #0x0007 ;; attr
857 mov ax
, #0x0010 ;; granularity =16K
859 mov ax
, #0x0040 ;; size =64K
861 mov ax
, #0xA000 ;; segment A
863 xor ax
, ax
;; no segment B
865 mov ax
, #cirrus_vesa_05h_farentry
869 call cirrus_get_line_offset_entry
870 stosw
;; bytes per scan line
871 mov ax
, [si
+2] ;; width
873 mov ax
, [si
+4] ;; height
879 mov al
, #1 ;; count of planes
881 mov al
, [si
+6] ;; bpp
883 mov al
, #0x1 ;; XXX number of banks
886 stosb
;; memory model
887 mov al
, #0x0 ;; XXX size of bank in K
889 call cirrus_get_line_offset_entry
891 mul bx
;; dx
:ax
=vramdisp
896 call cirrus_extbios_85h
;; al
=vram in
64k
902 stosb
;; number of image pages
= vramtotal
/vramdisp
-1
918 rcl al
, #1 ; bit 0=palette flag
919 stosb
;; direct screen mode info
922 ;; 32-bit LFB address
925 call cirrus_get_lfb_addr
933 or ax
, #0x0080 ;; mode bit 7:LFB
951 test cx
, #0x4000 ;; LFB flag
956 cmp cx
, #0x0080 ;; is LFB supported?
957 jnz cirrus_vesa_01h_6
958 mov ax
, #0x014F ;; error - no LFB
965 ;; XXX support CRTC registers
967 jnz cirrus_vesa_02h_2
;; unknown flags
969 and ax
, #0x1ff ;; bit 8-0 mode
970 cmp ax
, #0x100 ;; legacy VGA mode
971 jb cirrus_vesa_02h_legacy
972 call cirrus_vesamode_to_mode
974 jnz cirrus_vesa_02h_1
976 jmp cirrus_vesa_unimplemented
977 cirrus_vesa_02h_legacy
:
978 #ifdef CIRRUS_VESA3_PMINFO
980 cmp byte ptr
[cirrus_vesa_is_protected_mode
], #0
981 jnz cirrus_vesa_02h_2
982 #endif // CIRRUS_VESA3_PMINFO
989 call cirrus_get_modeentry_nomask
990 call cirrus_switch_mode
991 test bx
, #0x4000 ;; LFB
992 jnz cirrus_vesa_02h_3
993 call cirrus_enable_16k_granularity
997 #ifdef CIRRUS_VESA3_PMINFO
999 mov si
, [cirrus_vesa_sel0000_data
]
1004 mov
[PM_BIOSMEM_CURRENT_MODE
], al
1005 mov
[PM_BIOSMEM_VBE_MODE
], bx
1013 #ifdef CIRRUS_VESA3_PMINFO
1015 mov ax
, [cirrus_vesa_sel0000_data
]
1020 mov bx
, # PM_BIOSMEM_VBE_MODE
1024 jnz cirrus_vesa_03h_1
1025 mov bx
, # PM_BIOSMEM_CURRENT_MODE
1034 cirrus_vesa_05h_farentry
:
1035 call cirrus_vesa_05h
1040 ja cirrus_vesa_05h_1
1042 jz cirrus_vesa_05h_setmempage
1044 jz cirrus_vesa_05h_getmempage
1046 jmp cirrus_vesa_unimplemented
1047 cirrus_vesa_05h_setmempage
:
1048 or dh
, dh
; address must be
< 0x100
1049 jnz cirrus_vesa_05h_1
1051 mov al
, bl
;; bl
=bank number
1053 mov ah
, dl
;; dx
=window address in granularity
1059 cirrus_vesa_05h_getmempage
:
1060 mov al
, bl
;; bl
=bank number
1067 mov dl
, al
;; dx
=window address in granularity
1074 je cirrus_vesa_06h_3
1076 je cirrus_vesa_06h_2
1077 jb cirrus_vesa_06h_1
1081 call cirrus_get_bpp_bytes
1087 call cirrus_set_line_offset
1089 call cirrus_get_bpp_bytes
1093 call cirrus_get_line_offset
1098 call cirrus_extbios_85h
;; al
=vram in
64k
1109 je cirrus_vesa_07h_1
1111 je cirrus_vesa_07h_2
1112 jb cirrus_vesa_07h_1
1117 call cirrus_get_bpp_bytes
1124 call cirrus_get_line_offset
1128 jnc cirrus_vesa_07h_3
1137 call cirrus_set_start_addr
1141 call cirrus_get_start_addr
1149 call cirrus_get_line_offset
1155 call cirrus_get_bpp_bytes
1166 cirrus_vesa_unimplemented
:
1167 mov ax
, #0x014F ;; not implemented
1171 ;; in ax
:vesamode
, out ax
:cirrusmode
1172 cirrus_vesamode_to_mode
:
1179 mov si
, #_cirrus_vesa_modelist
1195 ;; NOTE
- may be called in
protected mode
1209 ;; in
- al
:mode
, out
- cflag
:result
, si
:table
, ax
:destroyed
1210 cirrus_get_modeentry
:
1212 cirrus_get_modeentry_nomask
:
1213 mov si
, #_cirrus_modes
1221 add si
, # CIRRUS_MODE_SIZE
1225 stc
;; video mode is
not supported
1228 clc
;; video mode is supported
1233 ; out
- ax
:LFB
address (high
16 bit
)
1234 ;; NOTE
- may be called in
protected mode
1235 cirrus_get_lfb_addr
:
1241 call cirrus_pci_read
1243 jz cirrus_get_lfb_addr_5
1244 cirrus_get_lfb_addr_3
:
1246 call cirrus_pci_read
1247 cmp ax
, #0x1013 ;; cirrus
1248 jz cirrus_get_lfb_addr_4
1250 cmp cx
, #0x200 ;; search bus #0 and #1
1251 jb cirrus_get_lfb_addr_3
1252 cirrus_get_lfb_addr_5
:
1253 xor dx
, dx
;; no LFB
1254 jmp cirrus_get_lfb_addr_6
1255 cirrus_get_lfb_addr_4
:
1256 mov dl
, #0x10 ;; I/O space #0
1257 call cirrus_pci_read
1259 jnz cirrus_get_lfb_addr_5
1261 mov dx
, ax
;; LFB address
1262 cirrus_get_lfb_addr_6
:
1270 mov eax
, #0x00800000
1280 ;; out
- al
:bytes per pixel
1281 cirrus_get_bpp_bytes
:
1290 jne cirrus_get_bpp_bytes_1
1292 cirrus_get_bpp_bytes_1
:
1295 je cirrus_get_bpp_bytes_2
1297 cirrus_get_bpp_bytes_2
:
1301 ;; in
- ax
: new line offset
1302 cirrus_set_line_offset
:
1305 call cirrus_get_crtc
1322 ;; out
- ax
: active line offset
1323 cirrus_get_line_offset
:
1326 call cirrus_get_crtc
1347 ;; out
- ax
: line offset
for mode
1348 cirrus_get_line_offset_entry
:
1350 mov bx
, [si
+14] ;; crtc table
1379 ;; in
- new address in DX
:AX
1380 cirrus_set_start_addr
:
1384 call cirrus_get_crtc
1424 ;; out
- current address in DX
:AX
1425 cirrus_get_start_addr
:
1427 call cirrus_get_crtc
1463 cirrus_extbios_handlers
:
1465 dw cirrus_extbios_80h
1466 dw cirrus_extbios_81h
1467 dw cirrus_extbios_82h
1468 dw cirrus_extbios_unimplemented
1470 dw cirrus_extbios_unimplemented
1471 dw cirrus_extbios_85h
1472 dw cirrus_extbios_unimplemented
1473 dw cirrus_extbios_unimplemented
1475 dw cirrus_extbios_unimplemented
1476 dw cirrus_extbios_unimplemented
1477 dw cirrus_extbios_unimplemented
1478 dw cirrus_extbios_unimplemented
1480 dw cirrus_extbios_unimplemented
1481 dw cirrus_extbios_unimplemented
1482 dw cirrus_extbios_unimplemented
1483 dw cirrus_extbios_unimplemented
1485 dw cirrus_extbios_unimplemented
1486 dw cirrus_extbios_unimplemented
1487 dw cirrus_extbios_unimplemented
1488 dw cirrus_extbios_unimplemented
1490 dw cirrus_extbios_unimplemented
1491 dw cirrus_extbios_unimplemented
1492 dw cirrus_extbios_unimplemented
1493 dw cirrus_extbios_unimplemented
1495 dw cirrus_extbios_unimplemented
1496 dw cirrus_extbios_unimplemented
1497 dw cirrus_extbios_9Ah
1498 dw cirrus_extbios_unimplemented
1500 dw cirrus_extbios_unimplemented
1501 dw cirrus_extbios_unimplemented
1502 dw cirrus_extbios_unimplemented
1503 dw cirrus_extbios_unimplemented
1505 dw cirrus_extbios_A0h
1506 dw cirrus_extbios_A1h
1507 dw cirrus_extbios_A2h
1508 dw cirrus_extbios_unimplemented
1510 dw cirrus_extbios_unimplemented
1511 dw cirrus_extbios_unimplemented
1512 dw cirrus_extbios_unimplemented
1513 dw cirrus_extbios_unimplemented
1515 dw cirrus_extbios_unimplemented
1516 dw cirrus_extbios_unimplemented
1517 dw cirrus_extbios_unimplemented
1518 dw cirrus_extbios_unimplemented
1520 dw cirrus_extbios_unimplemented
1521 dw cirrus_extbios_unimplemented
1522 dw cirrus_extbios_AEh
1523 dw cirrus_extbios_unimplemented
1525 cirrus_vesa_handlers
:
1532 dw cirrus_vesa_unimplemented
1537 dw cirrus_vesa_unimplemented
1538 dw cirrus_vesa_unimplemented
1539 dw cirrus_vesa_unimplemented
1540 dw cirrus_vesa_unimplemented
1542 dw cirrus_vesa_unimplemented
1543 dw cirrus_vesa_unimplemented
1544 dw cirrus_vesa_unimplemented
1545 dw cirrus_vesa_unimplemented
1551 #ifdef CIRRUS_VESA3_PMINFO
1555 .byte
0x50,0x4d,0x49,0x44 ;; signature
[4]
1557 dw cirrus_vesa_pmbios_entry
;; entry_bios
1558 dw cirrus_vesa_pmbios_init
;; entry_init
1560 cirrus_vesa_sel0000_data
:
1561 dw
0x0000 ;; sel_00000
1562 cirrus_vesa_selA000_data
:
1563 dw
0xA000 ;; sel_A0000
1565 cirrus_vesa_selB000_data
:
1566 dw
0xB000 ;; sel_B0000
1567 cirrus_vesa_selB800_data
:
1568 dw
0xB800 ;; sel_B8000
1570 cirrus_vesa_selC000_data
:
1571 dw
0xC000 ;; sel_C0000
1572 cirrus_vesa_is_protected_mode
:
1573 ;; protected mode flag
and checksum
1574 dw (~((0xf2 + (cirrus_vesa_pmbios_entry
>> 8) + (cirrus_vesa_pmbios_entry
) \
1575 + (cirrus_vesa_pmbios_init
>> 8) + (cirrus_vesa_pmbios_init
)) & 0xff) << 8) + 0x01
1577 #endif // CIRRUS_VESA3_PMINFO
1581 static void cirrus_debugmsg(DI
, SI
, BP
, SP
, BX
, DX
, CX
, AX
, DS
, ES
, FLAGS
)
1582 Bit16u DI
, SI
, BP
, SP
, BX
, DX
, CX
, AX
, ES
, DS
, FLAGS
;
1584 if((GET_AH()!=0x0E)&&(GET_AH()!=0x02)&&(GET_AH()!=0x09)&&(AX
!=0x4F05))
1585 printf("vgabios call ah%02x al%02x bx%04x cx%04x dx%04x\n",GET_AH(),GET_AL(),BX
,CX
,DX
);