On Sun Aug  2 05:39:10 EDT 2009, fus...@storytotell.org wrote:
> Hi,
> 
> I installed Plan 9 under Parallels 3 back in November of last year and  
> it worked without a hitch. I tried to install another copy tonight and  
> the bitmapped display isn't working in the new one, I just get a pure  
> black screen after any aux/vga command that it thinks will succeed. I  
> found I can reproduce that behavior by building and running a new  
> kernel in the old install. Any ideas what has happened since November  
> in the kernel with respect to Vesa and Parallels? I'd be more than  
> happy to debug this issue if I could get a little guidance. I didn't  
> see anything in the archives about this problem. Alternatively, does  
> anyone know if Parallels 4 works with a current kernel? If so I'll  
> probably just upgrade to that; I've been holding off for a good reason  
> to.

two things: mtrr and adding a vesaflush command.  it doesn't quite make
sense to me that this would break parallels, unless there is something
funky about
- mtrr ranges with parallels.  
- parallels vesa
- plan 9 vesa support

the easiest thing to do would be to comment out vesaflush and
see what happens.  without pawing through the standard, it may
be that vesaflush is optionally supported and parallels doesn't support it.

- erik

; diff -c vgavesa.c /n/sourcesdump/2008/1101/plan9/sys/src/9/pc/vgavesa.c
vgavesa.c:13,21 - /n/sourcesdump/2008/1101/plan9/sys/src/9/pc/vgavesa.c:13,18
  #include <cursor.h>
  #include "screen.h"
  
- 
- static void *hardscreen;
- 
  #define WORD(p) ((p)[0] | ((p)[1]<<8))
  #define LONG(p) ((p)[0] | ((p)[1]<<8) | ((p)[2]<<16) | ((p)[3]<<24))
  #define PWORD(p, v) (p)[0] = (v); (p)[1] = (v)>>8
vgavesa.c:83,89 - /n/sourcesdump/2008/1101/plan9/sys/src/9/pc/vgavesa.c:80,86
  }
  
  static void
- vesalinear(VGAscr *, int, int)
+ vesalinear(VGAscr* scr, int, int)
  {
        int i, mode, size;
        uchar *p;
vgavesa.c:130,169 - 
/n/sourcesdump/2008/1101/plan9/sys/src/9/pc/vgavesa.c:127,135
                size = ROUND(size, 1024*1024);
  
  havesize:
-       if(size > 16*1024*1024)         /* probably arbitrary; could increase */
-               size = 16*1024*1024;
-       hardscreen = vmap(paddr, size);
-       mtrr(paddr, size, "wc");
- //    vgalinearaddr(scr, paddr, size);
+       vgalinearaddr(scr, paddr, size);
  }
  
- static void
- vesaflush(VGAscr *scr, Rectangle r)
- {
-       int t, w, wid, off;
-       ulong *hp, *sp, *esp;
- 
-       if(rectclip(&r, scr->gscreen->r) == 0)
-               return;
- 
-       hp = hardscreen;
-       sp = (ulong*)(scr->gscreendata->bdata + scr->gscreen->zero);
-       t = (r.max.x * scr->gscreen->depth + 2*BI2WD-1) / BI2WD;
-       w = (r.min.x * scr->gscreen->depth) / BI2WD;
-       w = (t - w) * BY2WD;
-       wid = scr->gscreen->width;
-       off = r.min.y * wid + (r.min.x * scr->gscreen->depth) / BI2WD;
- 
-       hp += off;
-       sp += off;
-       esp = sp + Dy(r) * wid;
-       while(sp < esp){
-               memmove(hp, sp, w);
-               hp += wid;
-               sp += wid;
-       }
- }
- 
  VGAdev vgavesadev = {
        "vesa",
        0,
vgavesa.c:174,178 - 
/n/sourcesdump/2008/1101/plan9/sys/src/9/pc/vgavesa.c:140,145
        0,
        0,
        0,
-       vesaflush,
+       0,
  };

Reply via email to