From 4c179368aa078d1f3b059eb9e3849a25cf00ccc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 18 Jun 2004 13:47:00 +0000 Subject: [PATCH] vesa_get_mode_info() no longer copies the buffer as well; it will now write the contents directly into the buffer. If we'll ever intend to store mode infos in kernel memory, this should be changed back. vesa_set_mode() now sets the correct flags to get a linear frame buffer; graphical boot now works in Bochs 2.1.1 as well. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8044 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/platform/bios_ia32/video.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/kernel/boot/platform/bios_ia32/video.cpp b/src/kernel/boot/platform/bios_ia32/video.cpp index c94f7850ca..e286b4ab4b 100644 --- a/src/kernel/boot/platform/bios_ia32/video.cpp +++ b/src/kernel/boot/platform/bios_ia32/video.cpp @@ -44,18 +44,16 @@ vga_set_palette(const uint8 *palette, int32 firstIndex, int32 numEntries) static status_t vesa_get_mode_info(uint16 mode, struct vbe_mode_info *modeInfo) { - struct vbe_mode_info *info = (vbe_mode_info *)kExtraSegmentScratch; struct bios_regs regs; regs.eax = 0x4f01; regs.ecx = mode; - regs.es = 0; - regs.edi = (addr_t)info; + regs.es = ADDRESS_SEGMENT(modeInfo); + regs.edi = ADDRESS_OFFSET(modeInfo); call_bios(0x10, ®s); if ((regs.eax & 0xffff) != 0x4f) return B_ENTRY_NOT_FOUND; - memcpy(modeInfo, info, sizeof(vbe_mode_info)); return B_OK; } @@ -159,7 +157,7 @@ vesa_set_mode(uint16 mode) { struct bios_regs regs; regs.eax = 0x4f02; - regs.ebx = mode; + regs.ebx = (mode & SET_MODE_MASK) | SET_MODE_LINEAR_BUFFER; call_bios(0x10, ®s); if ((regs.eax & 0xffff) != 0x4f)