9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] mtrr
@ 2009-08-07 17:22 erik quanstrom
  0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2009-08-07 17:22 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-07 17:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-07 17:22 [9fans] mtrr erik quanstrom

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).