+ /* BIOS Int 11 Handler F000:F84D */
+ write_idt_stub((void *)0xff84d, 0x11);
+ /* BIOS Int 12 Handler F000:F841 */
+ write_idt_stub((void *)0xff841, 0x12);
+ /* BIOS Int 13 Handler F000:EC59 */
+ write_idt_stub((void *)0xfec59, 0x13);
+ /* BIOS Int 14 Handler F000:E739 */
+ write_idt_stub((void *)0xfe739, 0x14);
+ /* BIOS Int 15 Handler F000:F859 */
+ write_idt_stub((void *)0xff859, 0x15);
+ /* BIOS Int 16 Handler F000:E82E */
+ write_idt_stub((void *)0xfe82e, 0x16);
+ /* BIOS Int 17 Handler F000:EFD2 */
+ write_idt_stub((void *)0xfefd2, 0x17);
+ /* ROM BIOS Int 1A Handler F000:FE6E */
+ write_idt_stub((void *)0xffe6e, 0x1a);
+}
+
+#if CONFIG_FRAMEBUFFER_SET_VESA_MODE
+static u8 vbe_get_mode_info(vbe_mode_info_t * mode_info)
+{
+ printk(BIOS_DEBUG, "Getting information about VESA mode %04x\n",
+ mode_info->video_mode);
+ char *buffer = (char *)&__buffer;
+ u16 buffer_seg = (((unsigned long)buffer) >> 4) & 0xff00;
+ u16 buffer_adr = ((unsigned long)buffer) & 0xffff;
+ realmode_interrupt(0x10, VESA_GET_MODE_INFO, 0x0000,
+ mode_info->video_mode, 0x0000, buffer_seg, buffer_adr);
+ memcpy(mode_info->mode_info_block, buffer, sizeof(vbe_mode_info_t));
+ return 0;
+}
+
+static u8 vbe_set_mode(vbe_mode_info_t * mode_info)
+{
+ printk(BIOS_DEBUG, "Setting VESA mode %04x\n", mode_info->video_mode);
+ // request linear framebuffer mode
+ mode_info->video_mode |= (1 << 14);
+ // request clearing of framebuffer
+ mode_info->video_mode &= ~(1 << 15);
+ realmode_interrupt(0x10, VESA_SET_MODE, mode_info->video_mode,
+ 0x0000, 0x0000, 0x0000, 0x0000);
+ return 0;
+}