9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@coraid.com>
To: 9fans@9fans.net
Subject: [9fans] mtrr
Date: Fri,  7 Aug 2009 13:22:58 -0400	[thread overview]
Message-ID: <348bd35aaf21483cffec7348cc75875f@coraid.com> (raw)

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	other threads:[~2009-08-07 17:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=348bd35aaf21483cffec7348cc75875f@coraid.com \
    --to=quanstro@coraid.com \
    --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).