9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Parallels Vesa driver question
Date: Sun,  2 Aug 2009 13:06:41 -0400	[thread overview]
Message-ID: <c5e37c898ef29d3eb8fc79551b343ae9@quanstro.net> (raw)
In-Reply-To: <22352E83-0CE0-406D-8D01-D3CC416EAE81@storytotell.org>

On Sun Aug  2 05:39:10 EDT 2009, fusion@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	other threads:[~2009-08-02 17:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-02  9:36 Daniel Lyons
2009-08-02 17:06 ` erik quanstrom [this message]
2009-08-02 19:14   ` Daniel Lyons
2009-08-02 20:41     ` Steve Simon
2009-08-02 21:41     ` erik quanstrom
2009-08-03  6:57       ` Daniel Lyons
2009-08-03  9:26         ` Richard Miller
2009-08-03 11:20           ` erik quanstrom
2009-08-04  2:36             ` geoff
2009-08-04  3:12               ` David Leimbach
2009-08-04  7:18                 ` Daniel Lyons
2009-08-04  7:25                 ` Bakul Shah
2009-08-04 12:47                   ` David Leimbach
2009-08-04 15:20                     ` Bakul Shah
2009-08-04 15:25                       ` David Leimbach
2009-08-04 16:24                         ` Bakul Shah
2009-08-04 17:46                           ` erik quanstrom
2009-08-12  6:18                             ` Bakul Shah
2009-08-04  8:54             ` Daniel Lyons
2009-08-04  9:04               ` erik quanstrom
2009-08-03 16:30           ` ron minnich
2009-08-04  7:15             ` Daniel Lyons
2009-08-04 15:26               ` ron minnich
2009-08-03  9:13 ` Balwinder S Dheeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5e37c898ef29d3eb8fc79551b343ae9@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).