From: Daniel Lyons <fusion@storytotell.org>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Parallels Vesa driver question
Date: Sun, 2 Aug 2009 13:14:08 -0600 [thread overview]
Message-ID: <DBBAA5C0-9E2A-494A-A65A-884926967FF3@storytotell.org> (raw)
In-Reply-To: <c5e37c898ef29d3eb8fc79551b343ae9@quanstro.net>
Erik,
Thanks for your speedy assistance! I think the two things are closely
interrrelated via the global variable hardscreen. Reverting this file
solved the problem. I wouldn't be surprised if there were something
weird about Parallels' MTRR support, and since this isn't the current
version it's not likely to get any better. If anyone's using Parallels
4 and not running into this issue, I'd love to know.
Also, are the old sources available online somewhere so I can do this
kind of diff in the future on my own?
Thanks again,
On Aug 2, 2009, at 11:06 AM, erik quanstrom wrote:
> 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,
> };
>
—
Daniel Lyons
next prev parent reply other threads:[~2009-08-02 19:14 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
2009-08-02 19:14 ` Daniel Lyons [this message]
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=DBBAA5C0-9E2A-494A-A65A-884926967FF3@storytotell.org \
--to=fusion@storytotell.org \
--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).