[haiku-development] Re: S3 Video Driver
- From: Gerald Zajac <zajacg@xxxxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Wed, 28 May 2008 13:05:38 -0400
Jan Kloetzke wrote:
Gerald Zajac <zajacg@xxxxxxxxxxxxx> wrote:
I haven't looked at that code yet, but I hope that it will also allow
drivers other than the VESA driver to call the video BIOS.
Indeed it's already possible. You just have to do something like that:
#include <arch/x86/vm86.h>
{
struct vm86_state vmState;
status_t ret = vm86_prepare(&vmState, 0x2000);
if (ret != B_OK)
return ret;
vmState.regs.eax = 0x4f02;
vmState.regs.ebx = 0x123;
ret = vm86_do_int(vmState, 0x10);
if (ret != B_OK) {
/* vm86 mode failed */
}
if ((vmState.regs.eax & 0xffff) != 0x4f) {
/* handle VESA error */
}
vm86_cleanup(&vmState);
}
Thanks for making it possible to call the video BIOS to set the video
mode. After looking at your code, it appears that the vm86_ functions
can also be used for calling the video BIOS to get the EDID info. This
could be useful in the S3 driver since the Boot Manager by using the
video BIOS is able to successfully read the EDID info from more S3 chips
than the S3 driver can.
Best regards,
Gerald
- Follow-Ups:
- [haiku-development] Re: S3 Video Driver
- From: Rene Gollent
- References:
- [haiku-development] Re: S3 Video Driver
- From: Axel Dörfler
- [haiku-development] Re: S3 Video Driver
- From: David McPaul
- [haiku-development] Re: S3 Video Driver
- From: Gerald Zajac
- [haiku-development] Re: S3 Video Driver
- From: Jan Kloetzke
Other related posts:
- » [haiku-development] S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
- » [haiku-development] Re: S3 Video Driver
Gerald Zajac <zajacg@xxxxxxxxxxxxx> wrote:
I haven't looked at that code yet, but I hope that it will also allow drivers other than the VESA driver to call the video BIOS.
Indeed it's already possible. You just have to do something like that:
#include <arch/x86/vm86.h>
{
struct vm86_state vmState;
status_t ret = vm86_prepare(&vmState, 0x2000);
if (ret != B_OK)
return ret;
vmState.regs.eax = 0x4f02;
vmState.regs.ebx = 0x123;
ret = vm86_do_int(vmState, 0x10);
if (ret != B_OK) {
/* vm86 mode failed */
}
if ((vmState.regs.eax & 0xffff) != 0x4f) {
/* handle VESA error */
}
vm86_cleanup(&vmState);
}
- [haiku-development] Re: S3 Video Driver
- From: Rene Gollent
- [haiku-development] Re: S3 Video Driver
- From: Axel Dörfler
- [haiku-development] Re: S3 Video Driver
- From: David McPaul
- [haiku-development] Re: S3 Video Driver
- From: Gerald Zajac
- [haiku-development] Re: S3 Video Driver
- From: Jan Kloetzke