config VGA_STANDARD_VGA
depends on QEMU
bool "QEMU/Bochs Original IBM 256K VGA"
+ select VGA_STDVGA_PORTS
help
Build basic VGA BIOS support (pre Super-VGA) for use
on emulators.
config VGA_CIRRUS
depends on QEMU
bool "QEMU/Bochs Cirrus SVGA"
+ select VGA_STDVGA_PORTS
help
Build support for Cirrus VGA emulation found on QEMU
and Bochs emulators. This is for emulators; it is not
config VGA_BOCHS
depends on QEMU
bool "QEMU/Bochs VBE SVGA"
+ select VGA_STDVGA_PORTS
help
Build support for Bochs DISPI interface (a custom VBE
protocol) found on QEMU and Bochs emulators.
config VGA_GEODEGX2
bool "GeodeGX2"
+ select VGA_STDVGA_PORTS
help
Build support for Geode GX2 vga.
config VGA_GEODELX
bool "GeodeLX"
+ select VGA_STDVGA_PORTS
help
Build support for Geode LX vga.
endchoice
bool
default !NO_VGABIOS
+ config VGA_STDVGA_PORTS
+ bool
+
config VGA_ALLOCATE_EXTRA_STACK
depends on BUILD_VGABIOS
bool "Allocate an internal stack for 16bit interrupt entry point"
u16 curs = (start << 8) + end;
SET_BDA(cursor_type, curs);
+ if (!CONFIG_VGA_STDVGA_PORTS)
+ return;
+
u8 modeset_ctl = GET_BDA(modeset_ctl);
u16 cheight = GET_BDA(char_height);
if ((modeset_ctl & 0x01) && (cheight > 8) && (end < 8) && (start < 0x20)) {
// Bios cursor pos
SET_BDA(cursor_pos[page], (y << 8) | x);
+ if (!CONFIG_VGA_STDVGA_PORTS)
+ return;
+
// Set the hardware cursor
u8 current = GET_BDA(video_page);
if (cp.page != current)
SET_BDA(cursor_type, 0x0000);
}
SET_BDA(video_pagesize, calc_page_size(memmodel, width, height));
- SET_BDA(crtc_address, stdvga_get_crtc());
+ SET_BDA(crtc_address, CONFIG_VGA_STDVGA_PORTS ? stdvga_get_crtc() : 0);
SET_BDA(char_height, cheight);
SET_BDA(video_ctl, 0x60 | (flags & MF_NOCLEARMEM ? 0x80 : 0x00));
SET_BDA(video_switches, 0xF9);
static void
handle_100b(struct bregs *regs)
{
+ if (!CONFIG_VGA_STDVGA_PORTS) {
+ handle_100bXX(regs);
+ return;
+ }
switch (regs->bh) {
case 0x00: handle_100b00(regs); break;
case 0x01: handle_100b01(regs); break;
static void
handle_1010(struct bregs *regs)
{
+ if (!CONFIG_VGA_STDVGA_PORTS) {
+ handle_1010XX(regs);
+ return;
+ }
switch (regs->al) {
case 0x00: handle_101000(regs); break;
case 0x01: handle_101001(regs); break;
static void
handle_1011(struct bregs *regs)
{
+ if (CONFIG_VGA_STDVGA_PORTS) {
+ switch (regs->al) {
+ case 0x00: handle_101100(regs); break;
+ case 0x01: handle_101101(regs); break;
+ case 0x02: handle_101102(regs); break;
+ case 0x03: handle_101103(regs); break;
+ case 0x04: handle_101104(regs); break;
+ case 0x10: handle_101110(regs); break;
+ case 0x11: handle_101111(regs); break;
+ case 0x12: handle_101112(regs); break;
+ case 0x14: handle_101114(regs); break;
+ }
+ }
switch (regs->al) {
- case 0x00: handle_101100(regs); break;
- case 0x01: handle_101101(regs); break;
- case 0x02: handle_101102(regs); break;
- case 0x03: handle_101103(regs); break;
- case 0x04: handle_101104(regs); break;
- case 0x10: handle_101110(regs); break;
- case 0x11: handle_101111(regs); break;
- case 0x12: handle_101112(regs); break;
- case 0x14: handle_101114(regs); break;
case 0x30: handle_101130(regs); break;
case 0x20: handle_101120(regs); break;
case 0x21: handle_101121(regs); break;
static void
handle_101232(struct bregs *regs)
{
- stdvga_enable_video_addressing(regs->al);
- regs->al = 0x12;
+ if (CONFIG_VGA_STDVGA_PORTS) {
+ stdvga_enable_video_addressing(regs->al);
+ regs->al = 0x12;
+ }
}
static void
scroll_pl4(struct vgamode_s *vmode_g, int nblines, int attr
, struct cursorpos ul, struct cursorpos lr)
{
+ if (!CONFIG_VGA_STDVGA_PORTS)
+ return;
int cheight = GET_BDA(char_height);
int cwidth = 1;
int stride = GET_BDA(video_cols) * cwidth;
write_gfx_char_pl4(struct vgamode_s *vmode_g
, struct cursorpos cp, struct carattr ca)
{
+ if (!CONFIG_VGA_STDVGA_PORTS)
+ return;
u16 nbcols = GET_BDA(video_cols);
if (cp.x >= nbcols)
return;
u8 *addr_far, mask, attr, data, i;
switch (GET_GLOBAL(vmode_g->memmodel)) {
case MM_PLANAR:
+ if (!CONFIG_VGA_STDVGA_PORTS)
+ return;
addr_far = (void*)(x / 8 + y * GET_BDA(video_cols));
mask = 0x80 >> (x & 0x07);
for (i=0; i<4; i++) {
u8 *addr_far, mask, attr=0, data, i;
switch (GET_GLOBAL(vmode_g->memmodel)) {
case MM_PLANAR:
+ if (!CONFIG_VGA_STDVGA_PORTS)
+ return 0;
addr_far = (void*)(x / 8 + y * GET_BDA(video_cols));
mask = 0x80 >> (x & 0x07);
attr = 0x00;