the mtrr() call in the kernel can error.
vgavesa doesn't protect against this possibility.

i think that this change couldn't hurt for those
who are having trouble with vesa

vgavesa.c:133,142 - /n/sources/plan9/sys/src/9/pc/vgavesa.c:133,139
        if(size > 16*1024*1024)         /* probably arbitrary; could increase */
                size = 16*1024*1024;
        hardscreen = vmap(paddr, size);
-       if(!waserror()){
-               mtrr(paddr, size, "wc");
-               poperror();
-       }
+       mtrr(paddr, size, "wc");
  //    vgalinearaddr(scr, paddr, size);
  }

it might be better to move these four lines
into vgalinearaddr right before the vmap and
get rid of the hardscreen vmap.

i haven't tested this since i don't have mtrr
in my kernels yet since pat works fine.  with
the pat patch, vmappat replaces the vmap call
in vgalinearaddr it has not caused trouble for
any video card in that time and has given
pretty good speedups.

the other reason to use pat is so it can be used
with the myricom 10gbe card.

- erik

Reply via email to