From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Fri, 7 Aug 2009 13:22:58 -0400 To: 9fans@9fans.net Message-ID: <348bd35aaf21483cffec7348cc75875f@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] mtrr Topicbox-Message-UUID: 3d4de912-ead5-11e9-9d60-3106f5b1d025 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