[Mplayer-cvslog] CVS: main/linux vbelib.c,1.3,1.4 vbelib.h,1.2,1.3

Nick Kurshev nick at mplayer.dev.hu
Mon Oct 22 11:29:01 CEST 2001


Update of /cvsroot/mplayer/main/linux
In directory mplayer:/var/tmp.root/cvs-serv29450/main/linux

Modified Files:
	vbelib.c vbelib.h 
Log Message:
More iopl'ed ports and test for brken BIOS

Index: vbelib.c
===================================================================
RCS file: /cvsroot/mplayer/main/linux/vbelib.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vbelib.c	19 Oct 2001 15:09:57 -0000	1.3
+++ vbelib.c	22 Oct 2001 09:28:44 -0000	1.4
@@ -56,14 +56,22 @@
 
 int vbeInit( void )
 {
+   unsigned short iopl_port,int_10_seg;
+   size_t i;
    if(!LRMI_init()) return VBE_VM86_FAIL;
    /*
     Allow read/write to ALL io ports
    */
+   int_10_seg = *(unsigned short *)PhysToVirtSO(0x0000,0x0042);
+   /* Video BIOS should be at C000:0000 and above */
+   if((int_10_seg >> 12) < 0xC) return VBE_BROKEN_BIOS;
    ioperm(0, 1024, 1);
    iopl(3);
    memset(&vbe_pm_info,0,sizeof(struct VesaProtModeInterface));
    vbeGetProtModeInfo(&vbe_pm_info);
+   i = 0;
+   while((iopl_port=vbe_pm_info.iopl_ports[i++]) != 0xFFFF) ioperm(iopl_port,1,1);
+   iopl(3);
    return VBE_OK;
 }
 

Index: vbelib.h
===================================================================
RCS file: /cvsroot/mplayer/main/linux/vbelib.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vbelib.h	18 Oct 2001 15:48:51 -0000	1.2
+++ vbelib.h	22 Oct 2001 09:28:44 -0000	1.3
@@ -189,6 +189,7 @@
 #define VBE_VM86_FAIL         -1
 #define VBE_OUT_OF_DOS_MEM    -2
 #define VBE_OUT_OF_MEM        -3
+#define VBE_BROKEN_BIOS       -4
 #define VBE_VESA_ERROR_MASK   0x004f
 #define VBE_VESA_ERRCODE_MASK 0xff00
 




More information about the MPlayer-cvslog mailing list