> I didn't seem to see any improvement after applying the mtrr patch...
> did you make any changes to the vganvidia file before compiling? I
> haven't looked at the 'pat' thing, I'll have to check that out.
> 

for the pat business, i did:

/n/sources/plan9//sys/src/9/pc/vganvidia.c:371,377 - vganvidia.c:371,377
                if(scr->storage <= scr->apsize)
                        nv.dmabase = (ulong*)((uchar*)scr->vaddr + scr->storage 
- 128*1024);
                else{
-                       nv.dmabase = (void*)vmap(scr->paddr + scr->storage - 
128*1024, 128*1024);
+                       nv.dmabase = (void*)vmappat(scr->paddr + scr->storage - 
128*1024, 128*1024, PATWT);
                        if(nv.dmabase == 0){
                                hwaccel = 0;
                                hwblank = 0;

a quick explainer.  the pat patch just keeps a look-aside
table of memory of special types.  any time the mmu
code is asked to map that memory, it is mapped with
the special type given.  this means that if you wanted
to, for example (the current interface is better than
this unless you want a user-space driver), map pci space
in a segment accessable from user space, you could do
this and you would get the proper NC memory type.

it's fun when the explination's longer than the code.

- erik

Reply via email to