#include "vgatables.h" // find_vga_entry
#include "optionroms.h" // struct pci_data
#include "config.h" // CONFIG_*
-#include "vbe.h" // vbe_*
+#include "vbe.h" // struct vbe_info
+#include "geodelx.h" // geodelx_init
+#include "bochsvga.h" // bochsvga_init
// XXX
#define DEBUG_VGA_POST 1
#define DEBUG_VGA_10 3
-#define SET_VGA(var, val) SET_FARVAR(get_global_seg(), (var), (val))
/****************************************************************
* PCI Data
return;
}
- if (vbe_enabled())
- vbe_hires_enable(0);
+ if (bochsvga_enabled())
+ bochsvga_hires_enable(0);
vga_set_mode(mode, noclearmem);
}
SET_FARVAR(seg, info->oem_string,
SEGOFF(get_global_seg(), (u32)VBE_OEM_STRING));
- SET_FARVAR(seg, info->capabilities[0], 0x1); /* 8BIT DAC */
+ SET_FARVAR(seg, info->capabilities, 0x1); /* 8BIT DAC */
/* We generate our mode list in the reserved field of the info block */
SET_FARVAR(seg, info->video_mode, SEGOFF(seg, regs->di + 34));
/* Total memory (in 64 blocks) */
- SET_FARVAR(seg, info->total_memory, vbe_total_mem());
+ SET_FARVAR(seg, info->total_memory, bochsvga_total_mem());
SET_FARVAR(seg, info->oem_vendor_string,
SEGOFF(get_global_seg(), (u32)VBE_VENDOR_STRING));
SEGOFF(get_global_seg(), (u32)VBE_REVISION_STRING));
/* Fill list of modes */
- vbe_list_modes(seg, regs->di + 32);
+ bochsvga_list_modes(seg, regs->di + 32);
regs->al = regs->ah; /* 0x4F, Function supported */
regs->ah = 0x0; /* 0x0, Function call successful */
dprintf(1, "VBE mode info request: %x\n", mode);
- rc = vbe_mode_info(mode, &modeinfo);
+ rc = bochsvga_mode_info(mode, &modeinfo);
if (rc) {
dprintf(1, "VBE mode %x not found\n", mode);
regs->ax = 0x100;
SET_FARVAR(seg, info->win_size, 64); /* Bank size 64K */
SET_FARVAR(seg, info->winA_seg, 0xA000);
SET_FARVAR(seg, info->winB_seg, 0x0);
- SET_FARVAR(seg, info->win_func_ptr, 0x0);
+ SET_FARVAR(seg, info->win_func_ptr.segoff, 0x0);
SET_FARVAR(seg, info->bytes_per_scanline, modeinfo.linesize);
SET_FARVAR(seg, info->xres, modeinfo.width);
SET_FARVAR(seg, info->yres, modeinfo.height);
if (mode < 0x100) { /* VGA */
dprintf(1, "set VGA mode %x\n", mode);
- vbe_hires_enable(0);
+ bochsvga_hires_enable(0);
vga_set_mode(mode, 0);
} else { /* VBE */
- rc = vbe_mode_info(mode & 0x1ff, &modeinfo);
+ rc = bochsvga_mode_info(mode & 0x1ff, &modeinfo);
if (rc) {
dprintf(1, "VBE mode %x not found\n", mode & 0x1ff);
regs->ax = 0x100;
return;
}
- vbe_hires_enable(1);
- vbe_set_mode(mode & 0x1ff, &modeinfo);
+ bochsvga_hires_enable(1);
+ bochsvga_set_mode(mode & 0x1ff, &modeinfo);
if (mode & 0x4000) {
/* Linear frame buffer */
/* XXX: ??? */
}
if (!(mode & 0x8000)) {
- vbe_clear_scr();
+ bochsvga_clear_scr();
}
}
static void
handle_104f03(struct bregs *regs)
{
- if (!vbe_hires_enabled()) {
+ if (!bochsvga_hires_enabled()) {
regs->bx = GET_BDA(video_mode);
} else {
- regs->bx = vbe_curr_mode();
+ regs->bx = bochsvga_curr_mode();
}
dprintf(1, "VBE current mode=%x\n", regs->bx);
static void
handle_104f(struct bregs *regs)
{
- if (!vbe_enabled()) {
+ if (!bochsvga_enabled()) {
handle_104fXX(regs);
return;
}
vgahw_init();
+ if (CONFIG_VGA_GEODELX)
+ geodelx_init();
+
init_bios_area();
- vbe_init(regs->ah, regs->al);
+ bochsvga_init(regs->ah, regs->al);
extern void entry_10(void);
SET_IVT(0x10, SEGOFF(get_global_seg(), (u32)entry_10));
// XXX - clear screen and display info
- // XXX: fill it
- SET_VGA(video_save_pointer_table.videoparam
- , SEGOFF(get_global_seg(), (u32)video_param_table));
+ build_video_param();
// Fixup checksum
extern u8 _rom_header_size, _rom_header_checksum;