Hello.

Mushroom wrote:
Yes - the problem remains as it was. I'll try playing with some more settings but it doesn't seem promising.
OK, try the attached patch.
This is a first pass of the POST-less
video init, which will be used for
the VESA driver in the future, if
someone will finally enlarge an IO
bitmap to 8K in the linux kernel.
If that fixes your problem - we'll
see. If not - you are out of luck.
--- src/include/int.h   Mon Nov  4 02:25:59 2002
+++ src/include/int.h   Sun Dec  1 21:00:13 2002
@@ -15,6 +15,7 @@
 EXTERN void *interrupt_function[0x100];
 EXTERN unsigned int  check_date INIT(0);
 EXTERN time_t        start_time;
+EXTERN char video_ints[256];
 
 void do_int(int);
 void fake_int(int, int);
--- src/base/bios/bios.S        Mon Sep 16 04:14:05 2002
+++ src/base/bios/bios.S        Thu Oct 17 11:08:06 2002
@@ -507,16 +507,9 @@
        .org    ((INT10_SEG-BIOSSEG) << 4)+INT10_OFF
 /* ======================= Addr = F800:4200 (FC200) */
        pushw   %ax
-       sti
-       movb    $DOS_HELPER_VIDEO_INIT,%al              /*  Start Video init */
-       int     $DOSHELPER_INT
-       .byte   0x9a   /* call far 0xc000:3  or call far 0xe000:3 */
-/* More general than just c000 or e000 ??? */  
-       .globl  CISH(bios_f000_int10ptr)
-CISH(bios_f000_int10ptr):
-       .long   0xc0000003
-       movb    $DOS_HELPER_VIDEO_INIT_DONE,%al         /* Finished video init */
-       int     $DOSHELPER_INT
+       cli
+       movw    $2,%ax
+       int     $0x10
        popw    %ax
        sti
        lret
--- src/base/init/init.c        Sun Sep 29 23:45:30 2002
+++ src/base/init/init.c        Thu Oct 17 09:27:44 2002
@@ -227,6 +228,9 @@
 static inline void map_video_bios(void)
 {
   extern int load_file(char *name, int foffset, char *mstart, int msize);
+  __u32 int_area[256];
+  __u16 seg, off;
+  int i;
 
   v_printf("Mapping VBIOS = %d\n",config.mapped_bios);
 
@@ -252,6 +256,19 @@
 
     memcheck_addtype('V', "Video BIOS");
     memcheck_reserve('V', VBIOS_START, VBIOS_SIZE);
+    load_file("/dev/mem", 0, (char *)int_area, sizeof(int_area));
+    for (i = 0; i < 256; i++) {
+      seg = int_area[i] >> 16;
+      off = int_area[i] & 0xffff;
+      g_printf("int0x%x was 0x%04x:0x%04x\n", i, seg, off);
+      if (seg == VBIOS_START >> 4) {
+       v_printf("Setting int0x%x to 0x%04x:0x%04x\n", i, seg, off);
+       SETIVEC(i, seg, off);
+       video_ints[i] = 1;
+      } else video_ints[i] = 0;
+    }
+    v_printf("Now initialising 0x40:0-ff\n");
+    load_file("/dev/mem", 0x40 << 4, (char *)(0x40 << 4), 0x100);
   }
 }
 
--- src/base/async/int.c        Mon Sep 16 04:15:56 2002
+++ src/base/async/int.c        Wed Oct 23 17:40:24 2002
@@ -2120,7 +2134,7 @@
     interrupt_function[i] = default_interrupt;
 
     /* don't overwrite; these have been set during video init */
-    if(i == 0x1f || i == 0x43) continue;
+    if(video_ints[i]) continue;
 
     /* interrupts >= 0xc0 are scratch (BIOS stack), 
        unless defined by DOSEMU */     
--- src/env/video/vc.c  Sat Sep 21 07:27:17 2002
+++ src/env/video/vc.c  Wed Oct 16 16:49:11 2002
@@ -1139,57 +1139,5 @@
 void 
 install_int_10_handler (void)
 {
-  unsigned char *ptr;
-
-#if 0
-  if (!config.usesX)
-    {
-      /* Wrapper around call to video init c000:0003 */
-      ptr = (u_char *) INT10_ADD;
-
-      *ptr++ = 0x50;           /* push ax          */
-      *ptr++ = 0xfb;           /* start interrupts STI  */
-
-      *ptr++ = 0xb0;
-      *ptr++ = 0x08;           /* mov  al,08  ; Start Video init     */
-
-      *ptr++ = 0xcd;
-      *ptr++ = DOS_HELPER_INT;         /* int  e6          */
-
-      if (config.vbios_seg == 0xe000)
-       {
-         *ptr++ = 0x9a;
-         *ptr++ = 0x03;
-         *ptr++ = 0x00;
-         *ptr++ = 0x00;
-         *ptr++ = 0xe0;        /* call e000:0003   */
-       }
-      else
-       {
-         *ptr++ = 0x9a;
-         *ptr++ = 0x03;
-         *ptr++ = 0x00;
-         *ptr++ = 0x00;
-         *ptr++ = 0xc0;        /* call c000:0003   */
-       }
-      *ptr++ = 0xb0;
-      *ptr++ = 0x09;           /* move al,09   ; Finished video init    */
-
-      *ptr++ = 0xcd;
-      *ptr++ = DOS_HELPER_INT;         /* int  e6          */
-
-      *ptr++ = 0x58;           /* pop ax           */
-      *ptr++ = 0xfb;           /* start interrupts STI  */
-      *ptr++ = 0xcb;           /* retf             */
-    }
-#else
-  if (config.vbios_seg == 0xe000) {
-    extern void bios_f000_int10ptr();
-    ptr = (u_char *)((BIOSSEG << 4) + ((long)bios_f000_int10ptr - (long)bios_f000));
-    *((long *)ptr) = 0xe0000003;
-    v_printf("VID: new int10 handler at %p\n",ptr);
-  }
-  else
     v_printf("VID: install_int_10_handler: do nothing\n");
-#endif
 }


Reply via email to