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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user